chapter 3 - COP 4710: Database Systems Fall 2007 Chapter 3...

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

View Full Document Right Arrow Icon
COP 4710: Database Systems (Chapter 3) Page 1 Mark Llewellyn COP 4710: Database Systems Fall 2007 Chapter 3 – The Relational Data Model COP 4710: Database Systems Fall 2007 Chapter 3 – The Relational Data Model School of Electrical Engineering and Computer Science University of Central Florida Instructor : Dr. Mark Llewellyn markl@cs.ucf.edu HEC 236, 407-823-2790 http://www.cs.ucf.edu/courses/cop4710/fall2007
Background image of page 1

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

View Full DocumentRight Arrow Icon
COP 4710: Database Systems (Chapter 3) Page 2 Mark Llewellyn • The relational data model is based on the concept of mathematical relations. • Codd (the guy who proposed the relational model) was a trained mathematician and he used terminology taken from this discipline, primarily set theory and predicate logic. The Relational Data Model
Background image of page 2
COP 4710: Database Systems (Chapter 3) Page 3 Mark Llewellyn • Relation: A relation is a table (matrix) with rows and columns. Relations hold information about the objects modeled in the db. • Attribute: An attribute is a named column of a relation. An attribute is some characteristic of an entity (or relationship) that is modeled in the database. Attributes can appear in any order in a relation. • Domain: A domain is the set of allowable values for one or more attributes. Every attribute is defined on some domain. Domains may be distinct for each attribute, or two or more attributes may be defined on the same domain. The Relational Data Model (cont.)
Background image of page 3

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

View Full DocumentRight Arrow Icon
COP 4710: Database Systems (Chapter 3) Page 4 Mark Llewellyn • Tuple: A tuple is a row of a relation. Tuples can appear in any order in a relation and the relation will remain the same, and therefore convey the same meaning. • Degree: The degree of a relation is the number of attributes it contains. • Cardinality: The cardinality of a relation is the number of tuples it contains. • Relational database: A collection of normalized relations with distinct relation names. The Relational Data Model (cont.)
Background image of page 4
COP 4710: Database Systems (Chapter 3) Page 5 Mark Llewellyn An Example Relation 40000 34000 9999999 67000 90000 45000 salary 16-Dec-63 5-Jun-78 3-Jun-77 14-Mar-72 16-Nov-56 1-Oct-64 DOB manager manager driver cfo ceo manager position Bledsoe Thompson Schumacher Alonzo Spaude Chivotti lName Julie Keri Michael Debi Tod Kristy fName sx99 sd8 sf22 sn69 sa3 sn24 staffNo staff relation attributes degree cardinality
Background image of page 5

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

View Full DocumentRight Arrow Icon
COP 4710: Database Systems (Chapter 3) Page 6 Mark Llewellyn Example Domain Definitions select one from set: {ceo, cfo, coo,manager, asst. manager, driver, secretary} monetary: 7 digits, range 10,000- 9,999,999 date: range from 1-Jan-20, format: dd-mmm-yy character: size 20 character: size 4, must begin with letter s. Domain Definition set of all possible positions possible values of staff salaries date person was born set of all possible person names set of all possible staff numbers Meaning alljobs salaries date name staffnumbers Domain Name position salary DOB fName, lName staffNo Attribute
Background image of page 6
COP 4710: Database Systems (Chapter 3) Page 7 Mark Llewellyn Alternate Terminology for Relational Model field record file Alternative 2 column row table Alternative 1 attribute tuple relation Formal Term
Background image of page 7

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

View Full DocumentRight Arrow Icon
COP 4710: Database Systems
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 56

chapter 3 - COP 4710: Database Systems Fall 2007 Chapter 3...

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

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