SlideShare a Scribd company logo
DBDA
(Database Design and Applications)
CH4-5
By: Prof. Ganesh Ingle
Session objective
Quick look of previous Session
Database Design Process
ER Modeling concepts
EER Concepts and notations
Textbook Reference Book(s) & other resources
T1 Ramez Elmasri & Shamkant B. Navathe, Fundamentals of
Database Systems, Pearson Education, 5th Edition, 2007
Reference Book(s) & other resources
R1 Abraham Silberschatz, Henry F Korth and S Sudarshan,
Database System Concepts, McGraw Hill, 6th Ed., 2013
Text Book
Types of DBMS languages
 Data Definition Language (DDL) allows the DBA or user
to describe and name entities, attributes, and relationships
required for the application plus any associated integrity
and security constraints
 Data Manipulation Language (DML) provides basic data
manipulation operations on data held in the database
 Data Control Language (DCL) defines activities that are
not in the categories of those for the DDL and DML, such
as granting privileges to users, and defining when proposed
changes to a databases should be irrevocably made
Database Languages
Types of DBMS languages
DATA Association(ER Model)
Entity:
• A thing or object in real world that is distinguishable from other
objects
Eg: Employee in an organization
• An entity has set of properties and values for he same set of
properties that many uniquely identify an entity
Eg: Employee (EmpIdNo,Mobile no etc)
• An entity set is a set of entities of the same type that share their
same properties or attributes
Eg. Bank (employee(empid),customer(acc number))
DATA Association(ER Model)
Entity:
• A thing or object in real world that is distinguishable from other
objects
Eg: Employee in an organization
• An entity has set of properties and values for he same set of
properties that many uniquely identify an entity
Eg: Employee (EmpIdNo,Mobile no etc)
• An entity set is a set of entities of the same type that share their
same properties or attributes
Eg. Bank (employee(empid),customer(acc number))
DATA Association(ER Model)
Attributes:
• Descriptive properties possessed by each member of an entity set.
• For each attribute ,there is a set of permitted values called domain
• Student(entity)
• Attributes(std_id,std_nme,std_add,std_class)
DATA Association(ER Model)
Attributes
Simple/Composite Sinlge/Muti valued
Derived
Simple :are not
divided in sub parts
eg: unique-id(123456
canot be divided into
12 and 345)
Composite: can be
divided into subparts
Eg: name (first and
last,middle)
single :single value
Eg: order-id
Multi: multiple
values
Eg: multiple phone
numbers
Derived :derived
from otger related
attributes
Eg: age (from name
and DOB)
Age=current_date-DOB
DATA Association(ER Model)
Strong and weak entity set
Strong entity Weak entity
Has a primary key Does not have sufficient attributes to form
primary key
Primary key Primary key???
Entity=set payment :
Attribute:
1. Payment_Number
2. Payment_Date
3. Payment_Amount
Eg. EMI to pay for number of users
How to form PK from weak entity set
How to from the primary key of a weak
entity set ?
You have to use PK of SE on which weak
entity is dependant plus the WE set
discriminator.
Eg. Same loan pay banking domain table
design and relation to be shown
PK,FK,discriminator
Relationship Sets
Relationship Sets-
• A relationship is an association among entities.
• Relationship set is a set of relationship of the
same type.
Eg.
Customer =c1,c2,c3,…..cn
Loan= L1,L2,L3……Ln respectively
Connectivity / Cardinality/Relationships
• It describes the mapping of associated instances
in the relationships
OR
• It expresses the number of entities to which an
entity can be associated via a relationship set
Mapping cardinalities
One to one One to many Many to one Many to Many
• One to one:Department and head(company,university)
• One to many :Hod(1,2,3) faculty(1,2,3)single hod can represent
many faculty likewise one team leader represent many emp
• Many to one:relation of course to faculty many courses are being
taught by one faculty .
• Many to many : projrct 1 to n emp 1 to n
OR
• It expresses the number of entities to which an entity can be
associated via a relationship set
Mapping(Connectivity / Cardinality/Relationships)
Mapping(Connectivity / Cardinality/Relationships)
Mapping(Connectivity / Cardinality/Relationships)
 How an entity participate in a relationship???
 Total: If every entity in E participates in t=atleast one
