Intro Databases Flashcards
Database:
organized collection of data
Database models:
describes how data is organized within a database
Flat file model: data organized into table-like structure. Elements are in rows called records and columns called fields.
Problem w/ flat file:
Data redundancy problems: repeated data
Data integrity problems: accidental spelling mistake, incorrect information
Update/Delete problems: making changes is time-consuming because the user has to go through every row
Insert problems: new information cannot be added (e.g. new employee cannot be added to database until after 1st shift)
Hierarchical database model:
organized into tree-like structure. Node is related to many child nodes in its lower level, but is always connected to a single parent node at the higher level
Causes less data redundancy and easier to maintain data integrity
Search operations can be slow
Database still used in XML files
Network database model:
extension of hierarchical model except a node can have many connections at both levels (high and low)
Difficult to implement in computers
Relational database model:
introduced by E.F. Codd (1970), most commonly used model. Data is organized into a set of tables (entities) that are related to one another by using special columns called keys
Solves data redundancy problems: data is not repeated
Solves data integrity: allow only authorized people to make changes, incorrect data items cannot be entered
Solved update/delete problems: can update specific data without making changes in other connected tables
Solves insert problems: new worker is allowed to be added even if they have not had a shift