Databases Flashcards
What is a Flat File DB/ what does it do?
-Single table with no relationships.
-Each row is known as a record (GCSE)/ an entity (A level).
-Each column is known as a field (GCSE)/ an attribute (A level).
-Used for transactional processing (monthly payments).
What are some advantages of Flat File DB?
-Simple to set up (don’t need datatypes)
-Sends easily through emails
-Eady to add data to the table
What are some disadvantages of Flat File DB?
-Redundant data (data that is unnecessarily repeated)
-Takes up additional memory
-Requires more maintenance
What is Relational DB?
-Data organized into tables that are related to each other (more than one table).
What are some advantages of Relational DB?
-Can use queries to search for data
-Reduces redundant data (separate tables for each data)
-Apply different permissions to different tables so different users can access different tables
What are some disadvantages of Relational DB?
-Processing time is slower as link has been created between the tables.
What is validation and when does it take place?
- Validation ensures data is sensible and conforms to defined rules (within acceptable boundaries)
- It is used when data is input into a computer system.
- When data is valid (conforms to the rules) it is accepted.
Validation does not ensure data is correct
What are the validation rules that can be used in a data base?
-Presence
-Range check
-Type check
-Length check
-Format check
-Look up check
-Consistency check
-Check digit
What is the validation presence check?
It is used to make sure data is entered (if data is not entered, an error message will appear).
*Called required field - cannot be left blank.
What is the validation range check?
Checks that data is within a defined range. Limit check will check highest or lowest - one boundary. There are 2 boundaries (lower + upper).
*Used when working with numbers, currency, date/time. Symbols: >=<>=«=
What is the validation type check?
Checks the correct data type has been used.
Age must be an integer, price must be currency etc.
What is the validation length check?
Endures that data is of a defined length or within a range of lengths.
Password must be 9 characters etc.
What is the validation format check?
Ensure that data is in a defined form (data has to follow a pattern).
Post code must be LLN NLL.
What is the validation look up check ?
Checks to see if data is in a list, you only choose off that list. (spreadsheets).
What is the validation consistency check?
Compares data in one field with another field that already exists - checks to see if both are consistent with each other.
- Male > title Mr ✅ consistent
-Male > title Mrs ❌ not consistent