















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The relational data model, its structure, and data integrity controls such as domains, candidate and primary keys, and foreign keys. It provides examples and details on referential integrity, naming conventions, and more.
Typology: Slides
1 / 23
This page cannot be seen from the preview
Don't miss anything!
















Name Age John 23 Mary 20 Mark 18 Jane 21
Attributes
Scheme
Tuples
Name Age John 23 Mary 20 Mark 18 Jane 21
Attributes
Scheme
Tuples
John 23 Mary 20 Mark 18 Jane 21
Just numbers of columns
Tuples
ID Name Salary Department
M139 John Smith 18,000 Marketing M140 Mary Jones 22,000 Marketing A368 Jane Brown 22,000 Accounts P222 Mark Brown 24,000 Personnel A367 David Jones 20,000 Accounts
Attributes are ID, Name, Salary, and Department Degree is 4
Cardinality is 5
Tuples, e.g. { (ID, A368), (Name, Jane Brown), (Salary, 22,000), (Department, Accounts) }
Scheme is {ID, Name, Salary, Department}
ID First Last S139 John Smith S140 Mary Jones S141 John Brown S142 Jane Smith
Candidate key: {ID}; {First,Last} looks plausible but we may get people with the same name {ID, First}, {ID, Last} and {ID, First, Last} satisfy uniqueness, but are not minimal {First} and {Last} do not give a unique identifier for each row
Employee
ID Name Manager
E1496 John Smith E E1497 Mary Brown E E1498 Mark Jones E E1499 Jane Smith NULL
{ID} is a Candidate Key for Employee, and {Manager} is a Foreign Key, which refers to the same relation - every tuple’s Manager value is either NULL or matches an ID value
Department DID DName 13 Marketing 14 Accounts 15 Personnel
Employee EID EName DID 15 John Smith 13 16 Mary Brown 14 17 Mark Jones 13 18 Jane Smith NULL
Department DID DName 13 Marketing 14 Accounts 15 Personnel
Employee EID EName DID 15 John Smith 13 16 Mary Brown 14 17 Mark Jones 13 18 Jane Smith NULL