This is a draft cheat sheet. It is a work in progress and is not finished yet.
Relational Model
relation |
two dimensional table arranged in rows & columns |
relational database |
collection of relations |
PRIMARY KEY |
unique identifier of each row |
Database Purposes
• Humans record information • Individual internal memory is limited • External memory extends internal memory |
Components of Database
storage medium: paper / electronic |
data structures: labelled spaces |
data organization: interface organized for rapid data entry & retrieval |
Organizational Database Management
• Like people needs to remember a lot of things |
• Information usually scattered around org like puzzles |
• Deciding where and how to store data requires trade-off |
• Uses a variety of IS |
• Components: |
people, text, multimedia, model, knowledge |
|
|
Foreign Key
• Purpose: enforce referential integrity
• For every value of foreign key, there is a primary key with that value
-> Primary key must exist before foreign key can be defined
• Primary and Foreign Key can be the same or different |
VIEW
• don't require extra storage |
• subset the data contained in a table |
• join and simplify tables in a single virtual table |
• act as aggregate tables, where aggregated data (sum, average etc.) are calculated and presented as part of data |
• hide the complexity of database |
• provide extra security from unauthorizes users and illegal access |
• 1+ source tables make up a VIEW • read-only
• is a virtual dynamic computed from data in the database
• is NOT a part of the relational schema
|
|
|