Databases Flashcards
What is a database table also known as?
An entity or file
What is a record in a database? What are they also know as?
Records are the rows in a table
Known as rows/tuples
What are fields in a database? What are they also known as?
Fields are the columns of a table
Also known as columns or attributes
What is a flat file database?
One that only contains one table
What methods are there of inputting data to a database?
- paper based, where a person types into a database based on a form
- optical text recognition, where a computer reads information
- optical mark recognition, e.g. multiple choice tests
What methods are there of retrieving data from a database?
- SQL (SELECT FROM WHERE)
- QBE (visual tables where the user can enter commands and conditions, not syntax required)
What methods are there of modifying data?
- DML (database manipulation language, using commands such as UPDATE, DELETE, INSERT)
- DBMS (database management system, hides the structure of the data to ensure integrity)
What are the methods of exchanging data?
For recording data to transfer:
- XML, JSON
- comma separated values (CSV) in a notepad file
For exchanging files:
- memory stick, email etc. (Physical methods)
- Electronic data interchange (EDI), a protocol allowing two databases to interface
What are the principles of 1NF?
- All field names must be unique
- All stored values in a field should be from the same domain (data type)
- Values in fields should be atomic (only one value)
- No two records can be identical
- Each table needs a primary key
What are the principles of 2NF?
- The data is in 1NF
- Any partial dependencies have been removed (each table should be for one purpose, for example not a table of students and courses)
What are the principles of 3NF?
- The data is in 2NF
- Any transitive dependencies are removed (all fields are dependent on the primary key, for example a table of course codes with lecturer names should not have lecturer initials as this is dependent on lecturer name, not course code)
What is data integrity?
Ensuring the database contents are the same for all users
What is referential integrity?
Ensuring data is consistent between fields in a relationship
What is database atomicity?
Database transactions must be fully completed or not at all
What is database consistency?
A change in the database must be retained by the database