Database Ch3
Relational database operator: SELECT
1. SELECT: creates a new relation by selecting only rows from an original an original relation that satisfy a specified condition.
Relationship
A linking between entities of two entity sets
Recursive Relationship
A relationship that relates an entity set to itself
Integrity Constraint Rule Def.
A rule that restricts the values in a database
Foreign key
An attribute (or combo of) in 1 relation that constitutes a primary key in another relation. Used to indicate logical links between relations
Functional Dependency
An attribute Y is functionally dependent on X if and only if each valye in column X determines one and only one value in column Y. We say X is the determinant Note: X and Y can be sets of attributes rather than single attributes. Notation: X -------> Y X determines Y Y is functionally dependent on X
Key attribute
An attribute that is part of the primary key of a relation
How are relationships between tables implemented?
By creating foreign keys
Entity Integrity
No key attribute in any row in a table may be null. The values of the primary key should be unique/distinct.
4 examples of types of domains
Numeric: 4; 2.5; Character (string): A; Ali; $ Date Logic
Tuple
Row
Primary key
The candidate key designated for principal use in uniquely identifying tuples in a relation
Degree of Relation
The number of attributes in a relation
Relation
Two dimension table of rows of data about some attributes
Null Value
Value given to an attribute in a tuple if the attribute is "inapplicable" or its value is "unknown" Not a blank or zero, it is simply unknown and may be supplied at a later time
Attribute domain
Where the attribute gets its value
Candidate key
a minimal set of attributes that uniquely identifies each row in a table. That is, a superkey that does not contain a subset of attributes that is itself a superkey
Secondary key
an attribute (or a combo of attributes) used strictly for data retrieval purposes. Ex: use of name or phone instead of customer number
Superkey
an attribute (or combination of attributes) that uniquely identifies each row in a relation Determines every other attribute in the table