THE RELATIONAL DATA MODEL CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1.

Slides:



Advertisements
Similar presentations
Chapter 3 : Relational Model
Advertisements

Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
Chapter 3: Relational Model
1 Minggu 2, Pertemuan 3 The Relational Model Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
CS 405G: Introduction to Database Systems Lecture 4: Relational Model Instructor: Chen Qian.
Chapter 5 Relational Model Concepts Dr. Bernard Chen Ph.D. University of Central Arkansas.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Sets.
Data Modeling Using the Entity-Relationship Model
CS 380 Introduction to Database Systems (Chapter 5: The Relational Data Model and Relational Database Constraints)
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Module Title? DBMS E-R Model to Relational Model.
1 The Relational Data Model, Relational Constraints, and The Relational Algebra.
1 Introduction to modeling Relational modelling Slides for this part are based on Chapters 11 from Halpin, T. & Morgan, T. 2008, Information Modeling and.
Chapter 4 Rational data model. Chapter 5 Rational data model Chapter 4 Rational data model.
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
Relational Data Model. A Brief History of Data Models  1950s file systems, punched cards  1960s hierarchical  IMS  1970s network  CODASYL, IDMS 
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
Topic 5 The Relational Data Model and Relational Database Constraints Faculty of Information Science and Technology Mahanakorn University of Technology.
Instructor: Churee Techawut Basic Concepts of Relational Database Chapter 5 CS (204)321 Database System I.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 5 The Relational Data Model.
Lecture 02 The Relational Data Model. Advantages of Database.
10/9/20151 The Relational Data Model TCU Database Systems Last update: September 2004 Reference: Elmasri 4 th edition, chapter 5.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
Database System Concepts, 5 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Relational.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 3 Introduction to a First Course in Database Systems.
Chapter 2 Adapted from Silberschatz, et al. CHECK SLIDE 16.
METU Department of Computer Eng Ceng 302 Introduction to DBMS The Relational Data Model and Relational Database Constraints by Pinar Senkul resources:
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 5 The Relational Data Model and Relational Database Constraints.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 – Relational Model.
ICOM 5016 – Introduction to Database Systems Lecture 5b Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Chapter 6 The Relational Data Model and the Relational Algebra.
FALL 2004CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
Module Coordinator Tan Szu Tak School of Information and Communication Technology, Politeknik Brunei Semester
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Introduction.
1 CS 430 Database Theory Winter 2005 Lecture 4: Relational Model.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
COP Introduction to Database Structures
Relational Model Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 3.
Module 2: Intro to Relational Model
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Chapter 2: Relational Model
RELATION.
Chapter 2: Intro to Relational Model
The Relational Data Model
The Relational Data Model and Relational Database Constraints
02 - The Relational Database Model
Relational Model.
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Introduction to modeling
The Relational Data Model
Presentation transcript:

THE RELATIONAL DATA MODEL CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1

LECTURE OUTLINE  Relational Model Concepts  Relational Database Schemas  Update Operations  Brief History of Database Applications (from Section 1.7) 2

RELATIONAL MODEL CONCEPTS  Represent data as a collection of relations  Table of values Each row (tuple) Represents a record of related data values Facts that typically correspond to a real-world entity or relationship Each column (attribute) Holds a corresponding value for each row Slot for a specific interpretation for a row 3

RELATIONAL MODEL (CONT’D.)  Schema describes table Table name, attribute names and types  Instance denotes the current contents of the table The relation (or relation state) 4

DOMAINS  Domain D Set of atomic values {0,1,2,…} {Jo Smith, Dana Jones, Ashley Wong, Y. K. Lee,…}  Atomic Each value indivisible  Domain specified by Data type rather than by enumeration Integer, String, Date, Real, etc. Can be specified by format: (ddd)ddd-dddd 5

SCHEMAS AND ATTRIBUTES  Relation schema A relation name R and a list of attributes: A 1, A 2,..., A n Denoted by R(A 1, A 2,..., A n )  Attribute A i Name of a role in the relation schema R Associated with a domain dom(A i ) Attribute names do not repeat within relation schema, but domains can repeat.  Degree (or arity) of a relation Number of attributes n in its relation schema 6

FORMALIZATION  Relation (or relation state) Set of n-tuples r = {t 1, t 2,..., t m } Unordered, no duplicates Each n-tuple t Ordered list of n values t = Each value v i, 1 ≤ i ≤ n, is an element of dom(A i ) Instance of relation schema R(A 1, A 2, A 3, …, A n ) Finite subset of the Cartesian product of the domains defining R: rel(R) ⊆ (dom(A 1 ) × dom(A 2 ) ×... × dom(A n ))  Because of updates, relations are time-varying rel(R) is relation state at a given time Reflects only (and all) the valid tuples that represent a particular state of the real world 7

RELATIONAL MODEL NOTATION  Symbolic notation Uppercase letters Q, R, S denote relation names Corresponding lowercase letters q, r, s denote corresponding relation states Uppercase letters A, B, C, …, H denote attributes Attribute A can be qualified with the relation name R to which it belongs using the dot notation, e.g., R.A Lower case letters t, u, v denote tuples 8

ALTERNATIVE DEFN OF RELATION 9

VALUES IN TUPLES  Each value in a tuple is atomic Flat (as opposed to nested) relational model Composite and multivalued attributes not allowed Historically relation is said to be in First normal form (1NF)  Composite attributes Split into simple component attributes e.g., Waterloo, Ontario treated as atomic or split into two attributes to store Waterloo separately from Ontario  Multivalued attributes Must be represented by separate relations Recall: Director could be stored as attribute of FILM because only one director per film assumed, but multiple characters in a film implies that ROLE must have its own relation. 10

NULL VALUES  Assume each domain is augmented with a special NULL value Represent the values of attributes that may be unknown or may not apply to a tuple  Interpretations for NULL values Nothing is known about the value Value exists but is (currently) not available Value undefined i.e., attribute does not apply to this tuple If an attribute for a tuple is mapped to NULL, cannot make any assumptions about the value for that attribute (for that tuple) e.g., Ashley’s telephone number is NULL could mean Ashley doesn’t have a phone Ashley has a phone but we don’t know the number (perhaps withheld) Ashley has a phone that has no number Ashley may or may not have a phone, but regardless we don’t have a number for Ashley 11

MEANING OF A RELATION  Assertion Each tuple in the relation interpreted as a fact. No other similar facts are of interest to the enterprise. e.g., a relation for Classlist includes only registered students and all registered students are included in Classlist presence in list  registered student  Predicate Values in each tuple interpreted as values that satisfy predicate e.g., Name of student having ID is Lee Wong 12

LECTURE SUMMARY  Characteristics differentiate relations from ordinary tables or files  Schemas vs. instances (states)  Formal definitions for relations and tuples  Null values 13