Chapter 3
Chapter 3
Chapter Three
Data Mining Project on
“Prediction of Chronic Kidney Disease Using Data Mining Classification
Conceptual Techniques”Database Design
By
Yohans Samuel
Database Development Life Cycle
The major steps in database design are;
• Planning: is identifying information gap in an organization and propose a
• Implementation: the testing and deployment of the designed database for use.
3
Conceptual Database Design
• Conceptual design is the process of constructing a model of the information
used in an enterprise, independent of any physical considerations.
• It is the source of information for the logical design phase.
• Mostly uses an Entity Relationship Model to describe the data at this level.
• Conceptual design revolves around discovering and analyzing organizational
and user data requirements.
• The important activities are to identify :
• Entities
• Attributes
• Relationships
• Constraints
• Based on these components develop the ER model using ER diagrams
4
The Entity Relationship Diagram (ER Model)
Entity-Relationship modeling is used to represent conceptual view of the
database.
The main components of ER Modeling are:
• Entity:
• Corresponds to entire table, not row
• Represented by Rectangle
• Attributes:
• Represents the property used to describe an entity or a relationship
• Represented by Oval
• Relationships:
• Represents the association that exist between entities
• Represented by Diamond
• Constraints:
• Represent the constraint in the data
5
ER-Diagram Components
Entity
• Any thing real or abstract about which we want to store
Course
data
Entity types fall into five class
• Roles- Employee
• Events- Payment
• Location-Campus
• Tangible things-Book
• Concepts-course
Relationship
• A data relationship is a natural
association that exists between one
or more entities.
Example: employee process payment.
Attribute
• It is a characteristics of a particular entities
Example: Name , address
• An attribute that uniquely identifies one and
6
only one entity is called primary key
Developing an E-R Diagram
Before working on the conceptual design of the database, one has to know and
answer the following basic questions.
• What are the entities and relationships in the enterprise?
the database?
• What are the integrity constraints that hold? Constraints on each data with
there are different set of methods used during the analysis phase.
• These include information gathered by:
8
Developing an E-R Diagram…
• The basic E-R model is graphically depicted and presented for review.
• The process is repeated until the end users and designers agree that the E-R
9
Graphical Representations in ER Diagramming
10
Graphical Representations in ER Diagramming
11
Steps to create an ERD
12
Summary of notation for ER diagrams
13
Example:1
Build an ER Diagram for the following information:
A student record management system will have the following two basic data
object categories with their own features or properties:
• Student will have an Id, Name, DoB, Dep’t, Age, GPA and
14
Graphical Representations in ER Diagramming
Student
15
Example:2
Build an ER Diagram for the following information:
A Personnel record management system will have the following two basic data
object categories with their own features or properties:
• Employee will have an Id, Name, DoB, Age, address,Tel,Email ,and
16
Structural Constraints on Relationship
One-to-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
17
Structural Constraints on Relationship
18
Structural Constraints on Relationship
One-To-Many Relationships
19
Structural Constraints on Relationship
20
Structural Constraints on Relationship
Many-To-Many Relationship
21
Structural Constraints on Relationship
22
Participation of an Entity Set in a Relationship Set
• Participation constraint of a relationship is involved in identifying and setting the
mandatory or optional feature of an entity occurrence to take a role in a relationship.
There are two distinct participation constraints with this respect, namely: Total
Participation and Partial Participation
• Total participation: every tuple in the entity or relation participates in at least one
relationship by taking a role. This means, every tuple in a relation will be attached
with at least one other tuple. The entity with total participation in a relationship will
be connected to the relationship using a double line.
E.g. 1: Participation of EMPLOYEE in “belongs to” relationship with
DEPARTMENT is total since every employee should belong to a department.
Participation of DEPARTMENT in “belongs to” relationship with EMPLOYEE is
total since every department should have more than one employee.
23
Participation of an Entity Set in a Relationship Set
• Partial participation: some tuple in the entity or relation may not participate in
the relationship. This means, there is at least one tuple from that Relation not
taking any role in that specific relationship. The entity with partial
participation in a relationship will be connected to the relationship using a
single line.
24
Exercises
What is the cardinality and existence of each of the following relationships in
just the direction given? State any assumptions you have to make.
1. Student to degree
2. Child to parent
3. Player to team
25
Enhanced Entity Relationship Model (EER)
basic E-R model to overcome the basic problems of E-R model which is
called a connection traps.
EER Features
o Attribute Inheritance
26
Generalization
• Generalization is the process of defining a more general entity type from a set
27
Generalization
28
Specialization
• is the result of subset of a higher level entity set to form a lower level entity set.
29
Specialization
30
Sub classes and Super classes
super class.
• When one generalized Superclass has various subgroups with distinguishing features
and these subgroups are represented by specialized form, the groups are called
subclasses.
Super Class/ Super Type
• An entity type whose tuples share common attributes. Attributes that are shared by
all entity occurrences (including the identifier) are associated with the supertype i.e
the generalized entity 31
Relationship Between Superclass and Subclass
• The relationship between a superclass and any of its subclasses is called a
superclass/subclass or class/subclass relationship
• An instance can not only be a member of a subclass. i.e. Every instance of a subclass
is also an instance in the Superclass
• A member of a subclass is represented as a distinct database object, a distinct
record that is related via the key attribute to its super-class entity.
• The relationship between a subclass and a superclass is an “IS A” or “IS PART OF”
type.
• Subclass IS PART OF Superclass
• Manager IS AN Employee
• Superclass attributes are shared by all subclasses of that superclass
33
Attribute Inheritance
• An entity that is a member of a subclass inherits all the attributes of the entity as
unique identifier attribute (primary key). i.e. The primary key of the superclass
and subclasses are always identical.
34
Attribute Inheritance
35
Constraints on specialization and generalization
Based on Definition
• Predicate Defined Subclass
Based of Membership
• Disjoint Subclass
• Overlapping Subclass
• Partial Specialization
36
Constraints on specialization and generalization
belongs by placing a condition on some attribute in the superclass and this attribute is
called “Defining Attribute”.
Example: – JobType is an attribute of superclass “Employee”, based on the value of this
38
Constraints on specialization and generalization
Completeness Constraint.
• The Completeness Constraint addresses the issue of whether or not an occurrence of a
39
Constraints on specialization and generalization
40
Constraints on specialization and generalization
Disjointness Constraints.
Specifies the rule whether one entity occurrence can be a member of more than one subclasses.
inside the circle on the Generalization Hierarchy portion of the E-R diagram.
41
Constraints on specialization and generalization
42
Thank You!
Project Titles
• Database Design - Phase I - May 11,2023
• Database Implementation - Phase II - Before class end