SlideShare a Scribd company logo
1
EntityEntity
-Relationship-Relationship
ModelModel
Chapter 3
Unit II
Data Base Management System
[DBMS]
2
Using High-Level Conceptual Data Models for Database Design
Entity-Relationship (ER) model is a high-level conceptual data model.
overview of the database design process:
1st
step - Requirements collection and analysis.
- In this step, the database designers interviews database users to understand
and document their data requirements.
- The result of this step is a concisely written.
- These requirements should be specified in detailed and complete a form as possible.
- In parallel with the data requirements, the functional requirements are specified
for the application.
- The user defines the operations (or transactions) that will be applied to the
database, including both retrievals and updates.
Aruna (DSCASC)
3
Using High-Level Conceptual Data Models for Database Design (Cont.,)
 In software design, it is common to use data flow diagrams, sequence diagrams,
scenarios, and other techniques to specify functional requirements.
It is explained in detail in software engineering.
2nd
Step - Is to create a conceptual schema for the database, using a
high-level conceptual data model.
- This step is called conceptual design.
- The conceptual schema is a concise description of the data requirements of the
users and includes detailed descriptions of the entity types, relationships, and
constraints.
Aruna (DSCASC)
4
Using High-Level Conceptual Data Models for Database Design (Cont.,)
3rd
step – The database design is the actual implementation of the
database, using a commercial DBMS.
- The conceptual schema is transformed from the high-level data model into
the implementation data model.
- This step is called logical design or data model mapping.
4th
step - The physical design phase, during which the internal storage
structures, file organizations, indexes, access paths, and
physical design parameters for the database files are specified.
Aruna (DSCASC)
5
A diagram to illustrate the main phases of database
design.
Aruna (DSCASC)
6
An Example Database Application
 An example database application, called COMPANY.
 We list the data requirements for the database.
 The COMPANY database keeps track of a company’s employees, departments,
and projects.
The Company database:
1. The company is organized into departments.
Each department has a unique name, a unique number, and a particular employee who
manages the department.
We keep track of the start date when that employee began managing the department.
A department may have several locations.
2. A department controls a number of projects, each of which has a unique name, a unique
number, and a single location.
Aruna (DSCASC)
7
An Example Database Application (Cont.,)
3. We store each employee’s name, Social Security number,2 address, salary, sex (gender),
and birth date.
An employee is assigned to one department, but may work on several projects, which are
not necessarily controlled by the same department.
We keep track of the current number of hours per week that an employee works on each
project.
We also keep track of the direct supervisor of each employee (who is another employee).
4. We want to keep track of the dependents of each employee for insurance purposes.
We keep each dependent’s first name, sex, birth date, and relationship to the employee.
Aruna (DSCASC)
8
An Example Database Application (Cont.,)
Aruna (DSCASC)
9
Entity - Relationship Model (E-R Model)
An E-R diagram can express the overall logical structure of a
database graphically.
The ER model describes data as:
Entity
Attributes
Relationship
Aruna (DSCASC) 9
10Aruna (DSCASC) 10
Entities and Attributes:
 Entities are specific objects or things in the world that are represented in the
database.
Example: Specific person, employee, company, student, event.
 Attributes are properties used to describe an entity.
Example: An EMPLOYEE entity may have Name, SSN, Address, Designation,
Salary.
A specific entity will have a value for each of its attributes.
For example a specific employee entity may have Name='John Smith',
SSN='123456789', Address ='731, Houston, TX', BirthDate='09-JAN-75‘
Each attribute has a value set (or data type) associated with it – e.g. integer,
string, …
DefinitionsDefinitions
11Aruna (DSCASC) 11
Entities
Entity set is a set of entities of the same type that share the same
properties.
Example: set of all bank customers, companies, trees, holidays.
Entity Type defines a set of entities that have the same attributes.
Name of Entity: Employee Company
Attributes: Name, Age, Salary Name, Place
Entity set: E1: Rani, 22, 15000
E2: Vinay, 30, 20000
C1: ABC, Bangalore
C2: XYZ, Bangalore
Entity type, Attributes, Entity set
12Aruna (DSCASC) 12
Entity SetsEntity Sets customercustomer andand loanloan
customer customer customer customer loan amount
id name street city no.
13Aruna (DSCASC) 13
Key Attributes of an entity type
 A key attribute is a minimal set of attributes of an entity set, which uniquely
identifies an entity in an entity set.
 An entity type usually has one or more attributes whose values are distinct for each
individual entity in the entity set. Such an attribute is called a key attribute
 A key may be a single attribute or may be more than one attribute.
Example:
* For the student entity the RegNo can be the key attribute.
* For a person entity the SSN can be the key attribute.
 Some times key may be formed by the combination of several attributes – a
