1 Desing Database Systems. 2 Hierarchy database The structure of data is like a tree Parent-children relationship Pointers Central depot West depotEast.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

the Entity-Relationship (ER) Model
Modeling the Data: Conceptual and Logical Data Modeling
System Analysis - Data Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Conceptual Models Agenda - Steps in the design of a DB - Need for conceptual models - The Entity-Relationship Model (ER-Model)
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
Chapter 4 Entity Relationship (E-R) Modeling
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
APPENDIX C DESIGNING DATABASES
Things are bad. Children no longer obey their parents and everyone is writing a book. -- Marcus Tillius Cicero.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
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 Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Conceptual Data Modeling, Entity Relationship Diagrams
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Database Design Principles – Lecture 3
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Dr. Ahmad R. Hadaegh A.R. Hadaegh California State University San Marcos (CSUSM) Page 1 Entity Relational Diagram (ERD) Modeling This particular lecture.
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:
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Data Modelling Using Entity-Relationship (ER) Model
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
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.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
Lecture 5 Entity Relationship Modeling
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Business System Development
Entity-Relationship Model
CS4222 Principles of Database System
Entity- Relationship (ER) Model
Entity-Relationship Model
Entity Relationship Model
Entity Relationship (E-R) Modeling
Entity-Relationship Model
ER MODEL Lecture 3.
بسم الله الرحمن الرحيم.
Database Modeling using Entity Relationship Model (E-R Model)
Conceptual Data Modeling Using Entities & Relationships
Chapter 7: Entity-Relationship Model
Entity-Relationship Diagram (ERD)
Entity Relation Model Tingting Zhang.
Presentation transcript:

1 Desing Database Systems

2 Hierarchy database The structure of data is like a tree Parent-children relationship Pointers Central depot West depotEast depot GyőrPécsSzegedDebrecen

3 Net database Dairy collection Centre Area of FótArea of Tata Kiss János Nagy Béla Tóth Elek The data are connected to each other like a ring, and these rings are the net model. (graph)

4 Relations database You use databases to organize and relate tables You use databases to organize and relate tables Databases provide the architecture for storing your data and have additional benefits as well. Databases provide the architecture for storing your data and have additional benefits as well. More details in the next lecture More details in the next lecture

5 Goals of the database design process: understand your data and why you’re tracking it understand your data and why you’re tracking it eliminate duplication of data eliminate duplication of data eliminate redundant data eliminate redundant data eliminate meaningless data or data we don’t care about eliminate meaningless data or data we don’t care about promote accuracy of data promote accuracy of data promote consistency of data promote consistency of data make sure we can retrieve the information we need from the database make sure we can retrieve the information we need from the database support the business functions that use the database support the business functions that use the database build a database that lends itself to future growth build a database that lends itself to future growth

6 Entity Relationship Diagrams (ERD) What is an ERD? What is an ERD? An entity-relationship diagram is a data modeling technique that creates a graphical representation of the entities, and the relationships between entities, within an information system. data modelingdata modeling

7 Base Feaures of the ERD Simple, visual, graphical device Simple, visual, graphical device The models most important parts are the entities and the relationships The models most important parts are the entities and the relationships It is built from the attributes of the entities It is built from the attributes of the entities

8 Entity An An entity is an object or concept about which you want to store information.

9 The common description of the entity is a rectangle, which contains the name of the entity: Owner Dog Description of the Entities

10 Type of the Entities Entity An entity is an object or concept about which you want to store information Weak Entity A weak entity is dependent on another entity to exist.

11 Attributes Attributes Attributes are the properties or characteristics of an entity.

12 We can describe the attributes of the entity with a connecting ellipse: Person Name Date of birth Place of birth Sex Description of the Attributes

13 Types of the Attributes Attributes Attributes are the properties or characteristics of an entity. Attributes Attributes are the properties or characteristics of an entity. Key attribute A key attribute is the unique, distinguishing characteristic of the entity. For example, an employee's social security number might be the employee's key attribute. Key attribute A key attribute is the unique, distinguishing characteristic of the entity. For example, an employee's social security number might be the employee's key attribute.

14 Types of the Attributes A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill values. A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill values. Derived attribute A derived attribute is based on another attribute. For example, an employee's monthly salary is based on the employee's annual salary. Derived attribute A derived attribute is based on another attribute. For example, an employee's monthly salary is based on the employee's annual salary.

15

16 Relationships Relationships Relationships illustrate how two entities share information in the database structure.

17 We can describe the relationship of the entity with a rhombus. We can mark the type of the relationship as well. Man Dog has 1N If an entity takes part in a connection only partly, we describe it with single line, (Not all men have dogs), if it takes part totally we describe it with a bold line. ( We don’t respect the stray dogs) Description of the Relationships

18 Types of the Relationship Relationships Relationships illustrate how two entities share information in the database structure. Relationships Relationships illustrate how two entities share information in the database structure. Weak relationship To connect a weak entity with others, you should use a weak relationship notation. Weak relationship To connect a weak entity with others, you should use a weak relationship notation.

19 Cardinality Cardinality specifies how many instances of an entity relate to one instance of another entity.

20 Cardinality »1:1(wife-husband) »1: N(mother-children) »N:M(grandparents-grandchildren)

21 Examples - Relationship 1 Department may employ Many Employees 1 Employee only has one department Department Employees Employs 1N The diagram changes according to your real situation. Department Employees Employs MN You may also allow 1 Employee to work for Many Departments

22 Participation »Total participation Every child has a mother Every child has a mother »Partial participation Not every woman has a child Not every woman has a child

23 Example - Participation Every department must have at least one employee. An employee need not work for any department. Indicate partial participation by using Department Employees Employs 1N

24 Recursive relationship In some cases, entities can be self-linked. For example, employees can supervise other employees. Recursive relationship In some cases, entities can be self-linked. For example, employees can supervise other employees.

25 Students Courses ID LName FNameAddress CNumCName Description Relationship Take Entity Attributes

26 Simplified car selling model Car Type Years Price buy 1 Customer Address Name Driving licence N

27 Data Problems:- don’t give back the relationships - repeating data… We have to study….

28 buy 1 Car Type Years N Price sell 1 Extension of the model Customer Name Address Selling Customer Car N Date Driving licence