Database Management ch 3
Primary key
a candidate key selected to uniquely identify all other attribute values in a given row
attribute
a characteristic of an entity
referential integrity
a foreign key that contains a value that matches an existing valid row in another table to which its related, or has a null entry
entity relationship model
a graphical representation of entities and their relationships for Relational Model
composite key
a key many be composed of more than one attribute
Candidate key
a minimal superkey. a superkey without unnecessary attributes
constraint
a restriction placed on data
Entity integrity
all primary keys are unique, no part of a primary key may be null
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
superkey
an attribute(or combination of attributes) that uniquely identifies each row in a table
Entity Requirements
an entity should have many instances(occurrences/rows); an entity should have many interesting attributes. Each table must have an attribute or a combination of attributes that uniquely identifies each row
key attribute
any attribute that is part of a key
entity
anything about which data is to be collected and stored
functional dependence
attribute B is functionally dependent on A if all rows in the table that agree in value for A also agree in value for B
composite entity
composite entity's primary key=the combination of the foreign keys of tables to be linked
business rulesq
descriptions of policies, procedures, and principles within a specific organization. Sources include: company managers, policy makers, department managers, written documentation
Entity Relationship Diagram
entity is mapped to a relational table; entity instance/occurrence is row in the table; entity set is a collection of linked entities
M:N relationship
implemented by breaking it up to produce a set of 1:M relationships ; avoid the problems of M:N relationship by creating a composite entity
Data model components
include entities, relationships, attributes
unique index
index in which the index key can only have one pointer value(row) associated with it
index key
index's reference point; points to data location identified by the key
table
matrix consisting of row/column intersections; each row in a relation is called a tuple
1:1 relationship
one entity related to only one other entity, and vice versa; sometimes means that entity components were not properly defined; could indicate that two entities belong in the same table
key
one or more attributes that determine other attributes; role is based on determination
1:M relationship
relational model ideal that should be the norm in any relational database design