lec03.365 - 1 Constraints Superkey a collection of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
. . Fall 2007 CPE/CSC 365: Introduction to Database Systems Alexander Dekhtyar . . Relational Database Model Relational Model One single data modeling “tool”: relation , or a 2D table; A relational database is a collection of relations; High degree of data independence Association between information elements (constraints) More Formally Relation : a two-dimensional table of columns and rows. Attribute, Field : name of a column in the relation. take values from predeFned domains Record, tuple : a single row in the relation: a collection of attribute values . Schema : the name of a relation plus the set of attributes of the relation (and their domains). E.g. Book(ISBN string, Title string, Author string, year integer) . Relation instance : a set of tuples for a given relation . changes with time (as stu± gets added, deleted, modiFed) schema usually does not change (althought it might in some cases) Cardinality : number of tuples in a relation Degree : number of attributes in a relation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Constraints Superkey a collection of attributes in a relation that uniquely identifes each tuple in it . Candidate key a superkey that has no superkey subsets Primary key one candidate key per relation, designated to be the main way of maintaining tuple uniqueness. Key constraint : each relation must have a primary key . Foreign key a primary key of one relation, included in the attributes of another relation (usually for the purpose of linking two components of the database together). Referential integrity constraint each collection of values of a foreign key in a relation must appear as a primary key in the referenced relation. Null value : a “no value” value for a relational attribute. Lack of value, or value not yet available. not null constraint : a statement that a speciFc attribute is not allowed to have null values . (e.g., primary key attributes)....
View Full Document

Page1 / 2

lec03.365 - 1 Constraints Superkey a collection of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online