Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.

Slides:



Advertisements
Similar presentations
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Advertisements

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
The Relational Database Model – some relations you might want to avoid!!!
The Relational Database Model
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
Concepts of Database Management Sixth Edition
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
1 6 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Information Resources Management February 13, 2001.
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Concepts of Database Management Seventh Edition
Thomas Connolly and Carolyn Begg’s
Database Design & ER Diagrams
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Database Systems Relational Model Concepts Toqir Ahmad Rana Database Management Systems 1 Lecture 17.
Database Architecture The Relational Database Model.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
Content Resource- Elamsari and Navathe, Fundamentals of Database Management systems.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Concepts and Terminology Introduction to Database.
Fundamentals of Relational Database Yong Choi School of Business CSUB, Bakersfield.
Instructor: Churee Techawut Basic Concepts of Relational Database Chapter 5 CS (204)321 Database System I.
Concepts of Database Management Eighth Edition Chapter 6 Database Design 2: Design Method.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
Chapter 9 Constraints. Chapter Objectives  Explain the purpose of constraints in a table  Distinguish among PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK,
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
12/2/2015CPSC , CPSC , Lecture 41 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.
Copyright © 2011 by Michael V. Mannino All rights reserved. Database Design, Application Development, and Administration, 5 th Edition Quiz G4 Hyunwoo.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Logical Database Design and the Relational Model.
Chapter 3: Relational Databases
Lecture 03 Constraints. Example Schema CONSTRAINTS.
Howard Paul. Sequential Access Index Files and Data File Random Access.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
IT 5433 LM2 ER & EER Model. Learning Objectives: Explain importance of data modeling Define and use the entity-relationship model Define E/R terms Describe.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Logical Database Design and the Rational Model
Tables & Relationships
Database Constraints Ashima Wadhwa.
Chapter 5 Database Design
Chapter 4: Logical Database Design and the Relational Model
CIS 207 The Relational Database Model
Lecture # 13 (After 1st Exam)
COS 346 Day 8.
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Presentation transcript:

Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values for a given entity –Each row is distinct –Order of columns (and rows) is immaterial –Cells are single valued

Terminology

Relationships An association between entities Unary (recursive) Binary –One to Many or Many to Many Ternary Quaternary

Binary Relationships One to one –Each row in a table has at most one matching row in another table One to many Many to many –A row in the first table matches many rows in the second and a row in the second matches many rows in the first

Keys Superkey –an attribute or a set of attributes that uniquely identifies a row within a table Candidate –unique and irreducible identifier of a row, for all time (minimal superkey) Primary –chosen candidate key for a table Alternate

Keys (continued) Secondary –an attribute used for sorting and retrieval Composite –a key made of more than one attribute Foreign –used to designate relationships

Database Design Language (DBDL) Include all attributes (separated by commas) within parentheses with the name of the table outside the parentheses Underline the primary keys List any alternate, secondary and foreign keys identified by the letters AK, SK and FK respectively Foreign keys are followed by an arrow pointing to the relation identified by the foreign key

Representing Relationships One to one –create a foreign key One to many –place primary key of parent in child table Many to many –Break into two one to many relationships

Student # Name Major Student # Course # Grade Course # Name Instructor StudentGradeCourse

Entity Relationship Design Determine potential entities (rectangles) Identify relationships (diamonds) between entities Identify the attributes (ovals) of the entities –(and the attributes for any M:N relationships) Identify the primary keys

Entity-Relationship Diagram First

Symbols for Columns

Integrity rules Entity integrity –No column that is part of the primary key may accept null values. Referential integrity –If table A contains a foreign key that matches the primary key of table B, then values of this foreign key either must match the value of the primary key for the same row in table B or must be null.

Integrity Services Domain integrity –ensures that values assigned to a field are in that field’s domain Relation integrity –ensures that related fields are in the same level of update

Referential Constraints Cascading Updates Option If the value of the primary key in the primary (referenced) table is changed, then all values of the appropriate foreign key in the related (referencing) table are automatically changed to the new value Cascading Deletes Option If you delete a record in the primary (referenced) table, then all records in the related (referencing) table that have matching foreign key values will also be deleted

Main/Subforms First define the 1:N relationship between the tables Create a main form for data from the primary table Create a subform for the data from the related table (Similarly you can display records from the related table as a sub-datasheet in the primary table’s datasheet)

Assignment 2 MS Access 2000 Page AC 4.33 #6-9 (first set up a relationship between the tables)