Database Fundamentals 3 Flashcards
Attribute
Named column in relational table.
It draws values from the domain
Domain
The set of possible values for the attribute
Degree
Number of attributes
Cardinality
Number of rows
Key
A key is one or more attributes that determine other attributes.
Composite key
Composed of more than one attribute
Types of relational database keys
- Superkey
- Candidate key
- Primary key
- Secondary key
- Foreign key
Superkey
An attribute (or combination of attributes) that uniquely identifies each row in a table.
Candidate key
A minimal (irreducible) superkey. A superkey that does not contain a subset of attributes that is itself a superkey.
Primary key
A candidate key selected to uniquely identify all other attribute values in any given row. Cannot contain null values.
Secondary key
An attribute (or combination of attributes) used strictly for data retrieval purposes.
Foreign key
An attribute (or combination of attributes) in one table whose values must either match the primary key in another table or be null.
What can Nulls represent?
- An unknown attribute value.
- A known, but missing, attribute value.
- A “not applicable” condition.
What do flags do?
Flags indicate the absence of some value
What is controlled redundancy?
Control data redundancy by using common attributes shared by tables.
Foreign keys make the relational database work, and enables tables to be linked together. This is crucial to exercising data redundancy control.