2.4 Computational thinking Flashcards
Why do computers use binary?
Computers use 1s and 0s to represent the flow of electricity in their circuits.
What is a NOT gate?
A NOT gate takes an input and
outputs the opposite.
What is an AND gate?
For an AND gate to give an output of
1, both inputs must be 1.
What is an OR gate?
For an OR gate to give an output of 1, either inputs must be 1.
How are records stored in text files?
Stored on the secondary storage
Used to store data when application is closed
Useful for small volumes od data
How are records stored in arrays and lists?
Stored in the RAM
Used to store data when a program is running
Use indexes to refer to data items
How are records stored in databases?
Often stored on remote servers
Often used to store data shared by man users
Data is stored in records and fields
What is a record structure?
A collection of related fields
A field is a variable
What are the three steps in making use of record structures?
Define the record structure
Declare a variable or array to use with the record structure
Assign and retrieve data from the variable record
What is SQL used for?
To create, delete, modify and manipulate records in a databse
What are the basic SQL commands?
SELECT - which fields to be returned. *can be used to indicate all fields
FROM - which table. Databases can have more than one table, each with their own unique name
WHERE records meet a condition. LIKE can be used as a wildcard
Why do you need to test a program?
To ensure there are no errors in the code
To check that the program has an acceptable performance
To ensure that unauthorised access is prevented
To check the program meets the requirements
Why do you need to test a program?
To ensure there are no errors in the code
To check that the program has an acceptable performance
To ensure that unauthorised access is prevented
To check the program meets the requirements
What is iterative testing?
Each new module is tested as it written
Checking new modules does not introduce new errors
Test to ensure the program handles erroneous data
Performed whilst the software is being developed
What is Final/Terminal testing?
Testing that all modules work together
Performed when the program is finished