The Relational Model Lecture #2 Monday 21 st October 2001.

Slides:



Advertisements
Similar presentations
the Entity-Relationship (ER) Model
Advertisements

Database Systems: Design, Implementation, and Management Tenth Edition
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
CSC271 Database Systems Lecture # 22. Summary: Previous Lecture  Applying Database SDLC on DreamHome  Database planning  System definition  Requirements.
Systems Development Life Cycle
Text-Book Chapters (7 and 8) Entity-Relationship Model
Modeling the Data: Conceptual and Logical Data Modeling
Pertemuan Entity Relationship Diagram
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Lecture Eleven Entity-Relationship Modelling
Modeling Data The Entity Relationship Model (ER) For Database Design.
1–1 The E-R Model Prof. Sin-Min Lee Department of Computer Science.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Data Modeling Using the Entity-Relationship Model
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
the Entity-Relationship Model
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Modeling
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
Concepts and Terminology Introduction to Database.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Databases Illuminated Chapter 3 The Entity Relationship Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Chapter 15 & 16 Conceptual and Logical Database Design Methodology Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation.
1 Database Systems Entity Relationship (E-R) Modeling.
Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Data Modeling and the Entity-Relationship Model CS 475 Lecture Notes.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Data Modeling Using the Entity- Relationship (ER) Model
Entity-Relationship Modelling
Entity-Relationship Modeling
Entity Relationship Diagrams
Entity-Relationship Modeling
Chapter 4 Entity Relationship (ER) Modeling
Entity-Relationship Modelling
Presentation transcript:

The Relational Model Lecture #2 Monday 21 st October 2001

Communications Web page: All the slides and labs will be available on this intranet site

Textbook(s) Database Systems: A practical Approach to Design, implementation and Management Second Edition by Thomas Connolly and Carolyn Begg Edition Addison-Wesley

Designing a Database Lecture Outline The fundamental process What are we trying to do? Why do we need a model? Why the ER model? A concise approach to ER modelling What other models or methodologies might we use?

The Fundamental Process Figure out what the data is. Figure out what the users want to do with the data. Determine both the logical schema and the physical layout. bottom-up vs. top-down normalisation vs. ER modeling

DB Design Process Objectives Derive a logical description of the data. Understand the various ways in which the data is used. Identify the important or central data. Evaluate the relationships between data and how to decompose a design. Organise the data to facilitate the uses. Be reasonably efficient and allow for more efficiency of implementation.

DB Design Process Dangers The users don't really understand the data. Each user will give you a myopic view, hence it’s your job to reconcile the different views. Each individual description of the data must be complete and accurate. Existant data might be messed up: Fields have changed meaning Fields are used for multiple purposes There were data entry errors that were never corrected No one really knows what all the fields mean

Need for a Model Complexity of the data. The data and design will evolve over time: You want a history of this evolution. You want to be able to make changes without constantly dumping and loading your data. A graphic model enables easy understanding of the data and its relations. Good mental structuring will lead to good physical structure.

The ER Model Maps nicely into a relational data model. ENTITY, RELATIONSHIP, ATTRIBUTES  TABLES, COLUMNS Provides a set of terminology and a graphical display of the data. Square Box, Ellipse, Diamond, Line. Fairly simple to understand.

Conceptual Modeling address namelid Lecturer Mentors Takes Teaches Course Student name address quarter name studnb cid

Understanding the Terminology Entity Type & Entity Attributes & Attribute Domain and Keys Relationship Type & Relationship

Entity Type & Entity Entity Type: An object or concept that is identified by the enterprise as having an independent existence Entity: An instance of an entity type that is uniquely identifiable Representation An entity is represented by a rectangle Entity

Attributes Attribute: A property of an entity or a relationship type Attribute Domain A set of values that may be assigned to an attribute Representation An attirbute is represented by an ellipse {*} Attibute

Attribute Classification Simple Attribute –An attribute composed of a single component with an independent existence Composite Attribute –An attribute composed of multiple compnents, each with an independent existence Derive Attribute –An attribute that represents a value that is derivable from the values of a related attribute or set of attributes, not necessarily in the same entity. Derived attribute Compose d attribute Part 1 Part 2 Simple attribute

Key Attributes Candidate Key An attribute or set of attribute that uniquely identifies individual occurences of an entity type Primary Key The candidate key selected to be the primary key Composite Key A candidate key that consists of two or more attributes Representation The name of each primary key attribute is underlined Key

Relationship Type & Relationship Relationship Type: A meaningful association among entity types Relationship: An association of entities where the association includes one entity from each participating entity types Representation An relationship is represented by a diamond Relationship

Relationship Classification Relationship Degree The number of participating entities in a relationship e.g.: Binary, ternary, quaternary, etc… Recursive Relationship A relationship were the same entity participates more than once in different roles e.g.: Staff(doctor) supervises Staff(PhD wanna-be)

Attributes on Relationship All attributes that have been described can ben assigned to relationships. However be careful that the presence of one or more attibutes assigned to a relationship may indicate that the relationship conceals an unidentified entity. E.g.: Staff Student meets Meeting date comments

Structural Constraints Constraints reflect the restrictions on the relationships as they are perceived in the real world. We distinguish two different type of constraints: cardinality and participation constraints. Cardinality Ratio Describes the number of possible relationships for each particianting entity. The most common degree of relationships is binary and the cardinality ratio for binary relationships are one-to- one (1:1), one-to-many (1:M) and many-to-many (N;M)

Cardinality Constraints: (1:1) One-to-one relationships e.g.: A lecturer can be manage one-and-only-one course as well as a course can be managed by one- and-only-one lecturer at a time abcdabcd 11 OR

Cardinality Constraints: (1:M) One-to-many relationships e.g.: A student follows one course. But a course is taken by many students abcdabcd M1 OR

Cardinality Constraints: (N:M) Many-to-many relationships e.g.: A lecturer can teach many subjects. A subject can be tought by many lecturers abcdabcd MN OR

Participation Constraints Participation constraints Determines whether the existence of an entity depends upon it being related to another entity through the relationship Total participation constraints e.g.: A class can not exist without a student Partial participation constraint e.g.:A fullt-ime lecturer needs at least 9 hour to teach but cannot teach more than 24 hours. {N:M}  {9,24}

Other Modeling Techniques Object Definition Language [ODL] ODL helps in defining objects and interfaces. Properties of objects can be relationships. UML UML is widely used for system modeling and its starting to be widely accepted for data models {using class diagrams}. Merise used in France. {quite similar to ER}

Conclusions Make up your own summary of the ER notations Practice with simple examples Try to do the homework #1 Homework #1 will be available on macha.wit.ie on Wednesday!