SlideShare a Scribd company logo
Database Design
Database design process can be
broken down into 5 phases
• Planning
• Analysis
• Design
• Implementation
• Maintenance
Planning Phase
In planning phase the overall Database
structure is defined. Therefore;
• The purpose of the database is determined
– What information will be used in the Database
– How information is to be used
– What question will be Answered
• Feasibility studies are conducted.
• Requirements gathering
Analysis phase
Databases can be analyzed on different models
• Conceptual-model
– High-level description of facts
– Not system specific
• Logical model
– Organization of data with some implementation information
• Physical model
– Actual storage of information (clustering, partitioning,
indexing etc.)
Conceptual model
• Provide a framework for developing a
database structure.
• Three database components (entities,
attributes and relationship) are
described in detail.
Entities
• An entity defines a thing that exists and is
distinguishable. i.e Person, place, object or
concept.
• Entities are basic building blocks of the
database design.
• particular occurrence of an entity is known as
entity instance.
• A group of similar entities is called entity set or
entity class
Attributes
Attributes describe properties of entities and
relationships
• Simple (Scalars) - smallest semantic unit of data,
atomic (no internal structure)- singular e.g. city
• Composite - group of attributes e.g. address (street,
city, state, zip)
• Multivalued (list) - multiple values e.g. degrees,
courses, skills (not allowed in first normal form)
• Domain - conceptual definition of attributes
– a named set of scalar values all of the same type e.g. integer
a pool of possible values
Relationships
A relationship is a connection between entity classes.
For example, a relationship between PERSONS and
AUTOMOBILES could be an "OWNS" relationship.
That is to say, people own automobiles.
• The degree of a relationship indicates the number of entities
involved.
• The cardinality of a relationship indicates the number of
instances in entity class E1 that can or must be associated
with instances in entity class E2
Types of Relationship
Based on cardinality of a relationship, we have 3
types: -
• One-One Relationship - For each entity in one class there is at most one
associated entity in the other class. For example, for each husband there is
at most one current legal wife (in this country at least). A wife has at most
one current legal husband.
• Many-One Relationships - One entity in class E2 is associated with zero or
more entities in class E1, but each entity in E1 is associated with at most
one entity in E2. For example, a woman may have many children but a
child has only one birth mother.
• Many-Many Relationships - There are no restrictions on how many entities
in either class are associated with a single entity in the other. An example
of a many-to-many relationship would be students taking classes. Each
student takes many classes. Each class has many students.
Logical model
• After validating your conceptual mode,
you can generate a logical model
– Entity Classes are modeled as tables
– Attributes are modeled as fields
– Each instance of an entity is called a record
– Domain are modeled as Data types
– Primary keys for each table
– Foreign keys for relationship
Physical –model
• How data will be stored and accessed in a
computer system.
• Where data will be stored
• Estimate the amount of disk space that will be
required by the database.
• How data will be distributed within an
organization or disks
• type of indexes to be used (for efficient
retrieval and manipulation).
Design Phase
Determine how best to represent the
information system that was identified in the
previous phase
Mapping Logical Model and physical model
into reality.
– Database Management system (DBMS) to
be used.
– User Views (input forms, output reports)
– Security Mechanisms etc.
Implementation phase
Actual implementation of the database and
associated programming.
• Database is analyzed for possible errors
• Tables are created with few records for
sample to see if the desired results are
achieved
• Fine adjustments as needed
Entity Relationship Model
• Conceptual data model that views the real
world as entities and relationships.
• A basic component of the model is the
Entity-Relationship diagrams (ERDs),
• (ERDs) provides a convenient method for
visualizing the interrelationships among
entities in a given application
The utility of the ER model is:
• It maps well to the relational database
model..
• It is simple and easy to understand with
a minimum of training.
• the model can be used as a design plan
by the database developer to implement
a data model in specific database
management software.
Basic Elements in E-R Modeling
The basic elements in ER modal are
• entities
• attributes and
• Relationships.
Entities
• Data object about which information is to be
collected.
• Some specific examples of entities are
EMPLOYEE, PROJECT, INVOICE.
• An entity occurrence (also called an instance)
is an individual occurrence of an entity.
• Entity set: a collection of similar
entities (employees, projects,
departments)
Attributes
• describe the entity of which they are associated.
• A particular instance of an attribute is a value.
• Attributes can be classified as identifiers or
descriptors.
• Identifiers, more commonly called keys,
uniquely identify an instance of an entity.
• A descriptor describes a non-unique
characteristic of an entity instance.
Relationships
• Represents an association between two or
more entities. An example of a relationship
would be:
employees are assigned to projects
projects have subtasks
departments manage one or more projects
• Relationships are classified in terms of
– degree,
– connectivity,
– cardinality,
– and existence.
Classifying Relationships
Degree of a Relationship
• number of entities associated with the relationship.
 A UNARY RELATIONSHIP exists when an