relationship in R
Eg. Student elective subjects at least register for a course.
 Partial: Some entities in E participates in in
relationship R
Eg. Student and CR relation( not all the students are
participated for being CR)
Participation constraint
 A key allows to identify a set of attributes to
distinguish entities from each other.
 Types of key:
 Superkey: Set of one or more attributes that allows
to identify an entity uniquely.(It may contain extra
attributes)eg. {Std_Id,Std_Name}
 Candidate key: It is minimal set of super key which
can uniquely identify an entity. eg. {Std_Id} not id
and name both.
 New definition: SK for which no subset is a superkey.
Key in Relation
Key in Relation
 Note : More than one CK is possible in relation
 Suppose we have 5 CK
 Primary key: vvimp
Chosen by DBA very important to identify the entity and the record. Eg.???
 Alternate Key/s:
CK-PK=AK ,5-1=4 . All 4 can become PK but not chosen by DBA.
 Secondary Key:
 Used for data retrieval. Eg.Emp_id(PK) ,Dept(Secondary key)
I want to find the employee wrt to dept then Dept is secondary key.
Many time in a Group by clause we use Secondary key.
 Foreign Key: PK of one related to another entity id FK
 Composite Key: Combination of two or more columns in a table that
uniquely identify the tuple/record/row.
Eg.CutomerId,OrderID,SalesDetail
THANK YOU

More Related Content

PPTX
Islamic University Previous Year Question Solution 2019 (ADBMS)
PPTX
Relational Data Model Introduction
PPTX
ER Modeling and Introduction to RDBMS
PPTX
Relational Model
PPTX
Chapter 4
PPT
Relational model
PPTX
Database : Relational Data Model
Islamic University Previous Year Question Solution 2019 (ADBMS)
Relational Data Model Introduction
ER Modeling and Introduction to RDBMS
Relational Model
Chapter 4
Relational model
Database : Relational Data Model

What's hot (20)

PPT
Object Oriented Dbms
PPT
Lecture 07 relational database management system
PPTX
Object oriented data model
PPT
Dbms ii mca-ch3-er-model-2013
PPTX
Database - Entity Relationship Diagram (ERD)
PPTX
Introduction of Database Design and Development
PDF
Entity-Relationship Data Model in DBMS
PPT
08. Object Oriented Database in DBMS
PPTX
Object oriented database model
PPTX
Entity Relationship Diagram
PDF
Chapter3 the relational data model and the relation database constraints part2
PPT
Data modelingpresentation
PPTX
Cardinality and participation constraints
PDF
Chapt 1 odbms
PPT
Module 5 oodb systems semantic db systems
PPTX
Encapsulation of operations, methods & persistence
PDF
Bca examination 2015 dbms
PPTX
Entity relationship modelling - DE L300
PPTX
Data modeling
PPTX
Entity Relationship Modelling
Object Oriented Dbms
Lecture 07 relational database management system
Object oriented data model
Dbms ii mca-ch3-er-model-2013
Database - Entity Relationship Diagram (ERD)
Introduction of Database Design and Development
Entity-Relationship Data Model in DBMS
08. Object Oriented Database in DBMS
Object oriented database model
Entity Relationship Diagram
Chapter3 the relational data model and the relation database constraints part2
Data modelingpresentation
Cardinality and participation constraints
Chapt 1 odbms
Module 5 oodb systems semantic db systems
Encapsulation of operations, methods & persistence
Bca examination 2015 dbms
Entity relationship modelling - DE L300
Data modeling
Entity Relationship Modelling
Ad

Similar to DBMS CS 4-5 (20)

