Relational Database Model PDF

Document Details

IntelligentIdiom

Uploaded by IntelligentIdiom

Al al-Bayt University

2011

Ramez Elmasri and Shamkant Navathe

Tags

database relational database data model computer science

Summary

This document is Chapter 3 of a textbook on database systems, focusing on relational data models and constraints. The chapter introduces fundamental concepts, using examples and diagrams throughout. The authors are Ramez Elmasri and Shamkant Navathe with Pearson, 2011.

Full Transcript

Chapter 3 The Relational Data Model and Relational Database Constraints Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Relational Data Model and Relational Database Constraints  A Relation is a mathematical concept based on the ideas of sets...

Chapter 3 The Relational Data Model and Relational Database Constraints Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Relational Data Model and Relational Database Constraints  A Relation is a mathematical concept based on the ideas of sets  The model was first proposed by Dr. E.F. Codd of IBM Research in 1970  First commercial implementations available in early 1980s  Has been implemented in a large number of commercial system Copyright © 2011 Ramez Elmasri and Shamkant Navathe Relational Model Concepts  Represents data as a collection of relations  Informally, a relation looks like a table of values  Table of values  Row Represents a collection of related data values Fact that typically corresponds to a real-world entity or relationship  In the formal model, rows are called tuples  Table name and column names Interpret the meaning of the values in each row attribute Copyright © 2011 Ramez Elmasri and Shamkant Navathe Relational Model Concepts (cont’d.) Copyright © 2011 Ramez Elmasri and Shamkant Navathe Domains, Attributes, Tuples, and Relations  Domain D  Set of atomic values  Atomic  Each value indivisible  Specifying a domain  Data type specified for each domain Copyright © 2011 Ramez Elmasri and Shamkant Navathe Informal Definitions  Key of a Relation:  Each row has a value of a data item (or set of items) that uniquely identifies that row in the table Called the key  In the STUDENT table, SSN is the key  Sometimes row-ids or sequential numbers are assigned as keys to identify the rows in a table Called artificial key or surrogate key Slide 5- 6 Copyright © 2011 Ramez Elmasri and Shamkant Navathe Domains, Attributes, Tuples, and Relations (cont’d.)  Relation schema R  Denoted by R(A1, A2,...,An)  Made up of a relation name R and a list of attributes, A1, A2,..., An  Attribute Ai  Name of a role played by some domain D in the relation schema R  Degree (or arity) of a relation  Number of attributes n of its relation schema Copyright © 2011 Ramez Elmasri and Shamkant Navathe Domains, Attributes, Tuples, and Relations (cont’d.)  Relation (or relation state)  Set of n-tuples r = {t1, t2,..., tm}  Each n-tuple t Ordered list of n values t =

Use Quizgecko on...
Browser
Browser