lec 2 Flashcards
database schema
the set of all schema for a given database
Relational database naming properties
- tables get names distinct from other names in database’s schema
- within a table each attribute has distinct name
- across tables, same attribute names should refer to the same thing
Relational database ordering properties
tables not indexed arrays
- ordering of attributes has no significance
- ordering or records has no significance
R. database content properties
- each record distnct(could never get to duplicate records)
- each cell of a table has exactly one atomic value
- the values of an attribute must all be from the same domain and of the same data type
key
attribute or set of attributes that uniquely identifies records within a table
candidate key
a key such that no proper subset is a key within the table
primary key
attribute or set of attributes that is selected to identify records uniquely within a table
alternate key
a candidate key that has not been selected as the primary key
foreign key
an attribute or set of attributes within one table that matches the candidate key of some relation
Nulls
represent a value for the record that is currently unknown or not applicable to this record, different from 0 or space
entity integrity
no part of a primary key can be null
referential integrity
foreign key must match a candidate key in it’s home table or all parts of the foreign key value must be null
enterprise constraints
are additional rules specified by the user’s or database administrators of a database
view
virtual record(derived from one or more records)
- may limit access to only part of a record
- may combine data from multiple related records
- may combine and limit access to data
views that can update a database
those that are limited to individual records in a single table,
- not for views combining multiple records from one or more tables