PDF
Db lec 02_new
PDF
3. Chapter Three.pdf
PDF
ICT DBA3 09 0710 Model Data Objects.pdf
PPTX
Relation DB.pptx a powerpoint presentation
PDF
Summary data modelling
PPTX
Database part3-
PPTX
Download different material from slide share
PDF
RDBMS Unit-2.pdf Entity Relationship Diagram
PDF
ER diagram
PPTX
8.pptx
PPTX
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
PPTX
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
PPT
Unit02 dbms
PDF
"Comprehensive Guide to Effective Database Design Principles
PPT
Data Modelling on the Relation between two or more variables
PPT
PPTX
PDF
Lecture 2 database management system.pdf
PDF
Unit 2 DBMS
PPT
Database 3 Conceptual Modeling And Er
Db lec 02_new
3. Chapter Three.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
Relation DB.pptx a powerpoint presentation
Summary data modelling
Database part3-
Download different material from slide share
RDBMS Unit-2.pdf Entity Relationship Diagram
ER diagram
8.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
Unit02 dbms
"Comprehensive Guide to Effective Database Design Principles
Data Modelling on the Relation between two or more variables
Lecture 2 database management system.pdf
Unit 2 DBMS
Database 3 Conceptual Modeling And Er
Ad

More from Infinity Tech Solutions (20)

PDF
Database management system session 6
PDF
Database management system session 5
PDF
Database Management System-session 3-4-5
PDF
Database Management System-session1-2
PDF
Main topic 3 problem solving and office automation
PDF
Introduction to c programming
PDF
PDF
Bds session 13 14
PDF
Computer memory, Types of programming languages
PDF
Basic hardware familiarization
PDF
User defined functions in matlab
PDF
Programming with matlab session 6
PDF
Programming with matlab session 3 notes
PPTX
AI/ML/DL/BCT A Revolution in Maritime Sector
PDF
Programming with matlab session 5 looping
PDF
BIG DATA Session 7 8
PDF
BIG DATA Session 6
Database management system session 6
Database management system session 5
Database Management System-session 3-4-5
Database Management System-session1-2
Main topic 3 problem solving and office automation
Introduction to c programming
Bds session 13 14
Computer memory, Types of programming languages
Basic hardware familiarization
User defined functions in matlab
Programming with matlab session 6
Programming with matlab session 3 notes
AI/ML/DL/BCT A Revolution in Maritime Sector
Programming with matlab session 5 looping
BIG DATA Session 7 8
BIG DATA Session 6

Recently uploaded (20)

PDF
composite construction of structures.pdf
PPTX
web development for engineering and engineering
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Mechanical Engineering MATERIALS Selection
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Welding lecture in detail for understanding
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
PPT on Performance Review to get promotions
composite construction of structures.pdf
web development for engineering and engineering
Operating System & Kernel Study Guide-1 - converted.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CH1 Production IntroductoryConcepts.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Lesson 3_Tessellation.pptx finite Mathematics
CYBER-CRIMES AND SECURITY A guide to understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mechanical Engineering MATERIALS Selection
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Foundation to blockchain - A guide to Blockchain Tech
Welding lecture in detail for understanding
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPT on Performance Review to get promotions