composite attribute. (ie., the combination of the attribute values must be distinct
for each individual entity.
Example: The registration no. for a vehicle with two two simple attributes, i.e.,
state number. and registration number
14Aruna (DSCASC) 14
Value Sets (Domains) of Attributes
Value Sets (Domains) of Attributes:
 A set of values that may be assigned to the attributes of each individual entity, in
an entity set is called the value set or domain.
Example:
* For employee entity, if age limit is 20 to 58 then the value set
(domain) of attribute age consists of integer from 20 to 58.
Age: Domain [ 20 – 58]
* The value set for name attribute is a set of alphabets and
some special characters.
Name: Domain [a – z], [A – Z], blank space, dot
15Aruna (DSCASC) 15
Relationship:
 A relationship relates two or more distinct entities with a specific meaning.
For example: CUSTOMER ‘Jones’ has Loan ‘L-23’ ….
Relationship Set:
 Relationships of the same type are grouped or typed into a relationship set / type.
For example: the ‘Borrower’ relationship type in which CUSTOMER and Loan participate.
 The degree of a relationship type is the number of participating entity sets.
Relationships and Relationship Set
16Aruna (DSCASC) 16
Relationship Set borrower
RelationshipsRelationships
18Aruna (DSCASC) 18
 Refers to number of entity sets that participate in a relationship set.
 Relationship sets that involve two entity sets are binary (or degree two).
Generally, most relationship sets in a database system are binary.
 Relationship sets may involve more than two entity sets.
 Relationships between more than two entity sets are rare. Most relationships are
binary.
 Relationship types of degree 3 are called ternary and of degree n are called n-ary
Degree of a Relationship Set
19Aruna (DSCASC) 19
An entity is represented by a set of attributes, that is descriptive.
Properties possessed by all members of an entity set.
Example:
customer = (customer_id, customer_name,
customer_street, customer_city )
loan = (loan_number, amount )
Domain – the set of permitted values for each attribute.
Attributes
20Aruna (DSCASC) 20
Attribute types
 Simple and Composite attributes:
If the attributes are not divided into subparts is called simple
If the attributes are divided into subparts is called composite.
Example: Simple- SSN or Gender
composite - Name
 Single-valued and Multi-valued attributes:
Example: Single valued - Age
Multi-valued attribute - phone-numbers, college degree
Employee dependant (1,or 2 or 3)
 Derived attributes:
Can be computed from other attributes
Example: Age given date of birth.
Experience giving date of join
 Null Attributes:
21Aruna (DSCASC) 21
Composite Attributes
 If the attributes are not divided into subparts is called simple.
 If the attributes are divided into subparts then composite.
22Aruna (DSCASC) 22
Express the number of entities to which another entity can be
associated via a relationship set.
Most useful in describing binary relationship sets.
For a binary relationship set the mapping cardinality must be one of
the following types:
 One to One
 One to Many
 Many to One
 Many to Many
Mapping Cardinality Constraints
23Aruna (DSCASC) 23
One to One: An entity in A is associated with at most one entity in B, and
an entity in B is associated with at most one entity in A.
One to Many: An entity in A is associated with any number of entities in B.
An entity in B, however can be associated with at most one entity in A.
24Aruna (DSCASC) 24
Many to One: An entity in A is associated with at most one entity in B, and an
entity in B is associated with any number of entities in A.
Many to Many: An entity in A is associated with any number of entities in
B. and n entity in B, is associated with any number of entities in A.
25
Basic E-R Notation
26
Mapping cardinality symbols
Aruna (DSCASC) 26
R
R
R
many-to-many relationship
many-to-one relationship
one-to-one relationship
27
Summary of Notation for ER Diagrams
 In ER diagrams the emphasis is on representing the schemas rather than the
instances.
 This is more useful in database design because a database schema changes rarely,
whereas the contents of the entity sets change frequently.
 The Example COMPANY ER database schema as an ER diagram.
ER diagram notation:
 Entity types such as EMPLOYEE, DEPARTMENT, and PROJECT are shown in
rectangular boxes.
 Relationship types such as WORKS_FOR, MANAGES, CONTROLS, and
WORKS_ON are shown in diamond-shaped boxes attached to the participating
entity types with straight lines.
28
Summary of Notation for ER Diagrams (cont.,)
 Attributes are shown in ovals, and each attribute is attached by a straight line to
its entity type or relationship type.
 Composite attribute are attached to the oval representing the composite
attribute, as illustrated by the Name attribute of EMPLOYEE.
 Multi valued attributes are shown in double ovals, as illustrated by the Locations
attribute of DEPARTMENT.
 Key attributes have their names underlined.
 Derived attributes are shown in dotted ovals, as illustrated by the
Number_of_employees attribute of DEPARTMENT.
29
Summary of Notation for ER Diagrams (cont.,)
 Weak entity types are distinguished by being placed in double rectangles and
by having their identifying relationship placed in double diamonds, as
illustrated by the DEPENDENT entity type and the DEPENDENTS_OF
identifying relationship type.
 The partial key of the weak entity type is underlined with a dotted line.
 The cardinality ratio of each binary relationship type is specified by attaching a
1, M, or N on each participating edge.
 The cardinality ratio of DEPARTMENT:EMPLOYEE in MANAGES is 1:1, whereas
it is 1:N for DEPARTMENT: EMPLOYEE in WORKS_FOR, and M:N for
WORKS_ON.
 The participation constraint is specified by a single line for partial
participation and by double lines for total participation.
30
Summary of Notation for ER Diagrams (cont.,)
 The role names for the SUPERVISION relationship type because the same
EMPLOYEE entity type plays two distinct roles in that relationship.
 Notice that the cardinality ratio is 1:N from supervisor to supervisee because
each employee in the role of supervisee has at most one direct supervisor,
whereas an employee in the role of supervisor can supervise zero or more
employees.
 Example - Slide 8
31
Proper Naming of Schema Constructs
 When designing a database schema, the choice of names for entity types, attributes,
relationship types, and (particularly) roles is not always straightforward.
 Choose names that convey, as much as possible, the meanings attached to the
different constructs in the schema.
 Choose a singular names for entity types, rather than plural ones.
 In the ER diagrams, we should use the convention that entity type and relationship
type names are uppercase letters, attribute names have their initial letter
capitalized, and role names are lowercase letters.
 Choose binary relationship names to make the ER diagram of the schema readable
from left to right and from top to bottom.
 Example: Company Database.
32Aruna (DSCASC) 32
Entity Set with a multi valued attribute, derived attribute & Primary Key
Derived
from date employed and current date
Primary Key
Multivalued:
an employee can have
more than one skill
Primary Key: An attribute or group of attributes that uniquely
identifies each row in a relation.
33Aruna (DSCASC) 33
E-R Diagram With Composite, Multi valued, and Derived Attributes
• Rectangles represent entity sets.
• Diamonds represent relationship sets.
• Lines link attributes to entity sets and entity sets to relationship sets.
• Ellipses represent attributes
• Double ellipses represent multi valued attributes.
• Dashed ellipses denote derived attributes.
• Underline indicates primary key attribute.
34Aruna (DSCASC) 34
E-R Diagrams
35Aruna (DSCASC) 35
Relationship Sets with Attributes
36Aruna (DSCASC) 36
One-To-Many Relationship
Many-To-One Relationship
37Aruna (DSCASC) 37
Many-To-Many Relationship
One-To-One Relationship
38
Relationship Types of Degree Higher than Two
39Aruna (DSCASC) 39
E-R Diagram with a Ternary Relationship
We allow at most one arrow out of a ternary (or greater degree) relationship to
indicate a cardinality constraint.
E.g. an arrow from works_on to job indicates each employee works on at most one
job at any branch.
41Aruna (DSCASC) 41
 An entity set that does not have a primary key is referred to as a weak entity set.
 The existence of a weak entity set depends on the existence of a Strong entity set
 Identifying weak entity set is represented with double-line rectangle.
 Identifying relationship is the relationship between Strong and weak entity sets
and it is represented by double diamond.
 The discriminator (or partial key) of a weak entity set is the set of attributes that
distinguishes among all the entities of a weak entity set.
 The primary key of a weak entity set is formed by the primary key of the strong
entity set on which the weak entity set is existence dependent, plus the weak
entity set’s discriminator.
Weak Entity & Strong EntityWeak Entity & Strong Entity
SetsSets
42Aruna (DSCASC) 42
Strong VS Weak Entities, and Identifying Relationships
Strong entities:
Exist independently of other types of entities
Has its own unique identifier
Represented with single-line rectangle
Weak entity:
Dependent on a strong entity…cannot exist on its own
Does not have a unique identifier
Represented with double-line rectangle
Identifying relationship:
Links strong entities to weak entities
Represented with double line diamond
43Aruna (DSCASC) 43
 We represent weak entity sets by double rectangles.
 We underline the discriminator of a weak entity set with a dashed line.
payment_number – discriminator of the payment entity set
Primary key for payment – (loan_number, payment_number)
Identifying relationship
44Aruna (DSCASC) 44
Strong entity Weak entityIdentifying relationship
Identifying Relationship
45Aruna (DSCASC) 45
 Entity sets of a relationship need not be distinct
 The labels “manager” and “worker” are called roles; they specify
how employee entities interact via the works_for relationship
set.
 Roles are indicated in E-R diagrams by labeling the lines that
connect diamonds to rectangles.
Roles
47
ER diagram college
48
E-R Diagram – Hospital with patients and doctors and log of tests
Aruna (DSCASC) 48
Name
AppointmentPatient Doctor
Patient-id
Name
ph
doctor-id
Address
Salary
Phone No
Address
P-D
Test
Test-name
Price
Test-date
49Aruna (DSCASC) 49
E-R Diagram for a Banking Enterprise
50Aruna (DSCASC) 50
E-R Diagram for books purchase
51Aruna (DSCASC) 51
E-R Diagram
52
E-R Diagram for Airlines reservation
53
E-R Diagram for
Electronic Distributor and Reseller Network Administration
54Aruna (DSCASC) 54
Specialization and Generalization
Extended E-R features
Specialization
Generalization
55
Specialization:
An entity set may include sub groupings of entities that are distinct in
some way from other entities. (i.e a subset of entities within an entity set may
have attributes that are not shared by all entities in the entity set.)
Generalization:
 Generalization is an abstraction mechanism, we can think of the reverse of the
specialization process.
 Several classes with common features are generalized into a super class; original
classes become its subclasses.
 Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become
subclasses of the super class VEHICLE.
 We can view {CAR, TRUCK} as a specialization of VEHICLE
 Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK
Aruna (DSCASC) 55
Specialization and Generalization
56Aruna (DSCASC) 56
ACCOUNT
account-no balance
SAVINGS ACCOUNT CURRENT ACCOUNT
High level entity
low level entity
interest rate
overdraft amount
STANDARD
GOLD
SENIOR
num checks
interest payment
date of birth
min balance
ISA
ISA
Savings A/C & Current A/C are
specialization of Account
A/C as Generalization of S
A/C & C A/C
Ad

More Related Content

What's hot (20)

DBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMSDBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMS
Mohammad Imam Hossain
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Free Open Source Software Technology Lab
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Literature Review: Security on cloud computing
Literature Review: Security on cloud computingLiterature Review: Security on cloud computing
Literature Review: Security on cloud computing
Suranga Nisiwasala
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
Kumar
 
Design notation
Design notationDesign notation
Design notation
ramya marichamy
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
Abhilasha Lahigude
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
 
Schema
SchemaSchema
Schema
Pragya Srivastava
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineering
rishi ram khanal
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
Nishant Munjal
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
Amr E. Mohamed
 
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentationEMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
AmayJaiswal4
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
koolkampus
 
software cost factor
software cost factorsoftware cost factor
software cost factor
Abinaya B
 
Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
نبيله نواز
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineering
kirupasuchi1996
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Literature Review: Security on cloud computing
Literature Review: Security on cloud computingLiterature Review: Security on cloud computing
Literature Review: Security on cloud computing
Suranga Nisiwasala
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
Kumar
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
Abhilasha Lahigude
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineering
rishi ram khanal
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
Nishant Munjal
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
Amr E. Mohamed
 
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentationEMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
AmayJaiswal4
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
koolkampus
 
software cost factor
software cost factorsoftware cost factor
software cost factor
Abinaya B
 
Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
نبيله نواز
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineering
kirupasuchi1996
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
RituBhargava7
 

Viewers also liked (20)

4. case study
4. case study4. case study
4. case study
khoahuy82
 
Airlines Database Design
Airlines Database DesignAirlines Database Design
Airlines Database Design
Shekhar K. Sharma
 
Project of Airline booking system
Project of Airline booking systemProject of Airline booking system
Project of Airline booking system
muthahar.sk
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
Tech_MX
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ARADHYAYANA
 
DataBase ch2
DataBase ch2DataBase ch2
DataBase ch2
ayman_alawin
 
Introduction to airline reservation systems
Introduction to airline reservation systemsIntroduction to airline reservation systems
Introduction to airline reservation systems
Java and .NET Architect
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
tameemyousaf
 
ER model
ER modelER model
ER model
paddu123
 
Mapping rules
Mapping rulesMapping rules
Mapping rules
Samir Sabry
 
Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013
Prosanta Ghosh
 
Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013
Prosanta Ghosh
 
Dbms ii mca-ch10-concurrency-control-2013
Dbms ii mca-ch10-concurrency-control-2013Dbms ii mca-ch10-concurrency-control-2013
Dbms ii mca-ch10-concurrency-control-2013
Prosanta Ghosh
 
E r diagrams
E r diagramsE r diagrams
E r diagrams
Samarth Gandhi
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
arnold 7490
 
Normalization case
Normalization caseNormalization case
Normalization case
Prosanta Ghosh
 
Online Airway Reservation System
Online Airway Reservation SystemOnline Airway Reservation System
Online Airway Reservation System
Hari Wiz
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
Prosanta Ghosh
 
File organization
File organizationFile organization
File organization
Gokul017
 
Dbms ii mca-ch1-ch2-intro-datamodel-2013
Dbms ii mca-ch1-ch2-intro-datamodel-2013Dbms ii mca-ch1-ch2-intro-datamodel-2013
Dbms ii mca-ch1-ch2-intro-datamodel-2013
Prosanta Ghosh
 
4. case study
4. case study4. case study
4. case study
khoahuy82
 
Project of Airline booking system
Project of Airline booking systemProject of Airline booking system
Project of Airline booking system
muthahar.sk
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
Tech_MX
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ARADHYAYANA
 
Introduction to airline reservation systems
Introduction to airline reservation systemsIntroduction to airline reservation systems
Introduction to airline reservation systems
Java and .NET Architect
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
tameemyousaf
 
Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013
Prosanta Ghosh
 
Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013
Prosanta Ghosh
 
Dbms ii mca-ch10-concurrency-control-2013
Dbms ii mca-ch10-concurrency-control-2013Dbms ii mca-ch10-concurrency-control-2013
Dbms ii mca-ch10-concurrency-control-2013
Prosanta Ghosh
 
Online Airway Reservation System
Online Airway Reservation SystemOnline Airway Reservation System
Online Airway Reservation System
Hari Wiz
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
Prosanta Ghosh
 
File organization
File organizationFile organization
File organization
Gokul017
 
Dbms ii mca-ch1-ch2-intro-datamodel-2013
Dbms ii mca-ch1-ch2-intro-datamodel-2013Dbms ii mca-ch1-ch2-intro-datamodel-2013
Dbms ii mca-ch1-ch2-intro-datamodel-2013
Prosanta Ghosh
 
Ad

Similar to Dbms ii mca-ch3-er-model-2013 (20)

U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
Tharindu Weerasinghe
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
CHANDRA BHUSHAN
 
A database is a means of storing information in such a way that information c...
A database is a means of storing information in such a way that information c...A database is a means of storing information in such a way that information c...
A database is a means of storing information in such a way that information c...
ronaldgreaves
 
Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
Prosanta Ghosh
 
Database Management System
Database Management System Database Management System
Database Management System
FellowBuddy.com
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
MaximusAranha
 
ER MODEL
ER MODELER MODEL
ER MODEL
Rupali Rana
 
Data Models and Relational Database Design.pptx
Data Models and Relational Database Design.pptxData Models and Relational Database Design.pptx
Data Models and Relational Database Design.pptx
niqqaanonymous211
 
"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles
EliasZerabruk
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
VisnuDharsini
 
Ch2
Ch2Ch2
Ch2
Welly Dian Astika
 
ER Model and other topics in DBMS
ER Model and other topics in DBMSER Model and other topics in DBMS
ER Model and other topics in DBMS
HarinarayananR2
 
Use analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptxUse analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptx
MwangaPrayGod
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
fikadumola
 
Chapter 3.pptxoop presentation goods one
Chapter 3.pptxoop presentation goods oneChapter 3.pptxoop presentation goods one
Chapter 3.pptxoop presentation goods one
mersimoybekele88
 
Data resource management
Data resource managementData resource management
Data resource management
Nirajan Silwal
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
ShivareddyGangam
 
Bca examination 2017 dbms
Bca examination 2017 dbmsBca examination 2017 dbms
Bca examination 2017 dbms
Anjaan Gajendra
 
U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
Tharindu Weerasinghe
 
A database is a means of storing information in such a way that information c...
A database is a means of storing information in such a way that information c...A database is a means of storing information in such a way that information c...
A database is a means of storing information in such a way that information c...
ronaldgreaves
 
Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
Prosanta Ghosh
 
Database Management System
Database Management System Database Management System
Database Management System
FellowBuddy.com
 
Data Models and Relational Database Design.pptx
Data Models and Relational Database Design.pptxData Models and Relational Database Design.pptx
Data Models and Relational Database Design.pptx
niqqaanonymous211
 
"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles
EliasZerabruk
 
ER Model and other topics in DBMS
ER Model and other topics in DBMSER Model and other topics in DBMS
ER Model and other topics in DBMS
HarinarayananR2
 
Use analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptxUse analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptx
MwangaPrayGod
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
fikadumola
 
Chapter 3.pptxoop presentation goods one
Chapter 3.pptxoop presentation goods oneChapter 3.pptxoop presentation goods one
Chapter 3.pptxoop presentation goods one
mersimoybekele88
 
Data resource management
Data resource managementData resource management
Data resource management
Nirajan Silwal
 
Bca examination 2017 dbms
Bca examination 2017 dbmsBca examination 2017 dbms
Bca examination 2017 dbms
Anjaan Gajendra
 
Ad

Recently uploaded (20)

Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 

Dbms ii mca-ch3-er-model-2013

  • 2. 2 Using High-Level Conceptual Data Models for Database Design Entity-Relationship (ER) model is a high-level conceptual data model. overview of the database design process: 1st step - Requirements collection and analysis. - In this step, the database designers interviews database users to understand and document their data requirements. - The result of this step is a concisely written. - These requirements should be specified in detailed and complete a form as possible. - In parallel with the data requirements, the functional requirements are specified for the application. - The user defines the operations (or transactions) that will be applied to the database, including both retrievals and updates. Aruna (DSCASC)
  • 3. 3 Using High-Level Conceptual Data Models for Database Design (Cont.,)  In software design, it is common to use data flow diagrams, sequence diagrams, scenarios, and other techniques to specify functional requirements. It is explained in detail in software engineering. 2nd Step - Is to create a conceptual schema for the database, using a high-level conceptual data model. - This step is called conceptual design. - The conceptual schema is a concise description of the data requirements of the users and includes detailed descriptions of the entity types, relationships, and constraints. Aruna (DSCASC)
  • 4. 4 Using High-Level Conceptual Data Models for Database Design (Cont.,) 3rd step – The database design is the actual implementation of the database, using a commercial DBMS. - The conceptual schema is transformed from the high-level data model into the implementation data model. - This step is called logical design or data model mapping. 4th step - The physical design phase, during which the internal storage structures, file organizations, indexes, access paths, and physical design parameters for the database files are specified. Aruna (DSCASC)
  • 5. 5 A diagram to illustrate the main phases of database design. Aruna (DSCASC)
  • 6. 6 An Example Database Application  An example database application, called COMPANY.  We list the data requirements for the database.  The COMPANY database keeps track of a company’s employees, departments, and projects. The Company database: 1. The company is organized into departments. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. 2. A department controls a number of projects, each of which has a unique name, a unique number, and a single location. Aruna (DSCASC)
  • 7. 7 An Example Database Application (Cont.,) 3. We store each employee’s name, Social Security number,2 address, salary, sex (gender), and birth date. An employee is assigned to one department, but may work on several projects, which are not necessarily controlled by the same department. We keep track of the current number of hours per week that an employee works on each project. We also keep track of the direct supervisor of each employee (who is another employee). 4. We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent’s first name, sex, birth date, and relationship to the employee. Aruna (DSCASC)
  • 8. 8 An Example Database Application (Cont.,) Aruna (DSCASC)
  • 9. 9 Entity - Relationship Model (E-R Model) An E-R diagram can express the overall logical structure of a database graphically. The ER model describes data as: Entity Attributes Relationship Aruna (DSCASC) 9
  • 10. 10Aruna (DSCASC) 10 Entities and Attributes:  Entities are specific objects or things in the world that are represented in the database. Example: Specific person, employee, company, student, event.  Attributes are properties used to describe an entity. Example: An EMPLOYEE entity may have Name, SSN, Address, Designation, Salary. A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name='John Smith', SSN='123456789', Address ='731, Houston, TX', BirthDate='09-JAN-75‘ Each attribute has a value set (or data type) associated with it – e.g. integer, string, … DefinitionsDefinitions
  • 11. 11Aruna (DSCASC) 11 Entities Entity set is a set of entities of the same type that share the same properties. Example: set of all bank customers, companies, trees, holidays. Entity Type defines a set of entities that have the same attributes. Name of Entity: Employee Company Attributes: Name, Age, Salary Name, Place Entity set: E1: Rani, 22, 15000 E2: Vinay, 30, 20000 C1: ABC, Bangalore C2: XYZ, Bangalore Entity type, Attributes, Entity set
  • 12. 12Aruna (DSCASC) 12 Entity SetsEntity Sets customercustomer andand loanloan customer customer customer customer loan amount id name street city no.
  • 13. 13Aruna (DSCASC) 13 Key Attributes of an entity type  A key attribute is a minimal set of attributes of an entity set, which uniquely identifies an entity in an entity set.  An entity type usually has one or more attributes whose values are distinct for each individual entity in the entity set. Such an attribute is called a key attribute  A key may be a single attribute or may be more than one attribute. Example: * For the student entity the RegNo can be the key attribute. * For a person entity the SSN can be the key attribute.  Some times key may be formed by the combination of several attributes – a composite attribute. (ie., the combination of the attribute values must be distinct for each individual entity. Example: The registration no. for a vehicle with two two simple attributes, i.e., state number. and registration number
  • 14. 14Aruna (DSCASC) 14 Value Sets (Domains) of Attributes Value Sets (Domains) of Attributes:  A set of values that may be assigned to the attributes of each individual entity, in an entity set is called the value set or domain. Example: * For employee entity, if age limit is 20 to 58 then the value set (domain) of attribute age consists of integer from 20 to 58. Age: Domain [ 20 – 58] * The value set for name attribute is a set of alphabets and some special characters. Name: Domain [a – z], [A – Z], blank space, dot
  • 15. 15Aruna (DSCASC) 15 Relationship:  A relationship relates two or more distinct entities with a specific meaning. For example: CUSTOMER ‘Jones’ has Loan ‘L-23’ …. Relationship Set:  Relationships of the same type are grouped or typed into a relationship set / type. For example: the ‘Borrower’ relationship type in which CUSTOMER and Loan participate.  The degree of a relationship type is the number of participating entity sets. Relationships and Relationship Set
  • 16. 16Aruna (DSCASC) 16 Relationship Set borrower RelationshipsRelationships
  • 17. 18Aruna (DSCASC) 18  Refers to number of entity sets that participate in a relationship set.  Relationship sets that involve two entity sets are binary (or degree two). Generally, most relationship sets in a database system are binary.  Relationship sets may involve more than two entity sets.  Relationships between more than two entity sets are rare. Most relationships are binary.  Relationship types of degree 3 are called ternary and of degree n are called n-ary Degree of a Relationship Set
  • 18. 19Aruna (DSCASC) 19 An entity is represented by a set of attributes, that is descriptive. Properties possessed by all members of an entity set. Example: customer = (customer_id, customer_name, customer_street, customer_city ) loan = (loan_number, amount ) Domain – the set of permitted values for each attribute. Attributes
  • 19. 20Aruna (DSCASC) 20 Attribute types  Simple and Composite attributes: If the attributes are not divided into subparts is called simple If the attributes are divided into subparts is called composite. Example: Simple- SSN or Gender composite - Name  Single-valued and Multi-valued attributes: Example: Single valued - Age Multi-valued attribute - phone-numbers, college degree Employee dependant (1,or 2 or 3)  Derived attributes: Can be computed from other attributes Example: Age given date of birth. Experience giving date of join  Null Attributes:
  • 20. 21Aruna (DSCASC) 21 Composite Attributes  If the attributes are not divided into subparts is called simple.  If the attributes are divided into subparts then composite.
  • 21. 22Aruna (DSCASC) 22 Express the number of entities to which another entity can be associated via a relationship set. Most useful in describing binary relationship sets. For a binary relationship set the mapping cardinality must be one of the following types:  One to One  One to Many  Many to One  Many to Many Mapping Cardinality Constraints
  • 22. 23Aruna (DSCASC) 23 One to One: An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A. One to Many: An entity in A is associated with any number of entities in B. An entity in B, however can be associated with at most one entity in A.
  • 23. 24Aruna (DSCASC) 24 Many to One: An entity in A is associated with at most one entity in B, and an entity in B is associated with any number of entities in A. Many to Many: An entity in A is associated with any number of entities in B. and n entity in B, is associated with any number of entities in A.
  • 25. 26 Mapping cardinality symbols Aruna (DSCASC) 26 R R R many-to-many relationship many-to-one relationship one-to-one relationship
  • 26. 27 Summary of Notation for ER Diagrams  In ER diagrams the emphasis is on representing the schemas rather than the instances.  This is more useful in database design because a database schema changes rarely, whereas the contents of the entity sets change frequently.  The Example COMPANY ER database schema as an ER diagram. ER diagram notation:  Entity types such as EMPLOYEE, DEPARTMENT, and PROJECT are shown in rectangular boxes.  Relationship types such as WORKS_FOR, MANAGES, CONTROLS, and WORKS_ON are shown in diamond-shaped boxes attached to the participating entity types with straight lines.
  • 27. 28 Summary of Notation for ER Diagrams (cont.,)  Attributes are shown in ovals, and each attribute is attached by a straight line to its entity type or relationship type.  Composite attribute are attached to the oval representing the composite attribute, as illustrated by the Name attribute of EMPLOYEE.  Multi valued attributes are shown in double ovals, as illustrated by the Locations attribute of DEPARTMENT.  Key attributes have their names underlined.  Derived attributes are shown in dotted ovals, as illustrated by the Number_of_employees attribute of DEPARTMENT.
  • 28. 29 Summary of Notation for ER Diagrams (cont.,)  Weak entity types are distinguished by being placed in double rectangles and by having their identifying relationship placed in double diamonds, as illustrated by the DEPENDENT entity type and the DEPENDENTS_OF identifying relationship type.  The partial key of the weak entity type is underlined with a dotted line.  The cardinality ratio of each binary relationship type is specified by attaching a 1, M, or N on each participating edge.  The cardinality ratio of DEPARTMENT:EMPLOYEE in MANAGES is 1:1, whereas it is 1:N for DEPARTMENT: EMPLOYEE in WORKS_FOR, and M:N for WORKS_ON.  The participation constraint is specified by a single line for partial participation and by double lines for total participation.
  • 29. 30 Summary of Notation for ER Diagrams (cont.,)  The role names for the SUPERVISION relationship type because the same EMPLOYEE entity type plays two distinct roles in that relationship.  Notice that the cardinality ratio is 1:N from supervisor to supervisee because each employee in the role of supervisee has at most one direct supervisor, whereas an employee in the role of supervisor can supervise zero or more employees.  Example - Slide 8
  • 30. 31 Proper Naming of Schema Constructs  When designing a database schema, the choice of names for entity types, attributes, relationship types, and (particularly) roles is not always straightforward.  Choose names that convey, as much as possible, the meanings attached to the different constructs in the schema.  Choose a singular names for entity types, rather than plural ones.  In the ER diagrams, we should use the convention that entity type and relationship type names are uppercase letters, attribute names have their initial letter capitalized, and role names are lowercase letters.  Choose binary relationship names to make the ER diagram of the schema readable from left to right and from top to bottom.  Example: Company Database.
  • 31. 32Aruna (DSCASC) 32 Entity Set with a multi valued attribute, derived attribute & Primary Key Derived from date employed and current date Primary Key Multivalued: an employee can have more than one skill Primary Key: An attribute or group of attributes that uniquely identifies each row in a relation.
  • 32. 33Aruna (DSCASC) 33 E-R Diagram With Composite, Multi valued, and Derived Attributes • Rectangles represent entity sets. • Diamonds represent relationship sets. • Lines link attributes to entity sets and entity sets to relationship sets. • Ellipses represent attributes • Double ellipses represent multi valued attributes. • Dashed ellipses denote derived attributes. • Underline indicates primary key attribute.
  • 34. 35Aruna (DSCASC) 35 Relationship Sets with Attributes
  • 35. 36Aruna (DSCASC) 36 One-To-Many Relationship Many-To-One Relationship
  • 36. 37Aruna (DSCASC) 37 Many-To-Many Relationship One-To-One Relationship
  • 37. 38 Relationship Types of Degree Higher than Two
  • 38. 39Aruna (DSCASC) 39 E-R Diagram with a Ternary Relationship We allow at most one arrow out of a ternary (or greater degree) relationship to indicate a cardinality constraint. E.g. an arrow from works_on to job indicates each employee works on at most one job at any branch.
  • 39. 41Aruna (DSCASC) 41  An entity set that does not have a primary key is referred to as a weak entity set.  The existence of a weak entity set depends on the existence of a Strong entity set  Identifying weak entity set is represented with double-line rectangle.  Identifying relationship is the relationship between Strong and weak entity sets and it is represented by double diamond.  The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set.  The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator. Weak Entity & Strong EntityWeak Entity & Strong Entity SetsSets
  • 40. 42Aruna (DSCASC) 42 Strong VS Weak Entities, and Identifying Relationships Strong entities: Exist independently of other types of entities Has its own unique identifier Represented with single-line rectangle Weak entity: Dependent on a strong entity…cannot exist on its own Does not have a unique identifier Represented with double-line rectangle Identifying relationship: Links strong entities to weak entities Represented with double line diamond
  • 41. 43Aruna (DSCASC) 43  We represent weak entity sets by double rectangles.  We underline the discriminator of a weak entity set with a dashed line. payment_number – discriminator of the payment entity set Primary key for payment – (loan_number, payment_number) Identifying relationship
  • 42. 44Aruna (DSCASC) 44 Strong entity Weak entityIdentifying relationship Identifying Relationship
  • 43. 45Aruna (DSCASC) 45  Entity sets of a relationship need not be distinct  The labels “manager” and “worker” are called roles; they specify how employee entities interact via the works_for relationship set.  Roles are indicated in E-R diagrams by labeling the lines that connect diamonds to rectangles. Roles
  • 45. 48 E-R Diagram – Hospital with patients and doctors and log of tests Aruna (DSCASC) 48 Name AppointmentPatient Doctor Patient-id Name ph doctor-id Address Salary Phone No Address P-D Test Test-name Price Test-date
  • 46. 49Aruna (DSCASC) 49 E-R Diagram for a Banking Enterprise
  • 47. 50Aruna (DSCASC) 50 E-R Diagram for books purchase
  • 49. 52 E-R Diagram for Airlines reservation
  • 50. 53 E-R Diagram for Electronic Distributor and Reseller Network Administration
  • 51. 54Aruna (DSCASC) 54 Specialization and Generalization Extended E-R features Specialization Generalization
  • 52. 55 Specialization: An entity set may include sub groupings of entities that are distinct in some way from other entities. (i.e a subset of entities within an entity set may have attributes that are not shared by all entities in the entity set.) Generalization:  Generalization is an abstraction mechanism, we can think of the reverse of the specialization process.  Several classes with common features are generalized into a super class; original classes become its subclasses.  Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become subclasses of the super class VEHICLE.  We can view {CAR, TRUCK} as a specialization of VEHICLE  Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK Aruna (DSCASC) 55 Specialization and Generalization
  • 53. 56Aruna (DSCASC) 56 ACCOUNT account-no balance SAVINGS ACCOUNT CURRENT ACCOUNT High level entity low level entity interest rate overdraft amount STANDARD GOLD SENIOR num checks interest payment date of birth min balance ISA ISA Savings A/C & Current A/C are specialization of Account A/C as Generalization of S A/C & C A/C