Database Systems Flashcards
Serial File
Serial File
- Data is stored in the order in which it is entered
- No order to data is maintained
- Useful for storing transactional and initialisation files
Sequential Files
Sequential Files
- Stored in order of key fields
- Order is maintained when new records are added
- Useful for storing master files
Flat File / Single table database
data is duplicated – this is not only inefficient use of storage it also means errors can occur between different records very easily which compromises integrity. This makes it harder to search the database (query a database)
Flat vs Relational
Flat File Database
- single table
- Represented using
- Contains files, records, fields and characters
- simple to create, easy to use, inexpensive
- duplicated data therefore data inconsistences
Relational Database
- Consists of multiple entities
- Represented using entity relationship diagram
- Contains entity’s, attributes and relationships
- takes time to set up
Primary and foreign keys
Primary key
- a unique identifier that uniquely identifies records.
Foreign key
- any field in table which is the primary key in another table
Database management Systems (DBMS)
DBMS
- A manipulation language to change and access data
- Integrity to ensure efficiency and structure is not compromised
- Additional security
- Provides an interface for other programs to access data
- Program/data independence – You can change the data without affecting the program and vice versa.