association exists within a single entity
 A BINARY RELATIONSHIP exists when two
entities(participants) are in the relationship.
 A TERNARY RELATIONSHIP exists when three
entities (participants) are in the relationship.
Classifying Relationships
The connectivity
– describes the mapping of associated entity
instances in the relationship.
– The values of connectivity are "one" or "many".
– The basic types of connectivity for relations are:
one-to-one, one-to-many, and many-to-many.
The cardinality
– actual number of related occurrences for each of
the two entities.
Classifying Relationships
Existence
• denotes whether the existence of an entity instance is
dependent upon the existence of another, related,
entity instance.
• Defined as either mandatory or optional.
– For mandatory existence an instance of an entity must
always occur. "every project must be managed by a single
department".
– For optional existence the instance of the entity is not
required or may occur
ER Notation
• There is no universal standard for
representing data objects in ER
diagrams.
• Number of Notation styles is used
today, among the more common are
information Engineering, Bachman,
Chen and Martin.
ER Notation
Martin Style.
• Entities are represented by labeled rectangles. The label is the
name of the entity. Entity names should be singular nouns.
• Relationships are represented by a solid line connecting two
entities. The name of the relationship is written above the line.
Relationship names should be verbs.
• Attributes, when included, are listed inside the entity
rectangle. Identifier Attributes are underlined. Attribute names
should be singular nouns.
• Cardinality of many is represented by a line ending in a crow's
foot. If the crow's foot is omitted, the cardinality is one.
•
Existence is represented by placing a circle or a perpendicular
bar on the line. Placing a bar line next to the entity shows
mandatory existence. Placing a circle next to the entity shows
optional existence.
Martin Style.
ER Notation
Chen Style
• Rectangles represent ENTITY CLASSES
• Circles represent ATTRIBUTES
• Diamonds represent RELATIONSHIPS
• Lines - lines connect entities to relationships. Lines are
also used to connect attributes to entities.
• Underline - Key attributes of entities are underlined.
• Number Notations represents cardinality.
• The name of the entity (class) or attribute or relationship is
usually placed inside the symbol used for that object.
(Sometimes, the name is placed adjacent.)
•
Chen Style
Refining The Entity-Relationship Diagram
This section discusses four basic rules for
modeling relationships
1. Entities Must Participate In
Relationships
– Entities cannot be modeled unrelated to
any other entity.
– The exception to this rule is a database
with a single table.
Refining The Entity-Relationship Diagram
2. Resolve Many-To-Many Relationships
– Many-to-many relationships cannot be used in
the data model because they cannot be
represented by the relational model.
– must be resolved early in the modeling process.
– replace the relationship with an association
entity and then relate the two original entities to
the association entity
This strategy is demonstrated below Figure below: -
Here
Employees may be assigned to many projects.
Each project must have assigned to it more than one employee.
Refining The Entity-Relationship Diagram
3. Transform Complex Relationships into Binary
Relationships
• Complex relationships are classified as ternary, an association
among three entities, or n-ary, an association among more than
three, where n is the number of entities involved.
• cannot be directly implemented in the relational model.
• so they should be resolved early in the modeling process.
• The strategy for resolving complex relationships is similar to
resolving many-to-many relationships.
• Replace the complex relationship with an association entity and
then relate the two original entities to the association entity
Here is an example
Employees can use different skills on any one or more projects.
Each project uses many employees with various skills.
Refining The Entity-Relationship Diagram
4. Eliminate redundant relationships
– A redundant relationship is a relationship
between two entities that is equivalent in
meaning to another relationship between
those same two entities.
For example,
Figure A shows a redundant relationship between DEPARTMENT and
WORKSTATION.
This relationship provides the same information as the relationships DEPARTMENT
has EMPLOYEES and EMPLOYEEs assigned WORKSTATION.
Figure B shows the solution which is to remove the redundant relationship
DEPARTMENT assigned WORKSTATIONS.
Tips for Effective ER Diagrams
• Make sure that each entity only appears once per
diagram.
• Name every entity, relationship, and attribute on your
diagram.
• Examine relationships between entities closely. Are
they necessary? Are their any relationships missing?
Eliminate any redundant relationships. Don't connect
relationships to each other.
• Use colors to highlight important portions of your
diagram
Normalization
• Normalization is the process of refining a database
design to produce table schemes in normal form.
• A normal form refers to a class of relational schemas that
obey some set of rules.
• Schemas that obey the rules are said to be in the normal
form.
• Non–normal form is where data may recur repetitively.
• Normalization is aiming at minimizing redundancy in
database
Classifying normal forms
• There are six commonly recognized
normal forms, with the inspired names:
– First normal form (or 1NF)
– Second normal form (or 2NF)
– Third normal form (or 3NF)
– Boyce-Codd normal form (or BCNF)
– Fourth normal form (or 4NF)
– Fifth normal form (or 5NF)
• We will consider the first three of these
normal forms
First normal form (or 1NF)
A relation is in First Normal Form (1NF) if
every attribute value is indivisible (atomic)
and every column is unique.
• First normal form (1NF) sets the very basic
rules for an organized database:
– Eliminate duplicative columns from the same table.
– Create separate tables for each group of related data
and identify each row with a unique column or set of
columns (the primary key).
Second normal form (or 2NF)
A relation is in Second Normal Form (2NF) if it is in
1NF and if all of its attributes are dependent on the
whole key (i.e. none of the non-key attributes are
related only to a part of the key).
• Second normal form (2NF) further addresses
the concept of removing duplicative data:
– Remove subsets of data that apply to multiple rows
of a table and place them in separate tables.
•     Create relationships between these new tables and
their predecessors through the use of foreign keys.
Third normal form (or 3NF)
A relation is in Third Normal Form (3NF) if it is in 2NF
and there are no transitive dependencies (i.e. none of
the non-key attributes are dependent upon another
attribute which in turn is dependent on the relation
key).
• Third normal form (3NF) goes one large step
further:
Remove columns that are not dependent upon the
primary key.
Fourth normal form (or 4NF)
• A relation is in 4NF if it has no
multi-valued dependencies.

