Session 2 Welcome: To the fourth learning sequence

Slides:



Advertisements
Similar presentations
High-Level Database Models Spring 2011 Instructor: Hassan Khosravi.
Advertisements

Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 Entity-Relationship Model Diagrams Class hierarchies Weak entity sets.
Chapter 4 Notes. Entity-Relationship Model E/R Diagrams Weak Entity Sets Converting E/R Diagrams to Relations.
Entity-Relationship Model. The process of designing a database begins with: –an analysis of what information the database must hold, and –the relationships.
System Concepts and Architecture Rose-Hulman Institute of Technology Curt Clifton.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Model
Entity-Relationship Data Model Alex Ostrovsky. Presentation Overview ► Short historical overview ► Elements of E-R Model ► Basic organization & relationships.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
1 The Entity-Relationship Data Model Chapter 2 (Database Design)
Murali Mani The Entity- Relationship Model. Murali Mani Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design.
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Entity-Relationship Data Model N. Harika Lecturer(csc)
CSET 3300 Databases & ER Data Models. Databases A database is a collection of data (information). A DataBase Management System (DBMS) is a software system.
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
Databases : Entity-Relationship Model 2007, Fall Pusan National University Ki-Joune Li These slides are made from the materials that Prof. Jeffrey D. Ullman.
1 Entity-Relationship Model Chapter 2 Copyright : Jeff Ullman + Hank Korth.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Entity-Relationship Model
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Databases 1 Fifth lecture. Entity-Relationship Model Diagrams Class hierarchies Weak entity sets From E/R diagrams to Relations 2.
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh
advanced data modeling
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Entity-Relationship Model E/R Diagrams Converting E/R Diagrams to Relations.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles.
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
A short revision on entity- relationship modelling.
 DEFINE THE ENTITY  IDENTIFY THE ENTITY TYPES AND SETS OF ENTITY  EXPLAIN THE ATTRIBUTE AND A VALUE SET  EXPLAIN E-R MODEL EXPLAIN THE FOLLOWING RELATIONSHIP.
A short review on entity- relationship modelling.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Database Design and Programming Jan Baumbach Adopted from previous slides of Peter Schneider-Kamp.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles Adapted from Jeffrey Ullman’s lecture.
Entity Relationship (E-R) Model
CS422 Principles of Database Systems Entity-Relationship Model
Hele-Mai Haav: CSC210-Spring*01 CSC230-Spring*03 Database Design.
Comp 1100 Entity-Relationship (ER) Model
Data Modeling Using the ERD
Entity-Relationship Model
Entity-Relationship Model
Entity-Relationship Model
Entity Relationship Model
Entity-Relationship Diagrams
Session 2 Welcome: The sixth learning sequence
Entity-Relationship Model
Constraints in Entity-Relationship Models
CPSC-310 Database Systems
Entity-Relationship Modeling
The Entity-Relationship Model
Instructor: Zhe He Department of Computer Science
The Entity-Relationship Model
CPSC-310 Database Systems
ERD’s REVIEW DBS201.
Entity-Relationship Model
Session 2 Welcome: The seventh learning sequence
Session 2 Welcome: The fifth learning sequence
Lecture 9: The E/R Model II
ITEC 3220A Using and Designing Database Systems
Chengyu Sun California State University, Los Angeles
MIS2502: Data Analytics Relational Data Modeling 2
Information System Design
Entity Relationship Model
Chapter 3: Multivalued Dependencies
Presentation transcript:

Session 2 Welcome: To the fourth learning sequence “ Entity-Relationship Model “ E-R Model Recap : In the previous learning sequences, we discussed the basic definitions of Data base subject. Present learning: We shall explore the following definitions: - Purpose of E-R MODEL. - E-R Diagram. - Entity & Attributes. - Relations.

Entity-Relationship Model 1 E-R Diagrams