DBMS CS 4-5

  • 1. DBDA (Database Design and Applications) CH4-5 By: Prof. Ganesh Ingle
  • 2. Session objective Quick look of previous Session Database Design Process ER Modeling concepts EER Concepts and notations
  • 3. Textbook Reference Book(s) & other resources T1 Ramez Elmasri & Shamkant B. Navathe, Fundamentals of Database Systems, Pearson Education, 5th Edition, 2007 Reference Book(s) & other resources R1 Abraham Silberschatz, Henry F Korth and S Sudarshan, Database System Concepts, McGraw Hill, 6th Ed., 2013 Text Book
  • 4. Types of DBMS languages
  • 5.  Data Definition Language (DDL) allows the DBA or user to describe and name entities, attributes, and relationships required for the application plus any associated integrity and security constraints  Data Manipulation Language (DML) provides basic data manipulation operations on data held in the database  Data Control Language (DCL) defines activities that are not in the categories of those for the DDL and DML, such as granting privileges to users, and defining when proposed changes to a databases should be irrevocably made Database Languages
  • 6. Types of DBMS languages
  • 7. DATA Association(ER Model) Entity: • A thing or object in real world that is distinguishable from other objects Eg: Employee in an organization • An entity has set of properties and values for he same set of properties that many uniquely identify an entity Eg: Employee (EmpIdNo,Mobile no etc) • An entity set is a set of entities of the same type that share their same properties or attributes Eg. Bank (employee(empid),customer(acc number))
  • 8. DATA Association(ER Model) Entity: • A thing or object in real world that is distinguishable from other objects Eg: Employee in an organization • An entity has set of properties and values for he same set of properties that many uniquely identify an entity Eg: Employee (EmpIdNo,Mobile no etc) • An entity set is a set of entities of the same type that share their same properties or attributes Eg. Bank (employee(empid),customer(acc number))
  • 9. DATA Association(ER Model) Attributes: • Descriptive properties possessed by each member of an entity set. • For each attribute ,there is a set of permitted values called domain • Student(entity) • Attributes(std_id,std_nme,std_add,std_class)
  • 10. DATA Association(ER Model) Attributes Simple/Composite Sinlge/Muti valued Derived Simple :are not divided in sub parts eg: unique-id(123456 canot be divided into 12 and 345) Composite: can be divided into subparts Eg: name (first and last,middle) single :single value Eg: order-id Multi: multiple values Eg: multiple phone numbers Derived :derived from otger related attributes Eg: age (from name and DOB) Age=current_date-DOB
  • 12. Strong and weak entity set Strong entity Weak entity Has a primary key Does not have sufficient attributes to form primary key Primary key Primary key??? Entity=set payment : Attribute: 1. Payment_Number 2. Payment_Date 3. Payment_Amount Eg. EMI to pay for number of users
  • 13. How to form PK from weak entity set How to from the primary key of a weak entity set ? You have to use PK of SE on which weak entity is dependant plus the WE set discriminator. Eg. Same loan pay banking domain table design and relation to be shown PK,FK,discriminator
  • 14. Relationship Sets Relationship Sets- • A relationship is an association among entities. • Relationship set is a set of relationship of the same type. Eg. Customer =c1,c2,c3,…..cn Loan= L1,L2,L3……Ln respectively Connectivity / Cardinality/Relationships • It describes the mapping of associated instances in the relationships OR • It expresses the number of entities to which an entity can be associated via a relationship set
  • 15. Mapping cardinalities One to one One to many Many to one Many to Many • One to one:Department and head(company,university) • One to many :Hod(1,2,3) faculty(1,2,3)single hod can represent many faculty likewise one team leader represent many emp • Many to one:relation of course to faculty many courses are being taught by one faculty . • Many to many : projrct 1 to n emp 1 to n OR • It expresses the number of entities to which an entity can be associated via a relationship set Mapping(Connectivity / Cardinality/Relationships)
  • 18.  How an entity participate in a relationship???  Total: If every entity in E participates in t=atleast one relationship in R Eg. Student elective subjects at least register for a course.  Partial: Some entities in E participates in in relationship R Eg. Student and CR relation( not all the students are participated for being CR) Participation constraint
  • 19.  A key allows to identify a set of attributes to distinguish entities from each other.  Types of key:  Superkey: Set of one or more attributes that allows to identify an entity uniquely.(It may contain extra attributes)eg. {Std_Id,Std_Name}  Candidate key: It is minimal set of super key which can uniquely identify an entity. eg. {Std_Id} not id and name both.  New definition: SK for which no subset is a superkey. Key in Relation
  • 20. Key in Relation  Note : More than one CK is possible in relation  Suppose we have 5 CK  Primary key: vvimp Chosen by DBA very important to identify the entity and the record. Eg.???  Alternate Key/s: CK-PK=AK ,5-1=4 . All 4 can become PK but not chosen by DBA.  Secondary Key:  Used for data retrieval. Eg.Emp_id(PK) ,Dept(Secondary key) I want to find the employee wrt to dept then Dept is secondary key. Many time in a Group by clause we use Secondary key.  Foreign Key: PK of one related to another entity id FK  Composite Key: Combination of two or more columns in a table that uniquely identify the tuple/record/row. Eg.CutomerId,OrderID,SalesDetail