More Related Content

What's hot

Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Rai University
 
DataBase ch2
DataBase ch2DataBase ch2
DataBase ch2
ayman_alawin
 
Database Management System
Database Management System Database Management System
Database Management System
FellowBuddy.com
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
Tharindu Weerasinghe
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Vidyasagar Mundroy
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Mustafa Kamel Mohammadi
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship Model
Raj vardhan
 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagram
Badrul Alam
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
Niaz Ali
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
sadeenedian08
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
Novita Sari
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
Puneet Arora
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
Haseeb
 

What's hot (19)

Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
 
DataBase ch2
DataBase ch2DataBase ch2
DataBase ch2
 
Database Management System
Database Management System Database Management System
Database Management System
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
dbms
dbmsdbms
dbms
 
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship Model
 
Data modeling
Data modelingData modeling
Data modeling
 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagram
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
 
Database Modeling
Database ModelingDatabase Modeling
Database Modeling
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
 
E r model
E r modelE r model
E r model
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
 
E r diagram
E r diagramE r diagram
E r diagram
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
 

Viewers also liked

Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)yhen06
 
Networking
Networking Networking
Flyman Technology Limited Tanzania
Flyman Technology Limited TanzaniaFlyman Technology Limited Tanzania
Flyman Technology Limited Tanzania
FLYMAN TECHNOLOGY LIMITED
 
