SlideShare a Scribd company logo
1 of 64
Govt. Madhav Science College,
Ujjain
Relational Database Management System
Topic – DDLC and E-R Model
Database development life cycle
• Database development cycle is used to develop a database for
the organization.
• It consists of 7stages :
1. Planning phase
2. Feasibility
3. Database design
4. Implementation
5. Testing
6. Maintenance
7. Feedback
Database development life cycle
• Planning Phase
• Initial Planning is the necessary function which takes place during
the strategic database plan in an organization.
• Initial planning information requires following :
1. How many application software is in use, and which department
is responsible for this.
2. Which type of function needs to be performed
3. Which types of data is associated with.
This type of information generally identifies the hardware, software
and storage requirement.
Database development life cycle
• Feasibility
• The feasibility involves
1. Technical feasibility :- Is the technology suitable for .
developing the database?
In this study, the DBA identifies that whether the hardware
and software are required to design the database is available
in the organization or not and whether training is needed.
Database development life cycle
2. Operational Feasibility :- Does the organization have
resources like man, skill, money, and material to create a
reliable database?
In this DBA identify whether the organization has the skilled
person and budget to create a database or nor.
DBA also identify the designing cost and measured the
benefits from the database.
Database development life cycle
• Database Design
• The database design is the essential component to DDLC.
• In this, the detailed description about the system specification, and
design documents are maintained.
• It also defines how system should be created.
• In this DBA suggest which type of database model is required.
• It can be a physical model, a logical model, and conceptual model.
Database development life cycle
• Implementation
• In this phase, the DBA creates a pilot project before implementing a
system into an organization.
• In a pilot project, the system is going to implement in some
departments.
• If the system successfully implemented than it will be implemented
in a whole organization.
• Creating a data dictionary is an important task in implementation.
• DD is the central repository for the database and it contains the
security and access features for the system.
Database development life cycle
• Testing Phase
• In this phase, DBA tests the functioning of the implemented
system.
• The goal of testing is to find errors and bugs.
• Errors and bugs require a review of the analysis, design and
implementation processes to get corrected.
Database development life cycle
• Maintenance
• Maintenance is the method of observing and maintaining the
database system.
• The performance of the system has been observed in this
phase.
• If the performance of a system falls below then immediately
DBA takes a necessary action.
Database development life cycle
• Feedback
• In this phase feedback of a system is received from the end
user.
Conceptual Database Design
• The purpose of the conceptual design phase is to build a
conceptual model based upon the previously identified
requirements, but closer to the final physical mode.
• A commonly used conceptual model is called an entity-
relationship model.
Conceptual Database Design
• Principal of conceptual database design
• The concept of conceptual database design is to define the
relationship between objects.
• Object and relationship are the two major components of the
conceptual database.
• Objects like people, place, and plants etc.
• The relationship is used to create a link between 2 or more
objects.
• For example: Mohan sales a health drink to Ravi.
• It delivers a mapping of things in real time.
Conceptual Database Design
• The principals of conceptual models are as follows:
1. The role of conceptual models is collect the data for query
and reports purpose.
2. The data can be updated through a user interface.
3. Collect data from different sources in the central repository,
from which users can access the data.
4. It also indicates that which data or information to be
updated from where and how.
5. Used to support the data analysis.
Entity-Relationship Model
• The Entity-Relationship (ER) data model is based on the
observation of a real world which consists of a set of basic
objects.
• These distinguishable basic objects are called as entities.
• The entities are characterized by means of the attributes.
• The associations existing between the basic entities are
termed as relationships.
Entity-Relationship Model
• The pictorial representation of showing the connectivity among the
entities (with attributes) and relationships is called as Entity-
Relationship or simply ER model.
• It is the conceptual structure of the requirements gathered from
the enterprise.
• From the ER model an enterprise can be clearly visualized.
• As this model is drawn on the paper to represent the whole
organization or enterprise, it becomes a tool.
Entity-Relationship Model
• Of course the tool is used distinctly in the database design
process.
• This tool is the outcome of conceptual design of the database.
• So, it is called as tool of the conceptual design.
• From the first step of database design it is necessary to gather
all the needs of the enterprise properly.
• During this process, many, things are identified.
• The activities or events, the objects that participate in the
events and the characteristics of the objects are formulated
clearly.
Entity-Relationship Model
• The objects identified are the entities and the collection of
similar entities is called as entity set.
• The associations involving the entity sets are relationships.
• Collection of similar relationships is called as relationship set.
• The objects can be clearly identified with the help of their
characteristics.
• These characteristics collected are called as attributes.
• The attributes explain the properties of the entities.
Entity-Relationship Model
• Entity and Entity sets
• An entity is an "object" or a "thing" or 'a "person" which can
be particularly identified in our view or mind.
• It is obviously of interest to the enterprise.
• They can be classified into different entity types or classes.
Entity-Relationship Model
• Entity and Entity sets
• An entity set is a collection or set of entities of the same type.
• In an enterprise . all the living and non-living things are
identified as objects and these objects are nothing but
entities.
• Let us understand this clearly with the help of the examples.
Entity and Entity sets
• Example
• Let us assume that a Cricket Match is going on.
• Can you identify any entities there?
• Let us do the exercise as follows:
Entity and Entity sets
• The batsmen playing for a country are entities.
• The bowler is an entity.
• The fielders are entities.
• The ball is an entity.
• The bats held by the batsmen are entities.
Entity and Entity sets
• The countries to which the players belong to are entities.
• The umpires on the field and off the field are entities.
• The commentators giving running commentary are entities.
• The scorers recording the scores are entities.
Entity and Entity sets
• The live audience watching the match are entities.
• The cameramen, the stumps, the advertising boards, the
stadium, the city in which the match is going on are entities.
• The list goes on and on.
• Let us restrict it up to this point only.
Entity and Entity sets
• After the first observation now we can formulate the entity
sets after the classification of similar entities into a single
group.
• Then the entity sets formed will be:
• Country is an entity set, a set consisting of all the cricket
playing countries.
• Player is an entity set, a set consisting of all the players who
play cricket.
Entity and Entity sets
• Umpire is an entity set, a set consisting of all the umpires.
• Commentator is an entity set, a set consisting of all the
commentators.
• Scorer is an entity set, a set containing all the scorers.
• Audience is an entity set, a set consisting the people
watching the match.
• Bat is an entity set, a set consisting the bats being used by the
batsmen.
Entity and Entity sets
• Again the specification of the entity sets goes on and on.
• The countries are clearly distinguishable from the Players, so
they make a separate entity set.
• But observe Commentators, Umpires and Scorers.
• They are all officials in conducting a cricket match.
• So, they may be classified to a single entity set Official.
• The Official entity set becomes a super entity set, from which
the Umpire, Commentator and Scorer can be derived.
Entity and Entity sets
• Example 2:
• Identify the entities in a College or Institution.
• The identification of persons / objects / things is as follows:
• Write in Comments section.
Entity and Entity sets
• Students studying in the college are entities.
• Books they read are entities.
• Courses/Subjects they study are entities.
• Faculty teaching to the students are entities.
• Lab Assistants helping in conducting the experiments are entities.
• The Equipments used at different labs are entities
Entity and Entity sets
• Specially invited Visiting Faculty are entities.
• The Rooms in which classes are conducted are entities.
• The administrative non-teaching Staff of the college are
entities.
• The benches, chairs, tables, racks etc. are entities.
Entity and Entity sets
• The benches, chairs, tables, racks etc. are entities.
• The cycles, the cars and the bikes parked outside are also entities.
• Again the identification may not include all the possible entities.
• For the sake of simplicity the list is restricted.
• In short the identified entity sets are:
Entity and Entity sets
• Student, Faculty, Lab Assistant, Visiting Faculty, Non-Teaching
Staff
• Book, Programme, Course, Equipment
• Room, Bench, Chair, Table, Rack
• Cycle, Car, Bike.
• These are the only major entity sets consisting respective
entities that are distinguishable from each other.
• There may be more entity sets that might not been included
in the above list.
Types of Entity
1. Strong Entity –
• A strong entity is one that exists independent of other entity.
• In other words, an entity set has a primary key is termed as
strong entity set.
• Example- Student, Employee, etc.
STUDENT EMPLOYEE
Types of Entity
2. Weak Entity –
• A weak entity is an entity whose existence depends on some
other entity.
• In other words, an entity set which may not have sufficient
attributes to form a primary key is termed as weak entity set.
• Example- Room, Account, etc.
ROOM ACCOUNT
Difference between Strong entity and Weak entity
Attributes
• An attribute can be simply defined as a property or
characteristics of an entity.
• Each entity set has a set of attributes associated with it.
• Following are some examples of common entity sets with
attributes :
• STUDENT : Student id, Student name, Address, Contact
• EMPLOYEE : Employee id, Employee name, Designation,
Branch
• ACCOUNT : Account number, Account type, Balance
Types of Attributes
1. Base attributes –
• Entering the value's for these attributes is compulsory.
• For example `marks 1', `marks2', `marks3' which are the marks
of the student scored in three subjects.
• The roll number or identification number 'Sid', the date of
birth `Dob', the runs scored in a match 'Runs', the wickets
taken in a match `Wickets' are also the examples of base
attributes.
Types of Attributes
2. Derived attributes –
• These are the attributes for which the value is calculated
using the base attributes or some operations involving base
attributes.
• For example total marks 'Total' is derived from the sum of
`marks1, `marks2' and ‘marks3'.
• The age of the student 'Age' is derived from the date of birth
`Dob‘.
• The rank of the student 'Rank' may be derived from the
attribute 'Total'.
• The gross salary 'Salary' may be derived from 'Basic', ‘DA’ and
‘HRA'.
Types of Attributes
3. Atomic attributes –
• The attributes which are not further divisible into some more
attributes are called as atomic attributes.
• For example the basic salary of an employee 'Basic' is not
further divisible into more than one attribute.
• The attributes 'marks 1', `marks2', `marks3', 'Rank', 'DA' and
`HRA’ are also atomic attributes.
Types of Attributes
4. Composite attributes –
• The attributes that are further divisible are called composite
attributes.
• In other words the combination of more than one attribute is
called as composite attribute.
• For example the address of a student 'Address' is a
combination of house number `HNo', 'Street', `City' and the
pin code ‘PIN'.
• The attribute `SName' may be also a combination of first
name `Fname', middle name `Mname' and last name ‘Lname'.
Types of Attributes
5. Single valued attribute –
• The attribute that takes only one value is called as single
valued attribute.
• For example the value entered for the attributes 'Marks1’,
‘Marks2' and `Marks3' is single value within a range 0 to 100.
• The value entered for roll number 'Sid' of a student and name
of a student ‘SName' is single.
Types of Attributes
6. Multi-valued attributes –
• The attributes that take more than one value are called multi-
valued attributes.
• For example 'Color' of a flag may take the values blue, white,
green and saffron.
Types of Attributes
7. Attributes with NULL value –
• It is clear from the above description that normally every attribute
takes values from the range of values.
• There is every chance that for one particular entity the value of the
attribute may be missing or not presently available.
• Then it must be properly handled.
• Such missing value can be replaced with a systematic NULL value.
• Such attributes are NULL value attributes.
• If permission for an attribute to store NULL value is not given then
such 'condition is called NOT NULL restriction or constraint.
• For example an attribute 'Sid' may not be permitted to store NULL
value because a student may not exist without a roll number.
• But the subject allotted `SAllot' for a new appointed teacher at a
given time can be stored with NULL.
Types of Attributes
• Symbols –
Types of Attributes
• Example –
Types of Attributes
• Example –
Types of Attributes
• Example –
Types of Attributes
• Example –
Subset and Super set
• Set is {A,B,C}
• Its Subset are –
• {A},{B},{C},{A,B},{A,C},{B,C},{A,B,C}
• Set is {A,B,C}
• Super set of {A} – {A}, {A,B}, {A,C},{A,B,C}
• Superset of {A,B} – {A.B}, {A,B,C}
Keys
• Keys are attributes or set of attributes used to distinguish one
entity from another in an entity set.
1. Super Key
• A super key is set of one or more attributes that can uniquely
identify an entity in an entity set.
• Also any superset of super key can be termed as super key.
• This can be better understood from following example
Keys
• Suppose an entity has four attributes A, B, C and D.
• Now, if attribute A can uniquely identify an entity then A is
super key.
• For that entity, also combination of any attribute/ attributes
with attribute A can also be termed as super key.
• That is {A,B}, {A,C}, {A,D}, {A,B,C}, {A,B,D}, {A,C,D} & {A,B,C,D}
can be termed as super key.
Keys
2. Candidate Key
• All the attributes or set of attribute, which can uniquely
identify an entity are candidate keys.
• Only those key can be candidate key whose no proper subset
is a super key.
• This can be better understood by following example -
Keys
• Suppose an entity has 4 attributes A,B,C and D.
• Now if attribute {A} & {C,D} both can uniquely identity an
entity, then from the definition of Super Key, following are
also be the super keys.
• Corresponding to A - {A}, {A,B}, {A,C), (A,D), {A,B,C}, {A,B,D},
{A,C,D}, (A,B,C,D).
• Corresponding to C,D - {C,D,A}, {C,D,B}, {C,D,A,B}.
Keys
• Now according to our definition of candidate keys, only those
key can be candidate keys, whose no proper subset is a super
key.
• According to this {A, B} cannot be a candidate key because its
subset {A} is a super key.
• Also {B,C,D} cannot be candidate key because its subset {C,D}
is a super key.
• Working in the same way only {A} & {C,D} can be candidate
key.
Keys
3. Primary Key :
• The primary key is the term used for the candidate key that is
chosen by the database designer as the principal means of
identifying an entity.
• Suppose an entity has 4 attributes A,B,C and D.
• Now if attribute {A} & {C,D} both can uniquely identity an
entity, then from the definition of Super Key, following are
also be the super keys. And also Candidate keys.
• Now either {A} or {C,D} can be a Primary key.
Keys
4. Alternate Keys :
• The alternate key is term used for the candidate keys that are
remaining after the primary key has be chosen by database
designer.
Keys
5. Foreign Key
• A foreign key is an attribute or set of attribute in a relation of
database that serve as the primary key of another relation in
the same database.
• For example –
• Employee (EmpiD, Name, DeptName, Salary)
• Department {DeptName, Location, PhoneNo)
• Here DeptName is the foreign key in Employee table because
it serves as the primary key in Department table.
Keys
6. Composite Key
• A primary key that consists of more than one attribute is
called composite key.
• Example-
• Suppose an entity has 5 attributes P,Q,R,S,T.
• Now if attribute {Q} & {P,T} both can uniquely identity an
entity then {P,T} is a composite key because it consist more
than one attribute.
Keys
Question-
• There are two relations-
• R1(A,B,C,D)
• R2(B,P,Q,R)
• Here {A} and {C,D} uniquely identify an entity then
• Super keys are-
• Corresponding to {A}- A,AB,AC,AD,ABC,ABD,ACD,ABCD
• Corresponding to {C,D}- CD, CDA,CDB,CDAB
Keys
Question-
• There are two relations-
• R1(A,B,C,D)
• R2(B,P,Q,R)
• Here {A} and {C,D} uniquely identify an ENTITY then
• Candidate keys are- {A} and {C,D}
Keys
Question-
• There are two relations-
• R1(A,B,C,D)
• R2(B,P,Q,R)
• Here {A} and {C,D} uniquely identify an attribute then
• Primary keys are- Either {A} or {C,D}
Keys
Question-
• There are two relations-
• R1(A,B,C,D)
• R2(B,P,Q,R)
• Here {A} and {C,D} uniquely identify an attribute then
• Alternate keys are-
• If {A} is primary key then {C,D} is alternate key.
• If {C,D} is primary key then {A} is alternate key.
Keys
Question-
• There are two relations-
• R1(A,B,C,D) – {A}, {C,D}
• R2(B,P,Q,R) – {B}
• Here {A} and {C,D} uniquely identify an attribute then
• Foreign Key is- {B}
Keys
Question-
• There are two relations-
• R1(A,B,C,D)
• R2(B,P,Q,R)
• Here {A} and {C,D} uniquely identify an attribute then
• Composite Key is- {C,D}
THANK YOU

More Related Content

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Ddlc and e r model

  • 1. Govt. Madhav Science College, Ujjain Relational Database Management System Topic – DDLC and E-R Model
  • 2. Database development life cycle • Database development cycle is used to develop a database for the organization. • It consists of 7stages : 1. Planning phase 2. Feasibility 3. Database design 4. Implementation 5. Testing 6. Maintenance 7. Feedback
  • 3. Database development life cycle • Planning Phase • Initial Planning is the necessary function which takes place during the strategic database plan in an organization. • Initial planning information requires following : 1. How many application software is in use, and which department is responsible for this. 2. Which type of function needs to be performed 3. Which types of data is associated with. This type of information generally identifies the hardware, software and storage requirement.
  • 4. Database development life cycle • Feasibility • The feasibility involves 1. Technical feasibility :- Is the technology suitable for . developing the database? In this study, the DBA identifies that whether the hardware and software are required to design the database is available in the organization or not and whether training is needed.
  • 5. Database development life cycle 2. Operational Feasibility :- Does the organization have resources like man, skill, money, and material to create a reliable database? In this DBA identify whether the organization has the skilled person and budget to create a database or nor. DBA also identify the designing cost and measured the benefits from the database.
  • 6. Database development life cycle • Database Design • The database design is the essential component to DDLC. • In this, the detailed description about the system specification, and design documents are maintained. • It also defines how system should be created. • In this DBA suggest which type of database model is required. • It can be a physical model, a logical model, and conceptual model.
  • 7. Database development life cycle • Implementation • In this phase, the DBA creates a pilot project before implementing a system into an organization. • In a pilot project, the system is going to implement in some departments. • If the system successfully implemented than it will be implemented in a whole organization. • Creating a data dictionary is an important task in implementation. • DD is the central repository for the database and it contains the security and access features for the system.
  • 8. Database development life cycle • Testing Phase • In this phase, DBA tests the functioning of the implemented system. • The goal of testing is to find errors and bugs. • Errors and bugs require a review of the analysis, design and implementation processes to get corrected.
  • 9. Database development life cycle • Maintenance • Maintenance is the method of observing and maintaining the database system. • The performance of the system has been observed in this phase. • If the performance of a system falls below then immediately DBA takes a necessary action.
  • 10. Database development life cycle • Feedback • In this phase feedback of a system is received from the end user.
  • 11. Conceptual Database Design • The purpose of the conceptual design phase is to build a conceptual model based upon the previously identified requirements, but closer to the final physical mode. • A commonly used conceptual model is called an entity- relationship model.
  • 12. Conceptual Database Design • Principal of conceptual database design • The concept of conceptual database design is to define the relationship between objects. • Object and relationship are the two major components of the conceptual database. • Objects like people, place, and plants etc. • The relationship is used to create a link between 2 or more objects. • For example: Mohan sales a health drink to Ravi. • It delivers a mapping of things in real time.
  • 13. Conceptual Database Design • The principals of conceptual models are as follows: 1. The role of conceptual models is collect the data for query and reports purpose. 2. The data can be updated through a user interface. 3. Collect data from different sources in the central repository, from which users can access the data. 4. It also indicates that which data or information to be updated from where and how. 5. Used to support the data analysis.
  • 14. Entity-Relationship Model • The Entity-Relationship (ER) data model is based on the observation of a real world which consists of a set of basic objects. • These distinguishable basic objects are called as entities. • The entities are characterized by means of the attributes. • The associations existing between the basic entities are termed as relationships.
  • 15. Entity-Relationship Model • The pictorial representation of showing the connectivity among the entities (with attributes) and relationships is called as Entity- Relationship or simply ER model. • It is the conceptual structure of the requirements gathered from the enterprise. • From the ER model an enterprise can be clearly visualized. • As this model is drawn on the paper to represent the whole organization or enterprise, it becomes a tool.
  • 16. Entity-Relationship Model • Of course the tool is used distinctly in the database design process. • This tool is the outcome of conceptual design of the database. • So, it is called as tool of the conceptual design. • From the first step of database design it is necessary to gather all the needs of the enterprise properly. • During this process, many, things are identified. • The activities or events, the objects that participate in the events and the characteristics of the objects are formulated clearly.
  • 17. Entity-Relationship Model • The objects identified are the entities and the collection of similar entities is called as entity set. • The associations involving the entity sets are relationships. • Collection of similar relationships is called as relationship set. • The objects can be clearly identified with the help of their characteristics. • These characteristics collected are called as attributes. • The attributes explain the properties of the entities.
  • 18. Entity-Relationship Model • Entity and Entity sets • An entity is an "object" or a "thing" or 'a "person" which can be particularly identified in our view or mind. • It is obviously of interest to the enterprise. • They can be classified into different entity types or classes.
  • 19. Entity-Relationship Model • Entity and Entity sets • An entity set is a collection or set of entities of the same type. • In an enterprise . all the living and non-living things are identified as objects and these objects are nothing but entities. • Let us understand this clearly with the help of the examples.
  • 20. Entity and Entity sets • Example • Let us assume that a Cricket Match is going on. • Can you identify any entities there? • Let us do the exercise as follows:
  • 21. Entity and Entity sets • The batsmen playing for a country are entities. • The bowler is an entity. • The fielders are entities. • The ball is an entity. • The bats held by the batsmen are entities.
  • 22. Entity and Entity sets • The countries to which the players belong to are entities. • The umpires on the field and off the field are entities. • The commentators giving running commentary are entities. • The scorers recording the scores are entities.
  • 23. Entity and Entity sets • The live audience watching the match are entities. • The cameramen, the stumps, the advertising boards, the stadium, the city in which the match is going on are entities. • The list goes on and on. • Let us restrict it up to this point only.
  • 24. Entity and Entity sets • After the first observation now we can formulate the entity sets after the classification of similar entities into a single group. • Then the entity sets formed will be: • Country is an entity set, a set consisting of all the cricket playing countries. • Player is an entity set, a set consisting of all the players who play cricket.
  • 25. Entity and Entity sets • Umpire is an entity set, a set consisting of all the umpires. • Commentator is an entity set, a set consisting of all the commentators. • Scorer is an entity set, a set containing all the scorers. • Audience is an entity set, a set consisting the people watching the match. • Bat is an entity set, a set consisting the bats being used by the batsmen.
  • 26. Entity and Entity sets • Again the specification of the entity sets goes on and on. • The countries are clearly distinguishable from the Players, so they make a separate entity set. • But observe Commentators, Umpires and Scorers. • They are all officials in conducting a cricket match. • So, they may be classified to a single entity set Official. • The Official entity set becomes a super entity set, from which the Umpire, Commentator and Scorer can be derived.
  • 27. Entity and Entity sets • Example 2: • Identify the entities in a College or Institution. • The identification of persons / objects / things is as follows: • Write in Comments section.
  • 28. Entity and Entity sets • Students studying in the college are entities. • Books they read are entities. • Courses/Subjects they study are entities. • Faculty teaching to the students are entities. • Lab Assistants helping in conducting the experiments are entities. • The Equipments used at different labs are entities
  • 29. Entity and Entity sets • Specially invited Visiting Faculty are entities. • The Rooms in which classes are conducted are entities. • The administrative non-teaching Staff of the college are entities. • The benches, chairs, tables, racks etc. are entities.
  • 30. Entity and Entity sets • The benches, chairs, tables, racks etc. are entities. • The cycles, the cars and the bikes parked outside are also entities. • Again the identification may not include all the possible entities. • For the sake of simplicity the list is restricted. • In short the identified entity sets are:
  • 31. Entity and Entity sets • Student, Faculty, Lab Assistant, Visiting Faculty, Non-Teaching Staff • Book, Programme, Course, Equipment • Room, Bench, Chair, Table, Rack • Cycle, Car, Bike. • These are the only major entity sets consisting respective entities that are distinguishable from each other. • There may be more entity sets that might not been included in the above list.
  • 32. Types of Entity 1. Strong Entity – • A strong entity is one that exists independent of other entity. • In other words, an entity set has a primary key is termed as strong entity set. • Example- Student, Employee, etc. STUDENT EMPLOYEE
  • 33. Types of Entity 2. Weak Entity – • A weak entity is an entity whose existence depends on some other entity. • In other words, an entity set which may not have sufficient attributes to form a primary key is termed as weak entity set. • Example- Room, Account, etc. ROOM ACCOUNT
  • 34. Difference between Strong entity and Weak entity
  • 35. Attributes • An attribute can be simply defined as a property or characteristics of an entity. • Each entity set has a set of attributes associated with it. • Following are some examples of common entity sets with attributes : • STUDENT : Student id, Student name, Address, Contact • EMPLOYEE : Employee id, Employee name, Designation, Branch • ACCOUNT : Account number, Account type, Balance
  • 36. Types of Attributes 1. Base attributes – • Entering the value's for these attributes is compulsory. • For example `marks 1', `marks2', `marks3' which are the marks of the student scored in three subjects. • The roll number or identification number 'Sid', the date of birth `Dob', the runs scored in a match 'Runs', the wickets taken in a match `Wickets' are also the examples of base attributes.
  • 37. Types of Attributes 2. Derived attributes – • These are the attributes for which the value is calculated using the base attributes or some operations involving base attributes. • For example total marks 'Total' is derived from the sum of `marks1, `marks2' and ‘marks3'. • The age of the student 'Age' is derived from the date of birth `Dob‘. • The rank of the student 'Rank' may be derived from the attribute 'Total'. • The gross salary 'Salary' may be derived from 'Basic', ‘DA’ and ‘HRA'.
  • 38. Types of Attributes 3. Atomic attributes – • The attributes which are not further divisible into some more attributes are called as atomic attributes. • For example the basic salary of an employee 'Basic' is not further divisible into more than one attribute. • The attributes 'marks 1', `marks2', `marks3', 'Rank', 'DA' and `HRA’ are also atomic attributes.
  • 39. Types of Attributes 4. Composite attributes – • The attributes that are further divisible are called composite attributes. • In other words the combination of more than one attribute is called as composite attribute. • For example the address of a student 'Address' is a combination of house number `HNo', 'Street', `City' and the pin code ‘PIN'. • The attribute `SName' may be also a combination of first name `Fname', middle name `Mname' and last name ‘Lname'.
  • 40. Types of Attributes 5. Single valued attribute – • The attribute that takes only one value is called as single valued attribute. • For example the value entered for the attributes 'Marks1’, ‘Marks2' and `Marks3' is single value within a range 0 to 100. • The value entered for roll number 'Sid' of a student and name of a student ‘SName' is single.
  • 41. Types of Attributes 6. Multi-valued attributes – • The attributes that take more than one value are called multi- valued attributes. • For example 'Color' of a flag may take the values blue, white, green and saffron.
  • 42. Types of Attributes 7. Attributes with NULL value – • It is clear from the above description that normally every attribute takes values from the range of values. • There is every chance that for one particular entity the value of the attribute may be missing or not presently available. • Then it must be properly handled. • Such missing value can be replaced with a systematic NULL value. • Such attributes are NULL value attributes. • If permission for an attribute to store NULL value is not given then such 'condition is called NOT NULL restriction or constraint. • For example an attribute 'Sid' may not be permitted to store NULL value because a student may not exist without a roll number. • But the subject allotted `SAllot' for a new appointed teacher at a given time can be stored with NULL.
  • 43. Types of Attributes • Symbols –
  • 44. Types of Attributes • Example –
  • 45. Types of Attributes • Example –
  • 46. Types of Attributes • Example –
  • 47. Types of Attributes • Example –
  • 48. Subset and Super set • Set is {A,B,C} • Its Subset are – • {A},{B},{C},{A,B},{A,C},{B,C},{A,B,C} • Set is {A,B,C} • Super set of {A} – {A}, {A,B}, {A,C},{A,B,C} • Superset of {A,B} – {A.B}, {A,B,C}
  • 49. Keys • Keys are attributes or set of attributes used to distinguish one entity from another in an entity set. 1. Super Key • A super key is set of one or more attributes that can uniquely identify an entity in an entity set. • Also any superset of super key can be termed as super key. • This can be better understood from following example
  • 50. Keys • Suppose an entity has four attributes A, B, C and D. • Now, if attribute A can uniquely identify an entity then A is super key. • For that entity, also combination of any attribute/ attributes with attribute A can also be termed as super key. • That is {A,B}, {A,C}, {A,D}, {A,B,C}, {A,B,D}, {A,C,D} & {A,B,C,D} can be termed as super key.
  • 51. Keys 2. Candidate Key • All the attributes or set of attribute, which can uniquely identify an entity are candidate keys. • Only those key can be candidate key whose no proper subset is a super key. • This can be better understood by following example -
  • 52. Keys • Suppose an entity has 4 attributes A,B,C and D. • Now if attribute {A} & {C,D} both can uniquely identity an entity, then from the definition of Super Key, following are also be the super keys. • Corresponding to A - {A}, {A,B}, {A,C), (A,D), {A,B,C}, {A,B,D}, {A,C,D}, (A,B,C,D). • Corresponding to C,D - {C,D,A}, {C,D,B}, {C,D,A,B}.
  • 53. Keys • Now according to our definition of candidate keys, only those key can be candidate keys, whose no proper subset is a super key. • According to this {A, B} cannot be a candidate key because its subset {A} is a super key. • Also {B,C,D} cannot be candidate key because its subset {C,D} is a super key. • Working in the same way only {A} & {C,D} can be candidate key.
  • 54. Keys 3. Primary Key : • The primary key is the term used for the candidate key that is chosen by the database designer as the principal means of identifying an entity. • Suppose an entity has 4 attributes A,B,C and D. • Now if attribute {A} & {C,D} both can uniquely identity an entity, then from the definition of Super Key, following are also be the super keys. And also Candidate keys. • Now either {A} or {C,D} can be a Primary key.
  • 55. Keys 4. Alternate Keys : • The alternate key is term used for the candidate keys that are remaining after the primary key has be chosen by database designer.
  • 56. Keys 5. Foreign Key • A foreign key is an attribute or set of attribute in a relation of database that serve as the primary key of another relation in the same database. • For example – • Employee (EmpiD, Name, DeptName, Salary) • Department {DeptName, Location, PhoneNo) • Here DeptName is the foreign key in Employee table because it serves as the primary key in Department table.
  • 57. Keys 6. Composite Key • A primary key that consists of more than one attribute is called composite key. • Example- • Suppose an entity has 5 attributes P,Q,R,S,T. • Now if attribute {Q} & {P,T} both can uniquely identity an entity then {P,T} is a composite key because it consist more than one attribute.
  • 58. Keys Question- • There are two relations- • R1(A,B,C,D) • R2(B,P,Q,R) • Here {A} and {C,D} uniquely identify an entity then • Super keys are- • Corresponding to {A}- A,AB,AC,AD,ABC,ABD,ACD,ABCD • Corresponding to {C,D}- CD, CDA,CDB,CDAB
  • 59. Keys Question- • There are two relations- • R1(A,B,C,D) • R2(B,P,Q,R) • Here {A} and {C,D} uniquely identify an ENTITY then • Candidate keys are- {A} and {C,D}
  • 60. Keys Question- • There are two relations- • R1(A,B,C,D) • R2(B,P,Q,R) • Here {A} and {C,D} uniquely identify an attribute then • Primary keys are- Either {A} or {C,D}
  • 61. Keys Question- • There are two relations- • R1(A,B,C,D) • R2(B,P,Q,R) • Here {A} and {C,D} uniquely identify an attribute then • Alternate keys are- • If {A} is primary key then {C,D} is alternate key. • If {C,D} is primary key then {A} is alternate key.
  • 62. Keys Question- • There are two relations- • R1(A,B,C,D) – {A}, {C,D} • R2(B,P,Q,R) – {B} • Here {A} and {C,D} uniquely identify an attribute then • Foreign Key is- {B}
  • 63. Keys Question- • There are two relations- • R1(A,B,C,D) • R2(B,P,Q,R) • Here {A} and {C,D} uniquely identify an attribute then • Composite Key is- {C,D}