COSI 127b Lecture Notes - Lecture 1: Arity, Flat File Database, Candidate Key
Document Summary
A database manages data organization, data retrieval, and data integrity. A cheap alternative to a database system is a flat file. While flat files are flexible, they don"t scale well. Additionally, flat files have no control of redundancy which can result in wasted space and inconsistencies. The logical level of data organization consists of data models a framework for organizing and interpreting data. The logical level of data retrieval consists of queries a declarative data retrieval program. A key is any set of distinguishing attributes of a relation; keys must be independent of instances. A superkey is any set of possible keys. A candidate key is any minimal set of possible keys. A primary key is the candidate key chosen, and is indicated by underlining. The minimal relational algebra consists of select, project, union, set difference, cartesian product, and rename operations. The redundant operations include natural join, theta join, outer joins, division, and update operations.