ER Modelling
ER ModellingER Modelling
ER Modelling
lubna19
 
Database design
Database designDatabase design
Database design
Bashir Rezaie
 
Managing your tech career
Managing your tech careerManaging your tech career
Managing your tech career
Greg Jensen
 
4 the sql_standard
4 the  sql_standard4 the  sql_standard
4 the sql_standard
Utkarsh De
 
6 relational schema_design
6 relational schema_design6 relational schema_design
6 relational schema_design
Utkarsh De
 
1 introduction
1 introduction1 introduction
1 introduction
Utkarsh De
 
Best Practices for Database Schema Design
Best Practices for Database Schema DesignBest Practices for Database Schema Design
Best Practices for Database Schema DesignIron Speed
 
5 data storage_and_indexing
5 data storage_and_indexing5 data storage_and_indexing
5 data storage_and_indexing
Utkarsh De
 
Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
MongoDB
 
3 relational model
3 relational model3 relational model
3 relational model
Utkarsh De
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and Cons
Rachel Li
 
Distributed Postgres
Distributed PostgresDistributed Postgres
Distributed Postgres
Stas Kelvich
 
Week3 Lecture Database Design
Week3 Lecture Database DesignWeek3 Lecture Database Design
Week3 Lecture Database DesignKevin Element
 

Viewers also liked (20)

Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)
 
Networking
Networking Networking
Networking
 
Flyman Technology Limited Tanzania
Flyman Technology Limited TanzaniaFlyman Technology Limited Tanzania
Flyman Technology Limited Tanzania
 
Saadani national park 2015
Saadani national park 2015Saadani national park 2015
Saadani national park 2015
 
Ch09
Ch09Ch09
Ch09
 
ER Modelling
ER ModellingER Modelling
ER Modelling
 
Database design
Database designDatabase design
Database design
 
database design process
database design processdatabase design process
database design process
 
Normalization
NormalizationNormalization
Normalization
 
Managing your tech career
Managing your tech careerManaging your tech career
Managing your tech career
 
4 the sql_standard
4 the  sql_standard4 the  sql_standard
4 the sql_standard
 
6 relational schema_design
6 relational schema_design6 relational schema_design
6 relational schema_design
 
1 introduction
1 introduction1 introduction
1 introduction
 
Best Practices for Database Schema Design
Best Practices for Database Schema DesignBest Practices for Database Schema Design
Best Practices for Database Schema Design
 
5 data storage_and_indexing
5 data storage_and_indexing5 data storage_and_indexing
5 data storage_and_indexing
 
Webinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting StartedWebinar: Build an Application Series - Session 2 - Getting Started
Webinar: Build an Application Series - Session 2 - Getting Started
 
3 relational model
3 relational model3 relational model
3 relational model
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and Cons
 
Distributed Postgres
Distributed PostgresDistributed Postgres
Distributed Postgres
 
Week3 Lecture Database Design
Week3 Lecture Database DesignWeek3 Lecture Database Design
Week3 Lecture Database Design
 

Similar to Database design

DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
JasmineMichael1
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
Rupali Rana
 
Data model
Data modelData model
Data model
Sumit Rana
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
UmmerFarooq24
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
Bishrul Haq
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
Enes Bolfidan
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
Infotech27
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
ThangamaniR3
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
RiturajDas28
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
raghuKatagall1
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
raghuKatagall1
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
sandeep54552
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
TusharSingh711352
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
Saranya Natarajan
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 

