Question Which of the following plays an important role in representing information about the real world in a database? Explain briefly 1)DDL.

Slides:



Advertisements
Similar presentations
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Advertisements

The Entity-Relationship Model
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
1 541: Database Systems S. Muthu Muthukrishnan. 2 Overview of Database Design  Conceptual design: (ER Model is used at this stage.)  What are the entities.
1 Key Constraints Consider Works_In: An employee can work in many departments; a dept can have many employees. In contrast, each dept has at most one manager,
The Entity-Relationship (ER) Model
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
The Entity-Relationship Model
Comp3300/fall021 The Entity-Relationship Model Chapter 2 What are the steps in designing a database ? Why is the ER model used to create an initial design?
The Entity-Relationship Model
The Entity-Relationship Model Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
Conceptual Design and The Entity-Relationship Model
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
1 The Entity-Relationship Model Chapter 2. 2 Overview of Database Design  Conceptual design: (ER Model is used at this stage.) –What are the entities.
Modeling Your Data Chapter 2. Overview of Database Design Conceptual design: –What are the entities and relationships in the enterprise? – What information.
The Entity-Relationship Model
Conceptual Design Using the Entity-Relationship (ER) Model
The Entity- Relationship Model CS 186 Fall 2002: Lecture 2 R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move.
The Entity-Relationship (ER) Model CS541 Computer Science Department Rutgers University.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
ER continued, and ER to Relational Mappings R&G Chapters 2, 3 Lecture 22.
Modeling Your Data Chapter 2. Part II Discussion of the Model: Good Design/ Bad Design?
1 The Entity-Relationship Model Chapter 2. 2 Database Design Process  Requirement collection and analysis  DB requirements and functional requirements.
The Entity-Relationship Model. 421B: Database Systems - ER Model 2 Overview of Database Design q Conceptual Design -- A first model of the real world.
1 The Entity-Relationship Model Chapter 2. 2 Overview of Database Design  Conceptual design : (ER Model is used at this stage.)  What are the entities.
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
1 The Entity-Relationship Model Chapter 6. 2 Database Design Process  Requirement collection and analysis  DB requirements and functional requirements.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Chapter 2.  Conceptual design: (ER Model is used at this stage.) ◦ What are the entities and relationships in the enterprise? ◦ What information about.
CMPT 258 Database Systems The Entity-Relationship Model Part II (Chapter 2)
Christoph F. Eick: Designing E/R Diagrams 1 The Entity-Relationship Model Chapter 3+4.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
09/03/2009Lipyeow Lim -- University of Hawaii at Manoa 1 ICS 321 Fall 2009 Introduction to Database Design Asst. Prof. Lipyeow Lim Information & Computer.
Database Management Systems,1 Conceptual Design Using the Entity-Relationship (ER) Model.
1 Conceptual Design using the Entity- Relationship Model.
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
The Entity-Relationship (ER) Model. Overview of db design Requirement analysis – Data to be stored – Applications to be built – Operations (most frequent)
CSC 411/511: DBMS Design 1 1 Dr. Nan WangCSC411_L2_ER Model 1 The Entity-Relationship Model (Chapter 2)
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
Modeling Your Data Chapter 2 cs5421. Part II Discussion of the Model: Good Design/ Bad Design? cs5422.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
A short review on entity- relationship modelling.
Database Design: Conceptual Modeling with ER Model CENG 351.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Introduction to Database Design
COP Introduction to Database Structures
The Entity-Relationship Model
MODELS OF DATABASE AND DATABASE DESIGN
ER-to-Relational Mapping
The Entity-Relationship Model
The Entity-Relationship Model
Instructor: Elke Rundensteiner
From ER to Relational Model
The Entity-Relationship (ER) Model
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
Question Which of the following plays an important role in representing information about the real world in a database? Explain briefly 1)DDL.
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship (ER) Model
Presentation transcript:

Question Which of the following plays an important role in representing information about the real world in a database? Explain briefly 1)DDL 2)DML 3)Buffer manager 4)the data model

E-R Model Attribute Attribute Employees ssn name lot Attribute Entity

E-R Model dname did dbudget Department Attribute Attribute Attribute Entity

Figure. The Report_To Relationship Set name ssn lot Employees super-visor subor-dinate Reports_To Figure. The Report_To Relationship Set since name dname ssn lot did budget Employees Works_In Departments Figure. The Works_in Relationship set

E-R Model Figure. Key Constraint on Manages since lot name ssn dname did budget Manages Employees Departments Figure. Key Constraint on Manages

Mapping cardinality of a relationship 1-to-1 1-to Many Many-to-1 Many-to-Many

1-to-many

Many - 1

Many - many

Alternative Cardinality Specification

Department major offers faculty teaches Professor advisor enrollment Courses teaches Professor advisor enrollment Students

Department major offers faculty teaches Professor advisor enrollment Courses teaches Professor advisor enrollment Students

Participation Constraints since since name name dname dname ssn lot did did budget budget Employees Manages Departments Works_In since

Weak Entities name cost ssn lot pname age Employees Policy Dependents

ISA (`is a’) Hierarchies name ssn lot Employees hourly_wages hours_worked ISA contractid Hourly_Emps Contract_Emps

Aggregation name ssn lot Employees Monitors until started_on since dname pid pbudget did budget Projects Sponsors Departments

Entity vs. Attribute Figure. The Works_In4 Relationship Set from to name Employees ssn lot dname did budget Works_In4 Departments Figure. The Works_In4 Relationship Set name dname budget did ssn lot Employees Works_In4 Departments Duration from to Figure. The Works_In4 Relationship Set

Entity vs. Relationship since dbudget name dname ssn lot did budget Employees Manages2 Departments Figure. The Manages2 Relationship Set name ssn lot since dname Employees did budget Manages2 Departments ISA This fixes the problem! Managers dbudget Figure. The Manages2 Relationship Set

Binary vs. Ternary Relationships name Employees ssn lot pname age Covers Dependents Bad design Policies policyid cost <- Figure. Policies as an entity Set name Employees ssn lot pname age Dependents Purchaser Beneficiary Better design Figure. PolicyRevisited policyid cost Policies

Exercises 1)Explain the following terms briefly: attribute, domain, entity, relation-ship, entity set, relationship set, one-to-many relationship, many-to-many relationship, participation constraint, overlap constraint, covering constraint, weak entity set, aggregation, and role indicator

2) A university database contains information about professors (identified employee id No., or EIN) and courses (identified by courseid). Professors teach courses; each of the following situations ,concerns the Teaches relationship set. For each situation, draw an ER diagram that describes it (assuming no further constraints hold) i. Professors can teach the same course in several semesters, and each offering must be recorded. ii. Professors can teach the same course in several semesters, and only the most recent such offering needs to be recorded . (Assume this condition applies in all subsequent questions.) iii. Every professor must teach some course

iv. every professor teaches exactly one course (no more, no less). v. Every professor teaches exactly one course (no more, no less), and every course must be taught by some professor

vi. Now suppose that certain courses can be taught by a team of professors jointly, but it is possible that no one professor in a team can teach the course. Model this situation, introducing additional entity sets and relationship sets if necessary