Databases-chap 3 Flashcards
The relational database model
Relation
A table with columns and rows
Attribute
A named column of a relation
Record
Logically connected set of one or more fields that describe a person, place or thing
Domain
Is the set of allowable values for one or more attributes
Relational schema
A textual representation of database tables, where each table is described by its name followed by a list of its attributes in parenthesis
Keys
Consist of one or more attributes that determine other attributes. Concept known as determination
Cardinality
The number of rows
Degree
The number of its attributes/columns
Candidate key
An attribute that determines all the other attributes in the relation, Pk from these
A minimal super key, a super key that does not contain a subset of attributes that is itself a super key
PK
An attribute that uniquely identifies any given row
COK
A key composed of more than one attribute
FK
Is an attribute whose values match PK values in the related table
Nulls
-No data entry
-Not permitted in PK
-Should be avoided in other attributes
It can represent
-An unknown attribute value
-A known, but missing attribute value
-A “not applicable” condition
Data redundancy
FK helps with duplication of the attributes
The state of having more than one instance of something, often resulting in unnecessary duplication/repetition
Entity integrity
Ensures that each row is uniquely identified by the PK
It means that a proper search for an existing row will always be successful
Referential integrity
-Concerns how 2 tables reference each other
-Through FK, can be null or a valid entry
Data dictionary
Provides detailed accounting of all tables found within the database
Contains metadata
System catalogue
Is a detailed system data dictionary, describes all objects within the database
Indexes
Orderly arrangement used to logically access rows in a table like finding a book in the library
-Composed of an index key key and set of pointers
-Pointers are identifiers
Unique index
Is one in which the index key can have only one pointer value(row) associated with it
Super key
Any key that uniquely identifies each row
Secondary key
A key that is used strictly for data retrieval purposes
Flags
Special codes that indicate the absence of some value
Associations have several characteristics
Association name
Association direction(arrows)
Role name
Multiplicity