Similar to Database design (20)

DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Data model
Data modelData model
Data model
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
DATA MODELS.pptx
DATA MODELS.pptxDATA MODELS.pptx
DATA MODELS.pptx
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 

More from FLYMAN TECHNOLOGY LIMITED

Flyman Technology Limited Introduction Presentation
Flyman Technology Limited Introduction PresentationFlyman Technology Limited Introduction Presentation
Flyman Technology Limited Introduction Presentation
FLYMAN TECHNOLOGY LIMITED
 
Flyman Technology Limited (Mzumbe University Tanzania)
Flyman Technology Limited (Mzumbe University Tanzania)Flyman Technology Limited (Mzumbe University Tanzania)
Flyman Technology Limited (Mzumbe University Tanzania)
FLYMAN TECHNOLOGY LIMITED
 
Uuzaji wa mazao ya kuku wa asili
Uuzaji wa mazao ya kuku wa asiliUuzaji wa mazao ya kuku wa asili
Uuzaji wa mazao ya kuku wa asili
FLYMAN TECHNOLOGY LIMITED
 
Entrepreneurship manual BIT
Entrepreneurship manual BITEntrepreneurship manual BIT
Entrepreneurship manual BIT
FLYMAN TECHNOLOGY LIMITED
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
FLYMAN TECHNOLOGY LIMITED
 
internet intranet and extranet
internet intranet and extranetinternet intranet and extranet
internet intranet and extranet
FLYMAN TECHNOLOGY LIMITED
 
Marketing management
Marketing managementMarketing management
Marketing management
FLYMAN TECHNOLOGY LIMITED
 
Marketing communications
Marketing communicationsMarketing communications
Marketing communications
FLYMAN TECHNOLOGY LIMITED
 
Marketing analysis
Marketing analysisMarketing analysis
Marketing analysis
FLYMAN TECHNOLOGY LIMITED
 
Consumer markets
Consumer marketsConsumer markets
Consumer markets
FLYMAN TECHNOLOGY LIMITED
 
ENTREPRENEURSHIP MANUAL
ENTREPRENEURSHIP MANUALENTREPRENEURSHIP MANUAL
ENTREPRENEURSHIP MANUAL
FLYMAN TECHNOLOGY LIMITED
 
THINGS NOT TO DO IN A JOB INTERVIEW!
THINGS NOT TO DO IN A JOB INTERVIEW!THINGS NOT TO DO IN A JOB INTERVIEW!
THINGS NOT TO DO IN A JOB INTERVIEW!
FLYMAN TECHNOLOGY LIMITED
 
Structure system analysis and design method -SSADM
Structure system analysis and design method -SSADMStructure system analysis and design method -SSADM
Structure system analysis and design method -SSADMFLYMAN TECHNOLOGY LIMITED
 

More from FLYMAN TECHNOLOGY LIMITED (20)

Flyman Technology Limited Introduction Presentation
Flyman Technology Limited Introduction PresentationFlyman Technology Limited Introduction Presentation
Flyman Technology Limited Introduction Presentation
 
Flyman Technology Limited (Mzumbe University Tanzania)
Flyman Technology Limited (Mzumbe University Tanzania)Flyman Technology Limited (Mzumbe University Tanzania)
Flyman Technology Limited (Mzumbe University Tanzania)
 
Uuzaji wa mazao ya kuku wa asili
Uuzaji wa mazao ya kuku wa asiliUuzaji wa mazao ya kuku wa asili
Uuzaji wa mazao ya kuku wa asili
 
Entrepreneurship manual BIT
Entrepreneurship manual BITEntrepreneurship manual BIT
Entrepreneurship manual BIT
 
Security chapter6
Security chapter6Security chapter6
Security chapter6
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
 
Dhtml chapter2
Dhtml chapter2Dhtml chapter2
Dhtml chapter2
 
internet intranet and extranet
internet intranet and extranetinternet intranet and extranet
internet intranet and extranet
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
 