Purpose of E/R Model The E/R model allows us to sketch the design of a database informally. Designs are pictures called entity-relationship diagrams. Fairly mechanical ways to convert E/R diagrams to real implementations like relational databases exist.

Entity Sets Entity = “thing” or object. Entity set = collection of similar entities. Similar to a class in object-oriented languages. Attribute = property of an entity set. Generally, all entities in a set have the same properties. Attributes are simple values, e.g. integers or character strings.

E/R Diagrams In an entity-relationship diagram, each entity set is represented by a rectangle. Each attribute of an entity set is represented by an oval, with a line to the rectangle representing its entity set.

Example Entity set Student has two attributes, name and Adviser. Each Student entity has values for these two attributes, e.g. (Ahmad, Kazem)

Relationships A relationship connects two or more entity sets. It is represented by a diamond, with lines to each of the entity sets involved.

Example Teachers name Number addr Courses code name teaches - Teachers are teaching some courses. Advises - Teachers advises some students. Takes - Students take some courses. Students addr name

Relationship Set The current “value” of an entity set is the set of entities that belong to it. Example: the set of all students in our database. The “value” of a relationship is a set of lists of currently related entities, one from each of the related entity sets.

Example For the relationship Teaches, we might have a relationship set like: Teachers Courses Ahmad C++ Samir Math Ahmad Java Amer Internet Samir Algorithms Jaber Math Ramez C++

Multiway Relationships Sometimes, we need a relationship that connects more than two entity sets. Suppose that students will only take certain courses taught by certain teachers. Our three binary relationships teaches, advises, and takes do not allow us to make this distinction. But a 3-way relationship would.

Example name addr name code Teachers Courses number Preferences Students name addr

A Typical Relationship Set Teacher Student Course Ahmad Issam C++ Ahmad Nour C++ Ahmad Nour Java Amer Issam Internet Samir Samar Math Samir Issam Math Samir Nader Algorithms

Many-Many Relationships Think of a relationship between two entity sets, such as Teaches between Teachers and Courses. In a many-many relationship, an entity of either set can be connected to many entities of the other set. E.g., a teacher teaches many courses; a course is taught by many teachers.

In Pictures: many-many

* Example of Many-Many Relationship A customer is associated with several (possibly 0) loans via borrower A loan is associated with several (possibly 0) customers via borrower

Many-One Relationships Some binary relationships are many -one from one entity set to another. Each entity of the first set is connected to at most one entity of the second set. But an entity of the second set can be connected to zero, one, or many entities of the first set.

In Pictures: many-one

Example Advises, from Teachers to Students is One-Many. A student has at most one adviser. But a teacher can be the adviser of any number of students, including zero.

* Example of Many-One relationship In a many-to-one relationship a loan is associated with several (including 0) customers via borrower, a customer is associated with at most one loan via borrower

One-One Relationships In a one-one relationship, each entity of either entity set is related to at most one entity of the other set. Example: Relationship Is-in between entity sets Teachers and Offices. A teacher cannot be in more than one office, and no office can have more than one teacher (assume this).

In Pictures: one-one

* Example of One-One relationship -A customer is associated with at most one loan via the relationship borrower A loan is associated with at most one customer via borrower

Representing “Multiplicity” Show a many-one relationship by an arrow entering the “one” side. Show a one-one relationship by arrows entering both entity sets.

Example Likes Students Courses Favorite

Attributes on Relationships Sometimes it is useful to attach an attribute to a relationship. Think of this attribute as a property of tuples in the relationship set.

Example Takes Students Course Date Date is a function of both the student and the course, not of one alone.

Roles Sometimes an entity set appears more than once in a relationship. Label the edges between the relationship and the entity set with names called roles.

Example Relationship Set Husband Wife Bob Ann Joe Sue … … Teachers … … Teachers Married husband wife

E-R Diagram Summary: In this learning sequence, we discussed the principles of Entity- Relationship diagram.

END