* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Kroenke-DBP-e10-PPT-Chapter01
Open Database Connectivity wikipedia , lookup
Oracle Database wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Clusterpoint wikipedia , lookup
ContactPoint wikipedia , lookup
Relational algebra wikipedia , lookup
Thomas Connolly and Carolyn Begg’s Database Systems: A Practical Approach to Design, Implementation, and Management Chapter 4 Part One: Relational Terminology Of course, we are still using Kroenke’s slide format! 1-1 Today’s Objectives • To understand the terminology of the relational model. • Properties of database relations • The meaning of entity integrity and referential integrity 1-2 The Relational Database Model • The dominant database model is the relational database model – all current major DBMS products are based on it • Created by IBM engineer E. F. Codd in 1970 • It was based on mathematics called relational algebra DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-3 The Relational Model • “The Relational Database Management System(RDBMS) has become the dominant data-processing software in use today, with estimated sales of between US$15 billion and US$20 billion per year,…, and growing at a rate of possibly 25% per year.” Connolly, Begg. P. 70 • A relation is viewed as a two dimensional table of data where columns are the attributes of the data and rows, or tuples, contain records of the user data. • Each row contains one piece of data per column. 1-4 Database Relations • Relation schema: A named relation defined by a set of attribute and domain pairs. [p.76] • Relational database schema: A set of relation schemas, each with a distinct name. [p. 76] 1-5 Properties of Relations • The relation has a name that is distinct from all other relation names in the relation schema • Each cell of the relation contains exactly one single value • Each attribute has a distinct name • The values of an attribute are all from the same domain • Each tuple is distinct • The order of attributes has no significance • The order of tuples has no significance • [p.77] 1-6 Relational Keys • Superkey: An attribute, or set of attributes, that uniquely identifies a tuple within a relation. • Candidate key: A superkey such that no proper subset is a superkey within the relation. • Primary key: The candidate key that is selected to identify tuples uniquely within the relation. • Foreign key: An attribute, or set of attributes, within one relation that matches the candidate key of some (possibly the same) relation. • [p.80] 1-7 Relational Integrity • Domain constraints form restrictions on the set of values allowed for the attributes of relations. • Null: Represents a value for an attribute that is currently unknown or is not applicable for this tuple. • Entity Integrity: No attribute of the primary key can be null. • Referential Integrity: If a foreign key exists in a relation, either the foreign key value must match a candidate key value of some tuple in its home relation or the foreign key value must be wholly null. 1-8 Thomas Connolly and Carolyn Begg’s Database Systems: A Practical Approach to Design, Implementation, and Management End of Presentation Of course, we are still using Kroenke’s slide format! 1-9