Marketing management
Marketing managementMarketing management
Marketing management
 
Marketing communications
Marketing communicationsMarketing communications
Marketing communications
 
Marketing analysis
Marketing analysisMarketing analysis
Marketing analysis
 
Market segmentation
Market segmentationMarket segmentation
Market segmentation
 
Consumer markets
Consumer marketsConsumer markets
Consumer markets
 
ENTREPRENEURSHIP MANUAL
ENTREPRENEURSHIP MANUALENTREPRENEURSHIP MANUAL
ENTREPRENEURSHIP MANUAL
 
THINGS NOT TO DO IN A JOB INTERVIEW!
THINGS NOT TO DO IN A JOB INTERVIEW!THINGS NOT TO DO IN A JOB INTERVIEW!
THINGS NOT TO DO IN A JOB INTERVIEW!
 
TAXATION CONCEPTS
TAXATION CONCEPTSTAXATION CONCEPTS
TAXATION CONCEPTS
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
SYSTEM MODELLING
SYSTEM MODELLINGSYSTEM MODELLING
SYSTEM MODELLING
 
Structure system analysis and design method -SSADM
Structure system analysis and design method -SSADMStructure system analysis and design method -SSADM
Structure system analysis and design method -SSADM
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Database design

  • 1. Database Design Database design process can be broken down into 5 phases • Planning • Analysis • Design • Implementation • Maintenance
  • 2. Planning Phase In planning phase the overall Database structure is defined. Therefore; • The purpose of the database is determined – What information will be used in the Database – How information is to be used – What question will be Answered • Feasibility studies are conducted. • Requirements gathering
  • 3. Analysis phase Databases can be analyzed on different models • Conceptual-model – High-level description of facts – Not system specific • Logical model – Organization of data with some implementation information • Physical model – Actual storage of information (clustering, partitioning, indexing etc.)
  • 4. Conceptual model • Provide a framework for developing a database structure. • Three database components (entities, attributes and relationship) are described in detail.
  • 5. Entities • An entity defines a thing that exists and is distinguishable. i.e Person, place, object or concept. • Entities are basic building blocks of the database design. • particular occurrence of an entity is known as entity instance. • A group of similar entities is called entity set or entity class
  • 6. Attributes Attributes describe properties of entities and relationships • Simple (Scalars) - smallest semantic unit of data, atomic (no internal structure)- singular e.g. city • Composite - group of attributes e.g. address (street, city, state, zip) • Multivalued (list) - multiple values e.g. degrees, courses, skills (not allowed in first normal form) • Domain - conceptual definition of attributes – a named set of scalar values all of the same type e.g. integer a pool of possible values
  • 7. Relationships A relationship is a connection between entity classes. For example, a relationship between PERSONS and AUTOMOBILES could be an "OWNS" relationship. That is to say, people own automobiles. • The degree of a relationship indicates the number of entities involved. • The cardinality of a relationship indicates the number of instances in entity class E1 that can or must be associated with instances in entity class E2
  • 8. Types of Relationship Based on cardinality of a relationship, we have 3 types: - • One-One Relationship - For each entity in one class there is at most one associated entity in the other class. For example, for each husband there is at most one current legal wife (in this country at least). A wife has at most one current legal husband. • Many-One Relationships - One entity in class E2 is associated with zero or more entities in class E1, but each entity in E1 is associated with at most one entity in E2. For example, a woman may have many children but a child has only one birth mother. • Many-Many Relationships - There are no restrictions on how many entities in either class are associated with a single entity in the other. An example of a many-to-many relationship would be students taking classes. Each student takes many classes. Each class has many students.
  • 9. Logical model • After validating your conceptual mode, you can generate a logical model – Entity Classes are modeled as tables – Attributes are modeled as fields – Each instance of an entity is called a record – Domain are modeled as Data types – Primary keys for each table – Foreign keys for relationship
  • 10. Physical –model • How data will be stored and accessed in a computer system. • Where data will be stored • Estimate the amount of disk space that will be required by the database. • How data will be distributed within an organization or disks • type of indexes to be used (for efficient retrieval and manipulation).
  • 11. Design Phase Determine how best to represent the information system that was identified in the previous phase Mapping Logical Model and physical model into reality. – Database Management system (DBMS) to be used. – User Views (input forms, output reports) – Security Mechanisms etc.
  • 12. Implementation phase Actual implementation of the database and associated programming. • Database is analyzed for possible errors • Tables are created with few records for sample to see if the desired results are achieved • Fine adjustments as needed
  • 13. Entity Relationship Model • Conceptual data model that views the real world as entities and relationships. • A basic component of the model is the Entity-Relationship diagrams (ERDs), • (ERDs) provides a convenient method for visualizing the interrelationships among entities in a given application
  • 14. The utility of the ER model is: • It maps well to the relational database model.. • It is simple and easy to understand with a minimum of training. • the model can be used as a design plan by the database developer to implement a data model in specific database management software.
  • 15. Basic Elements in E-R Modeling The basic elements in ER modal are • entities • attributes and • Relationships.
  • 16. Entities • Data object about which information is to be collected. • Some specific examples of entities are EMPLOYEE, PROJECT, INVOICE. • An entity occurrence (also called an instance) is an individual occurrence of an entity. • Entity set: a collection of similar entities (employees, projects, departments)
  • 17. Attributes • describe the entity of which they are associated. • A particular instance of an attribute is a value. • Attributes can be classified as identifiers or descriptors. • Identifiers, more commonly called keys, uniquely identify an instance of an entity. • A descriptor describes a non-unique characteristic of an entity instance.
  • 18. Relationships • Represents an association between two or more entities. An example of a relationship would be: employees are assigned to projects projects have subtasks departments manage one or more projects • Relationships are classified in terms of – degree, – connectivity, – cardinality, – and existence.
  • 19. Classifying Relationships Degree of a Relationship • number of entities associated with the relationship.  A UNARY RELATIONSHIP exists when an association exists within a single entity  A BINARY RELATIONSHIP exists when two entities(participants) are in the relationship.  A TERNARY RELATIONSHIP exists when three entities (participants) are in the relationship.
  • 20. Classifying Relationships The connectivity – describes the mapping of associated entity instances in the relationship. – The values of connectivity are "one" or "many". – The basic types of connectivity for relations are: one-to-one, one-to-many, and many-to-many. The cardinality – actual number of related occurrences for each of the two entities.
  • 21. Classifying Relationships Existence • denotes whether the existence of an entity instance is dependent upon the existence of another, related, entity instance. • Defined as either mandatory or optional. – For mandatory existence an instance of an entity must always occur. "every project must be managed by a single department". – For optional existence the instance of the entity is not required or may occur
  • 22. ER Notation • There is no universal standard for representing data objects in ER diagrams. • Number of Notation styles is used today, among the more common are information Engineering, Bachman, Chen and Martin.
  • 23. ER Notation Martin Style. • Entities are represented by labeled rectangles. The label is the name of the entity. Entity names should be singular nouns. • Relationships are represented by a solid line connecting two entities. The name of the relationship is written above the line. Relationship names should be verbs. • Attributes, when included, are listed inside the entity rectangle. Identifier Attributes are underlined. Attribute names should be singular nouns. • Cardinality of many is represented by a line ending in a crow's foot. If the crow's foot is omitted, the cardinality is one. • Existence is represented by placing a circle or a perpendicular bar on the line. Placing a bar line next to the entity shows mandatory existence. Placing a circle next to the entity shows optional existence.
  • 25. ER Notation Chen Style • Rectangles represent ENTITY CLASSES • Circles represent ATTRIBUTES • Diamonds represent RELATIONSHIPS • Lines - lines connect entities to relationships. Lines are also used to connect attributes to entities. • Underline - Key attributes of entities are underlined. • Number Notations represents cardinality. • The name of the entity (class) or attribute or relationship is usually placed inside the symbol used for that object. (Sometimes, the name is placed adjacent.) •
  • 27. Refining The Entity-Relationship Diagram This section discusses four basic rules for modeling relationships 1. Entities Must Participate In Relationships – Entities cannot be modeled unrelated to any other entity. – The exception to this rule is a database with a single table.
  • 28. Refining The Entity-Relationship Diagram 2. Resolve Many-To-Many Relationships – Many-to-many relationships cannot be used in the data model because they cannot be represented by the relational model. – must be resolved early in the modeling process. – replace the relationship with an association entity and then relate the two original entities to the association entity
  • 29. This strategy is demonstrated below Figure below: - Here Employees may be assigned to many projects. Each project must have assigned to it more than one employee.
  • 30. Refining The Entity-Relationship Diagram 3. Transform Complex Relationships into Binary Relationships • Complex relationships are classified as ternary, an association among three entities, or n-ary, an association among more than three, where n is the number of entities involved. • cannot be directly implemented in the relational model. • so they should be resolved early in the modeling process. • The strategy for resolving complex relationships is similar to resolving many-to-many relationships. • Replace the complex relationship with an association entity and then relate the two original entities to the association entity
  • 31. Here is an example Employees can use different skills on any one or more projects. Each project uses many employees with various skills.
  • 32. Refining The Entity-Relationship Diagram 4. Eliminate redundant relationships – A redundant relationship is a relationship between two entities that is equivalent in meaning to another relationship between those same two entities.
  • 33. For example, Figure A shows a redundant relationship between DEPARTMENT and WORKSTATION. This relationship provides the same information as the relationships DEPARTMENT has EMPLOYEES and EMPLOYEEs assigned WORKSTATION. Figure B shows the solution which is to remove the redundant relationship DEPARTMENT assigned WORKSTATIONS.
  • 34. Tips for Effective ER Diagrams • Make sure that each entity only appears once per diagram. • Name every entity, relationship, and attribute on your diagram. • Examine relationships between entities closely. Are they necessary? Are their any relationships missing? Eliminate any redundant relationships. Don't connect relationships to each other. • Use colors to highlight important portions of your diagram
  • 35. Normalization • Normalization is the process of refining a database design to produce table schemes in normal form. • A normal form refers to a class of relational schemas that obey some set of rules. • Schemas that obey the rules are said to be in the normal form. • Non–normal form is where data may recur repetitively. • Normalization is aiming at minimizing redundancy in database
  • 36. Classifying normal forms • There are six commonly recognized normal forms, with the inspired names: – First normal form (or 1NF) – Second normal form (or 2NF) – Third normal form (or 3NF) – Boyce-Codd normal form (or BCNF) – Fourth normal form (or 4NF) – Fifth normal form (or 5NF) • We will consider the first three of these normal forms
  • 37. First normal form (or 1NF) A relation is in First Normal Form (1NF) if every attribute value is indivisible (atomic) and every column is unique. • First normal form (1NF) sets the very basic rules for an organized database: – Eliminate duplicative columns from the same table. – Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).
  • 38. Second normal form (or 2NF) A relation is in Second Normal Form (2NF) if it is in 1NF and if all of its attributes are dependent on the whole key (i.e. none of the non-key attributes are related only to a part of the key). • Second normal form (2NF) further addresses the concept of removing duplicative data: – Remove subsets of data that apply to multiple rows of a table and place them in separate tables. •     Create relationships between these new tables and their predecessors through the use of foreign keys.
  • 39. Third normal form (or 3NF) A relation is in Third Normal Form (3NF) if it is in 2NF and there are no transitive dependencies (i.e. none of the non-key attributes are dependent upon another attribute which in turn is dependent on the relation key). • Third normal form (3NF) goes one large step further: Remove columns that are not dependent upon the primary key.
  • 40. Fourth normal form (or 4NF) • A relation is in 4NF if it has no multi-valued dependencies.