SlideShare a Scribd company logo
Unit No. - II
DBMS
By Dr. Dhobale J V
Assistant Professor
IBS, IFHE, Hyderabad.
IBS Hyderabad 1
Objectives
 E-R Diagram.
 Features of RDBMS.
 Normalization Process(upto 3NF).
 Functional Dependencies.
 Decomposition.
2IBS Hyderabad
Database Design and the E-R Model
 In designing of database schema, we must
ensure that we avoid two major pitfalls –
1. Redundancy
2. Incompleteness
3IBS Hyderabad
Database Design and the E-R Model
 The Entity-Relationship Model: The E-R Model
was developed to facilitate database design by
allowing specification of an enterprise schema
that represents the overall logical structure of
a database.
 The E-R Model is very useful in mapping the
meaning and interactions of real-world
enterprises onto a conceptual schema.
4IBS Hyderabad
Database Design and the E-R Model
 The E-R data model employs three basic
concepts – entity sets, relationship sets and
attributes.
 An entity is a “thing” or “object” in the real
world that is distinguishable from all other
objects.
 Ex- student, instructor, book.
5IBS Hyderabad
Database Design and the E-R Model
 An entity has a set of properties, and the
values for some set of properties may uniquely
identify an entity.
 Ex. – A person may have person_Id property
whose value uniquely identifies that person.
 An entity set is a set of entities of the same
type that share the same properties.
6IBS Hyderabad
Database Design and the E-R Model
 An entity is represented by a set of attributes.
 Attributes are the descriptive properties
possessed by each member of an entity set.
 Each entity has a value for each of its
attributes.
7IBS Hyderabad
Database Design and the E-R Model
8IBS Hyderabad
Database Design and the E-R Model
 Relationship: A relationship is an association
among several entities.
 Ex. Instructor Crick advisor to student Zhang.
 A relationship set is a set of relationships of
the same type.
9IBS Hyderabad
Database Design and the E-R Model
 Consider the two entity sets instructor and
student
 We define relationship advisor to denote the
association between instructor and student,
shown below -
10IBS Hyderabad
Database Design and the E-R Model
11IBS Hyderabad
Database Design and the E-R Model
 Recursive Relationship – The same entity set
participates in a relationship set more than
once in different roles.
 Descriptive attribute
12IBS Hyderabad
Database Design and the E-R Model
13IBS Hyderabad
Database Design and the E-R Model
 The number of entity sets that participate in a
relationship set is the degree of the
relationship set.
 A binary relationship set is of degree 2; & a
ternary relationship set is of degree 3.
14IBS Hyderabad
Database Design and the E-R Model
 Attributes: For each attribute, there is a set of
permitted values, called domain, or value.
 An attribute of an entity set is a function that
maps form the entity set into a domain.
 Different types of attributes –
1. Simple attribute – The attribute which can not
be divided into subparts is called simple
attribute; Ex- Enrol_No.
15IBS Hyderabad
Database Design and the E-R Model
 Attributes:
 Different types of attributes –
2. Composite attribute – The attribute which can
be divided into subparts is called composite
attribute;
 Ex- name can be divided into subparts like
fist_name, middle_name & last_name.
16IBS Hyderabad
Database Design and the E-R Model
 Attributes:
 Different types of attributes –
3. Single-valued attribute – attribute which has a
single value only.
 Ex. Account_No.
4. Multi-valued attribute – attributes which has a
set of values.
 Ex. Phone_No.
17IBS Hyderabad
Database Design and the E-R Model
 Attributes:
 Different types of attributes –
5. Derived attribute – The value for this type of
attribute can be derived from the values of
other related attributes or entities.
 Ex. From DOB value we can derive age
attribute.
 An attribute takes a null value when an entity
does not have a value for it.
18IBS Hyderabad
Database Design and the E-R Model
 Constraints: An E-R enterprise schema may
define certain constraints to which the
contents of a database must conform.
 Mapping Cardinalities/Cardinality ratios:
express the number of entities to which
another entity can be associated via a
relationship set
 For a binary relationship set R between entity
sets A and B, the mapping cardinalities must
be one of the following -
19IBS Hyderabad
Database Design and the E-R Model
 Constraints:.
 Mapping Cardinalities/Cardinality ratios:
1. One-to-one – An entity in A is associated with
at most one entity in B, and an entity in B is
associated with at most one entity in A.
20IBS Hyderabad
Database Design and the E-R Model
 Constraints:.
 Mapping Cardinalities/Cardinality ratios:
2. One-to-many – An entity in A is associated
with any number (zero or more) of entities in
B. An entity in B, however, can be associated
with at most one entity in A.
21IBS Hyderabad
Database Design and the E-R Model
 Constraints:.
 Mapping Cardinalities/Cardinality ratios:
3. Many-to-One: An entity in A is associated
with at most one entity in B. An entity in B,
however, can be associated with any number
(zero or more) of entities in A.
22IBS Hyderabad
Database Design and the E-R Model
 Constraints:.
 Mapping Cardinalities/Cardinality ratios:
4. Many-to-Many: An entity in A is associated
with any number (zero or more) of entities in
B, and an entity in B is associated with any
number (zero or more) of entities in A.
23IBS Hyderabad
Database Design and the E-R Model
 Keys: The values of the attribute for an entity
must be such that they can uniquely identify
the entity.
 A key for an entity is a set of attributes that
suffice to distinguish entities from each other.
24IBS Hyderabad
Database Design and the E-R Model
 Keys:
 A super key of an entity set is a set of one or
more attributes whose values uniquely
determine each entity.
 A candidate key of an entity set is a minimal
super key
 Social-security is candidate key of customer.
 Account-number is candidate key of account.
 Although several candidate keys may exist,
one of the candidate keys is selected to be the
primary key.
25IBS Hyderabad
Database Design and the E-R Model
 Keys:
 The combination of primary keys of the
participating entity sets forms a candidate key
of a relationship set.
 Must consider the mapping cardinality and the
semantics of the relationship set when selecting the
primary key.
 (social-security, account-number) is the primary key
of depositor.
26IBS Hyderabad
Database Design and the E-R Model
 Components of E-R Diagram:
 Rectangles represent entity sets.
 Ellipses represent attributes.
 Diamonds represent relationship sets.
 Lines link attributes to entity sets and entity sets to
relationship sets.
 Double ellipses represent multivalued attributes.
 Dashed ellipses denote derived attributes.
 Primary key attributes are underlined.
27IBS Hyderabad
Database Design and the E-R Model
 Components of E-R Diagram:
28IBS Hyderabad
Database Design and the E-R Model
 Entity – Relationship Diagram:
29IBS Hyderabad
Database Design and the E-R Model
 Entity – Relationship Diagram:
30IBS Hyderabad
Database Design and the E-R Model
 Entity – Relationship Diagram:
31IBS Hyderabad
Database Design and the E-R Model
 Weak Entity Sets:
 An entity set that does not have a primary key
is referred to as a weak entity set.
 The existence of a weak entity set depends on
the existence of a strong entity set; it must
relate to the strong set via a one-to-many
relationship set.
 The discriminator (or partial key) of a weak
entity set is the set of attributes that
distinguishes among all the entities of a weak
entity set.
32IBS Hyderabad
Database Design and the E-R Model
 Weak Entity Sets:
 The primary key of a weak entity set is formed
by the primary key of the strong entity set on
which the weak entity set is existence
dependent, plus the weak entity set’s
discriminator.
 We depict a weak entity set by double
rectangles.
 We underline the discriminator of a weak entity
set with a dashed line.
33IBS Hyderabad
Database Design and the E-R Model
 Weak Entity Sets:
 payment-number – discriminator of the
payment entity set
 Primary key for payment – (loan-number,
payment-number)
34IBS Hyderabad
Database Design and the E-R Model
 Specialization:
 Top-down design process; we designate
subgroupings within an entity set that are
distinctive from other entities in the set.
 These subgroupings become lower-level entity
sets that have attributes or participate in
relationships that do not apply to the higher-
level entity set.
 Depicted by a triangle component labeled ISA
(i.e., savings-account “is an” account)
35IBS Hyderabad
Database Design and the E-R Model
 Specialization:
36IBS Hyderabad
Database Design and the E-R Model
 Generalization:
 A bottom-up design process – combine a
number of entity sets that share the same
features into a higher-level entity set
 Specialization and generalization are simple
inversions of each other; they are represented
in an E-R diagram in the same way.
 Attribute Inheritance – a lower-level entity
set inherits all the attributes and relationship
participation of the higher-level entity set to
which it is linked.
37IBS Hyderabad
Database Design and the E-R Model
 Design Constraints on a Generalization:
 Constraint on which entities can be members
of a given lower-level entity set.
 condition-defined
 user-defined
 Constraint on whether or not entities may
belong to more than one lower-level entity set
within a single generalization.
 Disjoint
 overlapping
38IBS Hyderabad
Database Design and the E-R Model
 Design Constraints on a Generalization:
 Completeness constraint – specifies whether or not an
entity in the higher-level entity set must belong to at
least one of the lower-level entity sets within a
generalization.
 Total
 partial
39IBS Hyderabad
Database Design and the E-R Model
 Design Constraints on a Generalization:
40IBS Hyderabad
Database Design and the E-R Model
 Aggregation: Aggregation is a process when
relation between two entity is treated as a
single entity.
 Here the relation between Center and Course,
is acting as an Entity in relation with Visitor..
41IBS Hyderabad
Database Design and the E-R Model
 Aggregation: Relationship sets borrower and
loan-officer represent the same information
 Eliminate this redundancy via aggregation
 Treat relationship as an abstract entity.
 Allows relationships between relationships.
 Abstraction of relationship into new entity.
 Without introducing redundancy, the following
diagram represents that:
 A customer takes out a loan.
 An employee may be a loan officer for a customer-
loan pair.
42IBS Hyderabad
Database Design and the E-R Model
 How to draw a basic ER diagram:
1. Purpose and scope: Define the purpose and
scope of what you’re analyzing or modeling.
2. Entities: Identify the entities that are
involved. When you’re ready, start drawing
them in rectangles (or your system’s choice
of shape) and labeling them as nouns.
43IBS Hyderabad
Database Design and the E-R Model
 How to draw a basic ER diagram:
3. Relationships: Determine how the entities are all
related. Draw lines between them to signify the
relationships and label them. Some entities may not
be related, and that’s fine. In different notation
systems, the relationship could be labelled in a
diamond, another rectangle or directly on top of the
connecting line.
4. Attributes: Layer in more detail by adding key
attributes of entities. Attributes are often shown as
ovals.
5. Cardinality: Show whether the relationship is 1-1, 1-
many or many-to-many.
44IBS Hyderabad
Important Features of RDBMS
 RDBMS is a database management
system based on relational model defined by
E.F.Codd.
 Data is stored in the form
of rows and columns and also provides ACID
properties functionality.
 A transaction in a database system must
maintain Atomicity, Consistency, Isolation, and
Durability − commonly known as ACID
properties − in order to ensure accuracy,
completeness, and data integrity.
45IBS Hyderabad
Important Features of RDBMS
 Atomicity:
 Atomicity requires that each transaction be "all
or nothing": if one part of the transaction fails,
then the entire transaction fails, and the
database state is left unchanged.
 An atomic system must guarantee atomicity in
each and every situation, including power
failures, errors and crashes.
46IBS Hyderabad
Important Features of RDBMS
 Consistency:
 The consistency property ensures that any
transaction will bring the database from one
valid state to another.
 Any data written to the database must be valid
according to all defined rules, including
constraints, cascades, triggers, and any
combination thereof.
47IBS Hyderabad
Important Features of RDBMS
 Isolation:
 The isolation property ensures that the
concurrent execution of transactions results in
a system state that would be obtained if
transactions were executed sequentially, i.e.,
one after the other.
 Providing isolation is the main goal of
concurrency control. Depending on the
concurrency control method, the effects of an
incomplete transaction might not even be
visible to another transaction.
48IBS Hyderabad
Important Features of RDBMS
 Durability:
 The durability property ensures that once a
transaction has been committed, it will remain
so, even in the event of power loss, crashes,
or errors.
 In a relational database, for instance, once a
group of SQL statements execute, the results
need to be stored permanently.
49IBS Hyderabad
Normalization
 Without Normalization, it becomes difficult to
handle and update the database, without
facing data loss.
 Insertion, Updation and Deletion Anamolies
are very frequent if Database is not
Normalized.
 To understand these anomalies let us take an
example of Student table.
50IBS Hyderabad
Normalization
 Updation Anomaly : To update address of a student
who occurs twice or more than twice in a table, we will
have to update S_Address column in all the rows,
else data will become inconsistent.
51IBS Hyderabad
Normalization
 Insertion Anomaly : Suppose for a new
admission, we have a Student id(S_id), name
and address of a student but if student has not
opted for any subjects yet then we have to
insert NULLthere, leading to Insertion
Anomaly.
 Deletion Anomaly : If (S_id) 401 has only one
subject and temporarily he drops it, when we
delete that row, entire student record will be
deleted along with it.
52IBS Hyderabad
Normalization
 Normalization rule are divided into following
normal form.
1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. BCNF
53IBS Hyderabad
Normalization
1. First Normal Form :
 As per the rule of first normal form, an
attribute (column) of a table cannot hold
multiple values. It should hold only atomic
values.
 Example: Suppose a company wants to store
the names and contact details of its
employees. It creates a table that looks like
this:
54IBS Hyderabad
Normalization
1. First Normal Form:
55IBS Hyderabad
Normalization
1. First Normal Form:
 Two employees (Jon & Lester) are having
two mobile numbers so the company stored
them in the same field as you can see in the
table above.
 This table is not in 1NF as the rule says
“each attribute of a table must have atomic
(single) values”, the emp_mobile values for
employees Jon & Lester violates that rule.
56IBS Hyderabad
Normalization
1. First Normal Form:
 To make the table complies with 1NF we
should have the data like this:.
57IBS Hyderabad
Functional Dependencies
 The attributes of a table is said to be
dependent on each other when an attribute of
a table uniquely identifies another attribute of
the same table.
 For example: Suppose we have a student
table with attributes: Stu_Id, Stu_Name,
Stu_Age.
 Here Stu_Id attribute uniquely identifies the
Stu_Name attribute of student table because
if we know the student id we can tell the
student name associated with it.
58IBS Hyderabad
Functional Dependencies
 This is known as functional dependency and
can be written as Stu_Id->Stu_Name or in
words we can say Stu_Name is functionally
dependent on Stu_Id.
 Formally:
 If column A of a table uniquely identifies the
column B of same table then it can
represented as A->B (Attribute B is
functionally dependent on attribute A).
59IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
1. Trivial functional dependency
2. Non-trivial functional dependency
3. Multivalued dependency
4. Transitive dependency
60IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
1. Trivial functional dependency:
 The dependency of an attribute on a set of attributes is
known as trivial functional dependency if the set of
attributes includes that attribute.
 Symbolically: A ->B is trivial functional dependency if
B is a subset of A.
 The following dependencies are also trivial: A->A & B-
>B.
61IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
1. Trivial functional dependency:
 For example: Consider a table with two columns
Student_id and Student_Name.
 {Student_Id, Student_Name} -> Student_Id is a trivial
functional dependency as Student_Id is a subset of
{Student_Id, Student_Name}.
 That makes sense because if we know the values of
Student_Id and Student_Name then the value of
Student_Id can be uniquely determined.
 Also, Student_Id -> Student_Id & Student_Name ->
Student_Name are trivial dependencies too.
62IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
2. Non-Trivial functional dependency: a functional
dependency X->Y holds true where Y is not a subset
of X then this dependency is called non trivial
Functional dependency.
63IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
2. Non-Trivial functional dependency:
 For example:
An employee table with three attributes: emp_id,
emp_name, emp_address.
The following functional dependencies are non-trivial:
emp_id -> emp_name (emp_name is not a subset of
emp_id)
emp_id -> emp_address (emp_address is not a subset
of emp_id)
 On the other hand, the following dependencies are
trivial:
{emp_id, emp_name} -> emp_name [emp_name is a
subset of {emp_id, emp_name}]
64IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
2. Non-Trivial functional dependency:
 Completely non trivial FD:
If a FD X->Y holds true where X intersection Y is null
then this dependency is said to be completely non
trivial function dependency.
65IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
3. Multivalued dependency: Multivalued dependency
occurs when there are more than
one independent multivalued attributes in a table.
 For example: Consider a bike manufacture
company, which produces two colors (Black and
white) in each model every year.
66IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
3. Multivalued dependency:
 Here columns manuf_year and color are independent
of each other and dependent on bike_model. In this
case these two columns are said to be multivalued
dependent on bike_model.
67IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
3. Multivalued dependency:
 These dependencies can be represented like this:
 bike_model ->> manuf_year
68IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
4. Transitive dependency: A functional dependency is
said to be transitive if it is indirectly formed by two
functional dependencies. For e.g.
 X -> Z is a transitive dependency if the following three
functional dependencies hold true:
 X->Y
 Y does not ->X
 Y->Z
 Note: A transitive dependency can only occur in a
relation of three of more attributes. This dependency
helps us normalizing the database in 3NF (3rd Normal
Form).
69IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
4. Transitive dependency:
 Example: Let’s take an example to understand it
better:
70IBS Hyderabad
Functional Dependencies
 Types of of Functional Dependencies:
4. Transitive dependency:
 Example: Let’s take an example to understand it
better:
{Book} ->{Author} (if we know the book, we knows the
author name)
{Author} does not ->{Book}
{Author} -> {Author_age}
 Therefore as per the rule of transitive dependency:
{Book} -> {Author_age} should hold, that makes sense
because if we know the book name we can know the
author’s age.
71IBS Hyderabad
Normalization
2. Second normal form (2NF):
 A table is said to be in 2NF if both the
following conditions hold:
1. Table is in 1NF (First normal form)
2. No non-prime attribute is dependent on the
proper subset of any candidate key of table.
 An attribute that is not part of any candidate
key is known as non-prime attribute.
72IBS Hyderabad
Normalization
2. Second normal form (2NF):
 Ex. Suppose a school wants to store the data
of teachers and the subjects they teach. They
create a table that looks like this: Since a
teacher can teach more than one subjects,
the table can have multiple rows for a same
teacher.
73IBS Hyderabad
Normalization
2. Second normal form (2NF):
 Ex.
Candidate Keys: {teacher_id, subject}
Non prime attribute: teacher_age
74IBS Hyderabad
Normalization
2. Second normal form (2NF):
 The table is in 1 NF because each attribute
has atomic values. However, it is not in 2NF
because non prime attribute teacher_age is
dependent on teacher_id alone which is a
proper subset of candidate key.
 This violates the rule for 2NF as the rule says
“no non-prime attribute is dependent on the
proper subset of any candidate key of the
table”.
75IBS Hyderabad
Normalization
2. Second normal form (2NF):
 To make the table complies with 2NF we can
break it in two tables like this:
 teacher_details table:.
76IBS Hyderabad
Normalization
2. Second normal form (2NF):
 To make the table complies with 2NF we can
break it in two tables like this:
 teacher_subject table:
 Now the tables comply with Second normal
form (2NF). 77IBS Hyderabad
Normalization
3. Third normal form (3NF): A table design is
said to be in 3NF if both the following
conditions hold:
1. Table must be in 2NF
2. Transitive functional dependency of non-
prime attribute on any super key should be
removed.
 An attribute that is not part of any candidate
key is known as non-prime attribute.
78IBS Hyderabad
Normalization
3. Third normal form (3NF): In other words
3NF can be explained like this: A table is in
3NF if it is in 2NF and for each functional
dependency X-> Y at least one of the
following conditions hold:
 X is a super key of table
 Y is a prime attribute of table
 An attribute that is a part of one of the
candidate keys is known as prime attribute.
79IBS Hyderabad
Normalization
3. Third normal form (3NF):
 Example: Suppose a company wants to store
the complete address of each employee, they
create a table named employee_details that
looks like this:
80IBS Hyderabad
Normalization
3. Third normal form (3NF):
 Example:
 Super keys: {emp_id}, {emp_id, emp_name},
{emp_id, emp_name, emp_zip}…so on
Candidate Keys: {emp_id}
Non-prime attributes: all attributes except
emp_id are non-prime as they are not part of
any candidate keys.
81IBS Hyderabad
Normalization
3. Third normal form (3NF):
 Example:
 Here, emp_state, emp_city & emp_district
dependent on emp_zip. And, emp_zip is
dependent on emp_id that makes non-prime
attributes (emp_state, emp_city &
emp_district) transitively dependent on super
key (emp_id). This violates the rule of 3NF.
 To make this table complies with 3NF we have
to break the table into two tables to remove
the transitive dependency:
82IBS Hyderabad
Normalization
3. Third normal form (3NF):
 Example: employee table
83IBS Hyderabad
Normalization
3. Third normal form (3NF):
 Example: employee_zip table:
84IBS Hyderabad
Decomposition
 A functional decomposition is the process of
breaking down the functions of an
organization into progressively greater (finer
and finer) levels of detail.
 In decomposition, one function is described in
greater detail by a set of other supporting
functions.
85IBS Hyderabad
Decomposition
 The decomposition of a relation scheme R
consists of replacing the relation schema by
two or more relation schemas that each
contain a subset of the attributes of R and
together include all attributes in R.
 Decomposition helps in eliminating some of
the problems of bad design such as
redundancy, inconsistencies and anomalies.
86IBS Hyderabad
Decomposition
 There are two types of decomposition :
1. Lossy Decomposition
2. Lossless Join Decomposition
87IBS Hyderabad
Decomposition
1. Lossy Decomposition: The decomposition of
relation R into R1 & R2 is lossy when the join
(union) of R1 & R2 does not yield the same
relation as inn R”.
 One of the disadvantages of decomposition
into two or more relational schemes (or
tables) is that some information is lost during
retrieval of original relation or table.
88IBS Hyderabad
Decomposition
1. Lossy Decomposition: Consider that we have
table STUDENT with three attribute roll_no ,
s_name and department.
 This relation is decomposed into two relation
S_name and Dept_name
89IBS Hyderabad
Roll_no S_name Dept
111 Parimal Computer
222 Soham Electrical
333 Parimal Electrical
Decomposition
1. Lossy Decomposition:
 S_name
 Dept_name
90IBS Hyderabad
Roll_no S_name
111 Parimal
222 Soham
333 Parimal
S_name Dept
Parimal Computer
Soham Electrical
Parimal Electrical
Decomposition
1. Lossy Decomposition:
 In lossy decomposition ,spurious tuples are
generated when a natural join is applied to
the relations in the decomposition
 The above decomposition is a bad
decomposition or Lossy decomposition.
91IBS Hyderabad
Roll_no S_name Dept
111 Parimal Computer
222 Soham Electrical
333 Parimal Electrical
Decomposition
2. Lossyless join Decomposition: “The
decomposition of relation R into R1 and R2
is lossless when the join of R1 and R2 yield
the same relation as in R.“
 A relational table is decomposed (or factored)
into two or more smaller tables, in such a way
that the designer can capture the precise
content of the original table by joining the
decomposed parts. This is called lossless-
join (or non-additive join) decomposition.
92IBS Hyderabad
Decomposition
2. Lossyless join Decomposition: This is also
refferd as non-additive decomposition.
 The lossless-join decomposition is always
defined with respect to a specific set F of
dependencies.
 Consider that we have table STUDENT with
three attribute roll_no , s_name and
department.
93IBS Hyderabad
Decomposition
2. Lossyless join Decomposition:
 This relation is decomposed into two relation
S_name and Dept_name
94IBS Hyderabad
Roll_no S_name Dept_Name
111 Parimal Computer
222 Soham Electrical
333 Parimal Electrical
Decomposition
2. Lossyless join Decomposition:
 S_name
 Dept_name
95IBS Hyderabad
Roll_no S_name
111 Parimal
222 Soham
333 Parimal
Roll_No Dept_Name
111 Computer
222 Electrical
333 Electrical
Decomposition
2. Lossyless join Decomposition:
 Now ,when these two relations are joined on
the common column 'roll_no' ,the resultant
relation will look like stu_joined.
 In lossless decomposition, no any spurious
tuples are generated when a natural joined is
applied to the relations in the decomposition. 96IBS Hyderabad
Roll_no S_name Dept_Name
111 Parimal Computer
222 Soham Electrical
333 Parimal Electrical
Reviews
 DBMS Architecture & Users.
 E-R Diagram.
 Features of DBMS.
 Normalization Process(upto 3NF).
 Functional Dependencies.
 Decomposition.
97IBS Hyderabad
Thank You!
98IBS Hyderabad

More Related Content

What's hot

Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
Vidyasagar Mundroy
 
Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
arnold 7490
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Dipen Parmar
 
Dbms
DbmsDbms
Bab9
Bab9Bab9
Fundamentals of Database Design
Fundamentals of Database DesignFundamentals of Database Design
Fundamentals of Database Design
Information Technology
 
Database Management System ppt
Database Management System pptDatabase Management System ppt
Database Management System ppt
OECLIB Odisha Electronics Control Library
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
Rahul Narang
 
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
Usman Tariq
 
Dbms notes
Dbms notesDbms notes
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
Naman Joshi
 
Introduction To Database Management System
Introduction To Database Management SystemIntroduction To Database Management System
Introduction To Database Management System
cpjcollege
 
Introduction to database development
Introduction to database developmentIntroduction to database development
Introduction to database development
AKASH GHANATE
 
Ch09
Ch09Ch09
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
Sonia Mim
 
Datamodels & architecture
Datamodels & architectureDatamodels & architecture
Datamodels & architecture
Neeraj Kumar
 
Database Models, Client-Server Architecture, Distributed Database and Classif...
Database Models, Client-Server Architecture, Distributed Database and Classif...Database Models, Client-Server Architecture, Distributed Database and Classif...
Database Models, Client-Server Architecture, Distributed Database and Classif...
Rubal Sagwal
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
sameerraaj
 
ch1
ch1ch1

What's hot (20)

Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
 
Unit01 dbms
Unit01 dbmsUnit01 dbms
Unit01 dbms
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
Dbms
DbmsDbms
Dbms
 
Bab9
Bab9Bab9
Bab9
 
Fundamentals of Database Design
Fundamentals of Database DesignFundamentals of Database Design
Fundamentals of Database Design
 
Database Management System ppt
Database Management System pptDatabase Management System ppt
Database Management System ppt
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
 
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]
 
Dbms notes
Dbms notesDbms notes
Dbms notes
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
 
Introduction To Database Management System
Introduction To Database Management SystemIntroduction To Database Management System
Introduction To Database Management System
 
Introduction to database development
Introduction to database developmentIntroduction to database development
Introduction to database development
 
Ch09
Ch09Ch09
Ch09
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 
Datamodels & architecture
Datamodels & architectureDatamodels & architecture
Datamodels & architecture
 
Database Models, Client-Server Architecture, Distributed Database and Classif...
Database Models, Client-Server Architecture, Distributed Database and Classif...Database Models, Client-Server Architecture, Distributed Database and Classif...
Database Models, Client-Server Architecture, Distributed Database and Classif...
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
ch1
ch1ch1
ch1
 

Similar to Dbms basics 02

U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
E R model
E R modelE R model
ER modeling
ER modelingER modeling
ER modeling
Dabbal Singh Mahara
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
Prof. Dr. K. Adisesha
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
oudesign
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
MythiliMurugan3
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
IshuIswarya3
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
Tharindu Weerasinghe
 
Er model
Er modelEr model
Er model
slidenageswaran
 
U2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdfU2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdf
ssusera7b660
 
Dbms
DbmsDbms
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
Rupali Rana
 
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdfDBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
deshna2thunga0
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
Shailaja Jayaprakash
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
Ajit Nayak
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
VisnuDharsini
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
MaximusAranha
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I
pkaviya
 
DBMS Class 3
DBMS Class 3DBMS Class 3

Similar to Dbms basics 02 (20)

U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
 
E R model
E R modelE R model
E R model
 
ER modeling
ER modelingER modeling
ER modeling
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
Er model
Er modelEr model
Er model
 
U2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdfU2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdf
 
Dbms
DbmsDbms
Dbms
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdfDBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 

More from Jaipal Dhobale

Research Paper Network-Driven Monitoring
Research Paper Network-Driven MonitoringResearch Paper Network-Driven Monitoring
Research Paper Network-Driven Monitoring
Jaipal Dhobale
 
Computer Network Performance evaluation based on Network scalability using OM...
Computer Network Performance evaluation based on Network scalability using OM...Computer Network Performance evaluation based on Network scalability using OM...
Computer Network Performance evaluation based on Network scalability using OM...
Jaipal Dhobale
 
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
Jaipal Dhobale
 
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
Jaipal Dhobale
 
Computer Network Performance Evaluation Based on Different Data Packet Size U...
Computer Network Performance Evaluation Based on Different Data Packet Size U...Computer Network Performance Evaluation Based on Different Data Packet Size U...
Computer Network Performance Evaluation Based on Different Data Packet Size U...
Jaipal Dhobale
 
Unit no 08_dm_insights on challenges in management of disaster
Unit no 08_dm_insights on challenges in management of disasterUnit no 08_dm_insights on challenges in management of disaster
Unit no 08_dm_insights on challenges in management of disaster
Jaipal Dhobale
 
Unit no 07_dm_ascertaining roles
Unit no 07_dm_ascertaining rolesUnit no 07_dm_ascertaining roles
Unit no 07_dm_ascertaining roles
Jaipal Dhobale
 
Unit no 05 disaster response
Unit no 05 disaster responseUnit no 05 disaster response
Unit no 05 disaster response
Jaipal Dhobale
 
Disaster management and planning
Disaster management and planningDisaster management and planning
Disaster management and planning
Jaipal Dhobale
 
Unit no 14_the written research report
Unit no 14_the written research reportUnit no 14_the written research report
Unit no 14_the written research report
Jaipal Dhobale
 
Unit no 09_developing sampling plan
Unit no 09_developing sampling planUnit no 09_developing sampling plan
Unit no 09_developing sampling plan
Jaipal Dhobale
 
Unit no 08_designing questionnaire
Unit no 08_designing questionnaireUnit no 08_designing questionnaire
Unit no 08_designing questionnaire
Jaipal Dhobale
 
Unit no 07_measurement of scaling
Unit no 07_measurement of scalingUnit no 07_measurement of scaling
Unit no 07_measurement of scaling
Jaipal Dhobale
 
Unit no 06_collecting primary data by communication
Unit no 06_collecting primary data by communicationUnit no 06_collecting primary data by communication
Unit no 06_collecting primary data by communication
Jaipal Dhobale
 
Unit no 05_collecting primary data by observation
Unit no 05_collecting primary data by observationUnit no 05_collecting primary data by observation
Unit no 05_collecting primary data by observation
Jaipal Dhobale
 
Unit no 04_collecting secondary data from inside & outside the organization
Unit no 04_collecting secondary data from inside & outside the organizationUnit no 04_collecting secondary data from inside & outside the organization
Unit no 04_collecting secondary data from inside & outside the organization
Jaipal Dhobale
 
Unit no 03_types of research design
Unit no 03_types of research designUnit no 03_types of research design
Unit no 03_types of research design
Jaipal Dhobale
 
Unit no 02_research design formulation
Unit no 02_research design formulationUnit no 02_research design formulation
Unit no 02_research design formulation
Jaipal Dhobale
 
Unit no 01_introduction to research
Unit no 01_introduction to researchUnit no 01_introduction to research
Unit no 01_introduction to research
Jaipal Dhobale
 
Unit no 05_dm_disaster recovery
Unit no 05_dm_disaster recoveryUnit no 05_dm_disaster recovery
Unit no 05_dm_disaster recovery
Jaipal Dhobale
 

More from Jaipal Dhobale (20)

Research Paper Network-Driven Monitoring
Research Paper Network-Driven MonitoringResearch Paper Network-Driven Monitoring
Research Paper Network-Driven Monitoring
 
Computer Network Performance evaluation based on Network scalability using OM...
Computer Network Performance evaluation based on Network scalability using OM...Computer Network Performance evaluation based on Network scalability using OM...
Computer Network Performance evaluation based on Network scalability using OM...
 
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
WIRELESS - HOST TO HOST NETWORK PERFORMANCE EVALUATION BASED ON BITRATE AND N...
 
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
Wired and Wireless Computer Network Performance Evaluation Using OMNeT++ Simu...
 
Computer Network Performance Evaluation Based on Different Data Packet Size U...
Computer Network Performance Evaluation Based on Different Data Packet Size U...Computer Network Performance Evaluation Based on Different Data Packet Size U...
Computer Network Performance Evaluation Based on Different Data Packet Size U...
 
Unit no 08_dm_insights on challenges in management of disaster
Unit no 08_dm_insights on challenges in management of disasterUnit no 08_dm_insights on challenges in management of disaster
Unit no 08_dm_insights on challenges in management of disaster
 
Unit no 07_dm_ascertaining roles
Unit no 07_dm_ascertaining rolesUnit no 07_dm_ascertaining roles
Unit no 07_dm_ascertaining roles
 
Unit no 05 disaster response
Unit no 05 disaster responseUnit no 05 disaster response
Unit no 05 disaster response
 
Disaster management and planning
Disaster management and planningDisaster management and planning
Disaster management and planning
 
Unit no 14_the written research report
Unit no 14_the written research reportUnit no 14_the written research report
Unit no 14_the written research report
 
Unit no 09_developing sampling plan
Unit no 09_developing sampling planUnit no 09_developing sampling plan
Unit no 09_developing sampling plan
 
Unit no 08_designing questionnaire
Unit no 08_designing questionnaireUnit no 08_designing questionnaire
Unit no 08_designing questionnaire
 
Unit no 07_measurement of scaling
Unit no 07_measurement of scalingUnit no 07_measurement of scaling
Unit no 07_measurement of scaling
 
Unit no 06_collecting primary data by communication
Unit no 06_collecting primary data by communicationUnit no 06_collecting primary data by communication
Unit no 06_collecting primary data by communication
 
Unit no 05_collecting primary data by observation
Unit no 05_collecting primary data by observationUnit no 05_collecting primary data by observation
Unit no 05_collecting primary data by observation
 
Unit no 04_collecting secondary data from inside & outside the organization
Unit no 04_collecting secondary data from inside & outside the organizationUnit no 04_collecting secondary data from inside & outside the organization
Unit no 04_collecting secondary data from inside & outside the organization
 
Unit no 03_types of research design
Unit no 03_types of research designUnit no 03_types of research design
Unit no 03_types of research design
 
Unit no 02_research design formulation
Unit no 02_research design formulationUnit no 02_research design formulation
Unit no 02_research design formulation
 
Unit no 01_introduction to research
Unit no 01_introduction to researchUnit no 01_introduction to research
Unit no 01_introduction to research
 
Unit no 05_dm_disaster recovery
Unit no 05_dm_disaster recoveryUnit no 05_dm_disaster recovery
Unit no 05_dm_disaster recovery
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 

Dbms basics 02

  • 1. Unit No. - II DBMS By Dr. Dhobale J V Assistant Professor IBS, IFHE, Hyderabad. IBS Hyderabad 1
  • 2. Objectives  E-R Diagram.  Features of RDBMS.  Normalization Process(upto 3NF).  Functional Dependencies.  Decomposition. 2IBS Hyderabad
  • 3. Database Design and the E-R Model  In designing of database schema, we must ensure that we avoid two major pitfalls – 1. Redundancy 2. Incompleteness 3IBS Hyderabad
  • 4. Database Design and the E-R Model  The Entity-Relationship Model: The E-R Model was developed to facilitate database design by allowing specification of an enterprise schema that represents the overall logical structure of a database.  The E-R Model is very useful in mapping the meaning and interactions of real-world enterprises onto a conceptual schema. 4IBS Hyderabad
  • 5. Database Design and the E-R Model  The E-R data model employs three basic concepts – entity sets, relationship sets and attributes.  An entity is a “thing” or “object” in the real world that is distinguishable from all other objects.  Ex- student, instructor, book. 5IBS Hyderabad
  • 6. Database Design and the E-R Model  An entity has a set of properties, and the values for some set of properties may uniquely identify an entity.  Ex. – A person may have person_Id property whose value uniquely identifies that person.  An entity set is a set of entities of the same type that share the same properties. 6IBS Hyderabad
  • 7. Database Design and the E-R Model  An entity is represented by a set of attributes.  Attributes are the descriptive properties possessed by each member of an entity set.  Each entity has a value for each of its attributes. 7IBS Hyderabad
  • 8. Database Design and the E-R Model 8IBS Hyderabad
  • 9. Database Design and the E-R Model  Relationship: A relationship is an association among several entities.  Ex. Instructor Crick advisor to student Zhang.  A relationship set is a set of relationships of the same type. 9IBS Hyderabad
  • 10. Database Design and the E-R Model  Consider the two entity sets instructor and student  We define relationship advisor to denote the association between instructor and student, shown below - 10IBS Hyderabad
  • 11. Database Design and the E-R Model 11IBS Hyderabad
  • 12. Database Design and the E-R Model  Recursive Relationship – The same entity set participates in a relationship set more than once in different roles.  Descriptive attribute 12IBS Hyderabad
  • 13. Database Design and the E-R Model 13IBS Hyderabad
  • 14. Database Design and the E-R Model  The number of entity sets that participate in a relationship set is the degree of the relationship set.  A binary relationship set is of degree 2; & a ternary relationship set is of degree 3. 14IBS Hyderabad
  • 15. Database Design and the E-R Model  Attributes: For each attribute, there is a set of permitted values, called domain, or value.  An attribute of an entity set is a function that maps form the entity set into a domain.  Different types of attributes – 1. Simple attribute – The attribute which can not be divided into subparts is called simple attribute; Ex- Enrol_No. 15IBS Hyderabad
  • 16. Database Design and the E-R Model  Attributes:  Different types of attributes – 2. Composite attribute – The attribute which can be divided into subparts is called composite attribute;  Ex- name can be divided into subparts like fist_name, middle_name & last_name. 16IBS Hyderabad
  • 17. Database Design and the E-R Model  Attributes:  Different types of attributes – 3. Single-valued attribute – attribute which has a single value only.  Ex. Account_No. 4. Multi-valued attribute – attributes which has a set of values.  Ex. Phone_No. 17IBS Hyderabad
  • 18. Database Design and the E-R Model  Attributes:  Different types of attributes – 5. Derived attribute – The value for this type of attribute can be derived from the values of other related attributes or entities.  Ex. From DOB value we can derive age attribute.  An attribute takes a null value when an entity does not have a value for it. 18IBS Hyderabad
  • 19. Database Design and the E-R Model  Constraints: An E-R enterprise schema may define certain constraints to which the contents of a database must conform.  Mapping Cardinalities/Cardinality ratios: express the number of entities to which another entity can be associated via a relationship set  For a binary relationship set R between entity sets A and B, the mapping cardinalities must be one of the following - 19IBS Hyderabad
  • 20. Database Design and the E-R Model  Constraints:.  Mapping Cardinalities/Cardinality ratios: 1. One-to-one – An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A. 20IBS Hyderabad
  • 21. Database Design and the E-R Model  Constraints:.  Mapping Cardinalities/Cardinality ratios: 2. One-to-many – An entity in A is associated with any number (zero or more) of entities in B. An entity in B, however, can be associated with at most one entity in A. 21IBS Hyderabad
  • 22. Database Design and the E-R Model  Constraints:.  Mapping Cardinalities/Cardinality ratios: 3. Many-to-One: An entity in A is associated with at most one entity in B. An entity in B, however, can be associated with any number (zero or more) of entities in A. 22IBS Hyderabad
  • 23. Database Design and the E-R Model  Constraints:.  Mapping Cardinalities/Cardinality ratios: 4. Many-to-Many: An entity in A is associated with any number (zero or more) of entities in B, and an entity in B is associated with any number (zero or more) of entities in A. 23IBS Hyderabad
  • 24. Database Design and the E-R Model  Keys: The values of the attribute for an entity must be such that they can uniquely identify the entity.  A key for an entity is a set of attributes that suffice to distinguish entities from each other. 24IBS Hyderabad
  • 25. Database Design and the E-R Model  Keys:  A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity.  A candidate key of an entity set is a minimal super key  Social-security is candidate key of customer.  Account-number is candidate key of account.  Although several candidate keys may exist, one of the candidate keys is selected to be the primary key. 25IBS Hyderabad
  • 26. Database Design and the E-R Model  Keys:  The combination of primary keys of the participating entity sets forms a candidate key of a relationship set.  Must consider the mapping cardinality and the semantics of the relationship set when selecting the primary key.  (social-security, account-number) is the primary key of depositor. 26IBS Hyderabad
  • 27. Database Design and the E-R Model  Components of E-R Diagram:  Rectangles represent entity sets.  Ellipses represent attributes.  Diamonds represent relationship sets.  Lines link attributes to entity sets and entity sets to relationship sets.  Double ellipses represent multivalued attributes.  Dashed ellipses denote derived attributes.  Primary key attributes are underlined. 27IBS Hyderabad
  • 28. Database Design and the E-R Model  Components of E-R Diagram: 28IBS Hyderabad
  • 29. Database Design and the E-R Model  Entity – Relationship Diagram: 29IBS Hyderabad
  • 30. Database Design and the E-R Model  Entity – Relationship Diagram: 30IBS Hyderabad
  • 31. Database Design and the E-R Model  Entity – Relationship Diagram: 31IBS Hyderabad
  • 32. Database Design and the E-R Model  Weak Entity Sets:  An entity set that does not have a primary key is referred to as a weak entity set.  The existence of a weak entity set depends on the existence of a strong entity set; it must relate to the strong set via a one-to-many relationship set.  The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. 32IBS Hyderabad
  • 33. Database Design and the E-R Model  Weak Entity Sets:  The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator.  We depict a weak entity set by double rectangles.  We underline the discriminator of a weak entity set with a dashed line. 33IBS Hyderabad
  • 34. Database Design and the E-R Model  Weak Entity Sets:  payment-number – discriminator of the payment entity set  Primary key for payment – (loan-number, payment-number) 34IBS Hyderabad
  • 35. Database Design and the E-R Model  Specialization:  Top-down design process; we designate subgroupings within an entity set that are distinctive from other entities in the set.  These subgroupings become lower-level entity sets that have attributes or participate in relationships that do not apply to the higher- level entity set.  Depicted by a triangle component labeled ISA (i.e., savings-account “is an” account) 35IBS Hyderabad
  • 36. Database Design and the E-R Model  Specialization: 36IBS Hyderabad
  • 37. Database Design and the E-R Model  Generalization:  A bottom-up design process – combine a number of entity sets that share the same features into a higher-level entity set  Specialization and generalization are simple inversions of each other; they are represented in an E-R diagram in the same way.  Attribute Inheritance – a lower-level entity set inherits all the attributes and relationship participation of the higher-level entity set to which it is linked. 37IBS Hyderabad
  • 38. Database Design and the E-R Model  Design Constraints on a Generalization:  Constraint on which entities can be members of a given lower-level entity set.  condition-defined  user-defined  Constraint on whether or not entities may belong to more than one lower-level entity set within a single generalization.  Disjoint  overlapping 38IBS Hyderabad
  • 39. Database Design and the E-R Model  Design Constraints on a Generalization:  Completeness constraint – specifies whether or not an entity in the higher-level entity set must belong to at least one of the lower-level entity sets within a generalization.  Total  partial 39IBS Hyderabad
  • 40. Database Design and the E-R Model  Design Constraints on a Generalization: 40IBS Hyderabad
  • 41. Database Design and the E-R Model  Aggregation: Aggregation is a process when relation between two entity is treated as a single entity.  Here the relation between Center and Course, is acting as an Entity in relation with Visitor.. 41IBS Hyderabad
  • 42. Database Design and the E-R Model  Aggregation: Relationship sets borrower and loan-officer represent the same information  Eliminate this redundancy via aggregation  Treat relationship as an abstract entity.  Allows relationships between relationships.  Abstraction of relationship into new entity.  Without introducing redundancy, the following diagram represents that:  A customer takes out a loan.  An employee may be a loan officer for a customer- loan pair. 42IBS Hyderabad
  • 43. Database Design and the E-R Model  How to draw a basic ER diagram: 1. Purpose and scope: Define the purpose and scope of what you’re analyzing or modeling. 2. Entities: Identify the entities that are involved. When you’re ready, start drawing them in rectangles (or your system’s choice of shape) and labeling them as nouns. 43IBS Hyderabad
  • 44. Database Design and the E-R Model  How to draw a basic ER diagram: 3. Relationships: Determine how the entities are all related. Draw lines between them to signify the relationships and label them. Some entities may not be related, and that’s fine. In different notation systems, the relationship could be labelled in a diamond, another rectangle or directly on top of the connecting line. 4. Attributes: Layer in more detail by adding key attributes of entities. Attributes are often shown as ovals. 5. Cardinality: Show whether the relationship is 1-1, 1- many or many-to-many. 44IBS Hyderabad
  • 45. Important Features of RDBMS  RDBMS is a database management system based on relational model defined by E.F.Codd.  Data is stored in the form of rows and columns and also provides ACID properties functionality.  A transaction in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties − in order to ensure accuracy, completeness, and data integrity. 45IBS Hyderabad
  • 46. Important Features of RDBMS  Atomicity:  Atomicity requires that each transaction be "all or nothing": if one part of the transaction fails, then the entire transaction fails, and the database state is left unchanged.  An atomic system must guarantee atomicity in each and every situation, including power failures, errors and crashes. 46IBS Hyderabad
  • 47. Important Features of RDBMS  Consistency:  The consistency property ensures that any transaction will bring the database from one valid state to another.  Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. 47IBS Hyderabad
  • 48. Important Features of RDBMS  Isolation:  The isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially, i.e., one after the other.  Providing isolation is the main goal of concurrency control. Depending on the concurrency control method, the effects of an incomplete transaction might not even be visible to another transaction. 48IBS Hyderabad
  • 49. Important Features of RDBMS  Durability:  The durability property ensures that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors.  In a relational database, for instance, once a group of SQL statements execute, the results need to be stored permanently. 49IBS Hyderabad
  • 50. Normalization  Without Normalization, it becomes difficult to handle and update the database, without facing data loss.  Insertion, Updation and Deletion Anamolies are very frequent if Database is not Normalized.  To understand these anomalies let us take an example of Student table. 50IBS Hyderabad
  • 51. Normalization  Updation Anomaly : To update address of a student who occurs twice or more than twice in a table, we will have to update S_Address column in all the rows, else data will become inconsistent. 51IBS Hyderabad
  • 52. Normalization  Insertion Anomaly : Suppose for a new admission, we have a Student id(S_id), name and address of a student but if student has not opted for any subjects yet then we have to insert NULLthere, leading to Insertion Anomaly.  Deletion Anomaly : If (S_id) 401 has only one subject and temporarily he drops it, when we delete that row, entire student record will be deleted along with it. 52IBS Hyderabad
  • 53. Normalization  Normalization rule are divided into following normal form. 1. First Normal Form 2. Second Normal Form 3. Third Normal Form 4. BCNF 53IBS Hyderabad
  • 54. Normalization 1. First Normal Form :  As per the rule of first normal form, an attribute (column) of a table cannot hold multiple values. It should hold only atomic values.  Example: Suppose a company wants to store the names and contact details of its employees. It creates a table that looks like this: 54IBS Hyderabad
  • 55. Normalization 1. First Normal Form: 55IBS Hyderabad
  • 56. Normalization 1. First Normal Form:  Two employees (Jon & Lester) are having two mobile numbers so the company stored them in the same field as you can see in the table above.  This table is not in 1NF as the rule says “each attribute of a table must have atomic (single) values”, the emp_mobile values for employees Jon & Lester violates that rule. 56IBS Hyderabad
  • 57. Normalization 1. First Normal Form:  To make the table complies with 1NF we should have the data like this:. 57IBS Hyderabad
  • 58. Functional Dependencies  The attributes of a table is said to be dependent on each other when an attribute of a table uniquely identifies another attribute of the same table.  For example: Suppose we have a student table with attributes: Stu_Id, Stu_Name, Stu_Age.  Here Stu_Id attribute uniquely identifies the Stu_Name attribute of student table because if we know the student id we can tell the student name associated with it. 58IBS Hyderabad
  • 59. Functional Dependencies  This is known as functional dependency and can be written as Stu_Id->Stu_Name or in words we can say Stu_Name is functionally dependent on Stu_Id.  Formally:  If column A of a table uniquely identifies the column B of same table then it can represented as A->B (Attribute B is functionally dependent on attribute A). 59IBS Hyderabad
  • 60. Functional Dependencies  Types of of Functional Dependencies: 1. Trivial functional dependency 2. Non-trivial functional dependency 3. Multivalued dependency 4. Transitive dependency 60IBS Hyderabad
  • 61. Functional Dependencies  Types of of Functional Dependencies: 1. Trivial functional dependency:  The dependency of an attribute on a set of attributes is known as trivial functional dependency if the set of attributes includes that attribute.  Symbolically: A ->B is trivial functional dependency if B is a subset of A.  The following dependencies are also trivial: A->A & B- >B. 61IBS Hyderabad
  • 62. Functional Dependencies  Types of of Functional Dependencies: 1. Trivial functional dependency:  For example: Consider a table with two columns Student_id and Student_Name.  {Student_Id, Student_Name} -> Student_Id is a trivial functional dependency as Student_Id is a subset of {Student_Id, Student_Name}.  That makes sense because if we know the values of Student_Id and Student_Name then the value of Student_Id can be uniquely determined.  Also, Student_Id -> Student_Id & Student_Name -> Student_Name are trivial dependencies too. 62IBS Hyderabad
  • 63. Functional Dependencies  Types of of Functional Dependencies: 2. Non-Trivial functional dependency: a functional dependency X->Y holds true where Y is not a subset of X then this dependency is called non trivial Functional dependency. 63IBS Hyderabad
  • 64. Functional Dependencies  Types of of Functional Dependencies: 2. Non-Trivial functional dependency:  For example: An employee table with three attributes: emp_id, emp_name, emp_address. The following functional dependencies are non-trivial: emp_id -> emp_name (emp_name is not a subset of emp_id) emp_id -> emp_address (emp_address is not a subset of emp_id)  On the other hand, the following dependencies are trivial: {emp_id, emp_name} -> emp_name [emp_name is a subset of {emp_id, emp_name}] 64IBS Hyderabad
  • 65. Functional Dependencies  Types of of Functional Dependencies: 2. Non-Trivial functional dependency:  Completely non trivial FD: If a FD X->Y holds true where X intersection Y is null then this dependency is said to be completely non trivial function dependency. 65IBS Hyderabad
  • 66. Functional Dependencies  Types of of Functional Dependencies: 3. Multivalued dependency: Multivalued dependency occurs when there are more than one independent multivalued attributes in a table.  For example: Consider a bike manufacture company, which produces two colors (Black and white) in each model every year. 66IBS Hyderabad
  • 67. Functional Dependencies  Types of of Functional Dependencies: 3. Multivalued dependency:  Here columns manuf_year and color are independent of each other and dependent on bike_model. In this case these two columns are said to be multivalued dependent on bike_model. 67IBS Hyderabad
  • 68. Functional Dependencies  Types of of Functional Dependencies: 3. Multivalued dependency:  These dependencies can be represented like this:  bike_model ->> manuf_year 68IBS Hyderabad
  • 69. Functional Dependencies  Types of of Functional Dependencies: 4. Transitive dependency: A functional dependency is said to be transitive if it is indirectly formed by two functional dependencies. For e.g.  X -> Z is a transitive dependency if the following three functional dependencies hold true:  X->Y  Y does not ->X  Y->Z  Note: A transitive dependency can only occur in a relation of three of more attributes. This dependency helps us normalizing the database in 3NF (3rd Normal Form). 69IBS Hyderabad
  • 70. Functional Dependencies  Types of of Functional Dependencies: 4. Transitive dependency:  Example: Let’s take an example to understand it better: 70IBS Hyderabad
  • 71. Functional Dependencies  Types of of Functional Dependencies: 4. Transitive dependency:  Example: Let’s take an example to understand it better: {Book} ->{Author} (if we know the book, we knows the author name) {Author} does not ->{Book} {Author} -> {Author_age}  Therefore as per the rule of transitive dependency: {Book} -> {Author_age} should hold, that makes sense because if we know the book name we can know the author’s age. 71IBS Hyderabad
  • 72. Normalization 2. Second normal form (2NF):  A table is said to be in 2NF if both the following conditions hold: 1. Table is in 1NF (First normal form) 2. No non-prime attribute is dependent on the proper subset of any candidate key of table.  An attribute that is not part of any candidate key is known as non-prime attribute. 72IBS Hyderabad
  • 73. Normalization 2. Second normal form (2NF):  Ex. Suppose a school wants to store the data of teachers and the subjects they teach. They create a table that looks like this: Since a teacher can teach more than one subjects, the table can have multiple rows for a same teacher. 73IBS Hyderabad
  • 74. Normalization 2. Second normal form (2NF):  Ex. Candidate Keys: {teacher_id, subject} Non prime attribute: teacher_age 74IBS Hyderabad
  • 75. Normalization 2. Second normal form (2NF):  The table is in 1 NF because each attribute has atomic values. However, it is not in 2NF because non prime attribute teacher_age is dependent on teacher_id alone which is a proper subset of candidate key.  This violates the rule for 2NF as the rule says “no non-prime attribute is dependent on the proper subset of any candidate key of the table”. 75IBS Hyderabad
  • 76. Normalization 2. Second normal form (2NF):  To make the table complies with 2NF we can break it in two tables like this:  teacher_details table:. 76IBS Hyderabad
  • 77. Normalization 2. Second normal form (2NF):  To make the table complies with 2NF we can break it in two tables like this:  teacher_subject table:  Now the tables comply with Second normal form (2NF). 77IBS Hyderabad
  • 78. Normalization 3. Third normal form (3NF): A table design is said to be in 3NF if both the following conditions hold: 1. Table must be in 2NF 2. Transitive functional dependency of non- prime attribute on any super key should be removed.  An attribute that is not part of any candidate key is known as non-prime attribute. 78IBS Hyderabad
  • 79. Normalization 3. Third normal form (3NF): In other words 3NF can be explained like this: A table is in 3NF if it is in 2NF and for each functional dependency X-> Y at least one of the following conditions hold:  X is a super key of table  Y is a prime attribute of table  An attribute that is a part of one of the candidate keys is known as prime attribute. 79IBS Hyderabad
  • 80. Normalization 3. Third normal form (3NF):  Example: Suppose a company wants to store the complete address of each employee, they create a table named employee_details that looks like this: 80IBS Hyderabad
  • 81. Normalization 3. Third normal form (3NF):  Example:  Super keys: {emp_id}, {emp_id, emp_name}, {emp_id, emp_name, emp_zip}…so on Candidate Keys: {emp_id} Non-prime attributes: all attributes except emp_id are non-prime as they are not part of any candidate keys. 81IBS Hyderabad
  • 82. Normalization 3. Third normal form (3NF):  Example:  Here, emp_state, emp_city & emp_district dependent on emp_zip. And, emp_zip is dependent on emp_id that makes non-prime attributes (emp_state, emp_city & emp_district) transitively dependent on super key (emp_id). This violates the rule of 3NF.  To make this table complies with 3NF we have to break the table into two tables to remove the transitive dependency: 82IBS Hyderabad
  • 83. Normalization 3. Third normal form (3NF):  Example: employee table 83IBS Hyderabad
  • 84. Normalization 3. Third normal form (3NF):  Example: employee_zip table: 84IBS Hyderabad
  • 85. Decomposition  A functional decomposition is the process of breaking down the functions of an organization into progressively greater (finer and finer) levels of detail.  In decomposition, one function is described in greater detail by a set of other supporting functions. 85IBS Hyderabad
  • 86. Decomposition  The decomposition of a relation scheme R consists of replacing the relation schema by two or more relation schemas that each contain a subset of the attributes of R and together include all attributes in R.  Decomposition helps in eliminating some of the problems of bad design such as redundancy, inconsistencies and anomalies. 86IBS Hyderabad
  • 87. Decomposition  There are two types of decomposition : 1. Lossy Decomposition 2. Lossless Join Decomposition 87IBS Hyderabad
  • 88. Decomposition 1. Lossy Decomposition: The decomposition of relation R into R1 & R2 is lossy when the join (union) of R1 & R2 does not yield the same relation as inn R”.  One of the disadvantages of decomposition into two or more relational schemes (or tables) is that some information is lost during retrieval of original relation or table. 88IBS Hyderabad
  • 89. Decomposition 1. Lossy Decomposition: Consider that we have table STUDENT with three attribute roll_no , s_name and department.  This relation is decomposed into two relation S_name and Dept_name 89IBS Hyderabad Roll_no S_name Dept 111 Parimal Computer 222 Soham Electrical 333 Parimal Electrical
  • 90. Decomposition 1. Lossy Decomposition:  S_name  Dept_name 90IBS Hyderabad Roll_no S_name 111 Parimal 222 Soham 333 Parimal S_name Dept Parimal Computer Soham Electrical Parimal Electrical
  • 91. Decomposition 1. Lossy Decomposition:  In lossy decomposition ,spurious tuples are generated when a natural join is applied to the relations in the decomposition  The above decomposition is a bad decomposition or Lossy decomposition. 91IBS Hyderabad Roll_no S_name Dept 111 Parimal Computer 222 Soham Electrical 333 Parimal Electrical
  • 92. Decomposition 2. Lossyless join Decomposition: “The decomposition of relation R into R1 and R2 is lossless when the join of R1 and R2 yield the same relation as in R.“  A relational table is decomposed (or factored) into two or more smaller tables, in such a way that the designer can capture the precise content of the original table by joining the decomposed parts. This is called lossless- join (or non-additive join) decomposition. 92IBS Hyderabad
  • 93. Decomposition 2. Lossyless join Decomposition: This is also refferd as non-additive decomposition.  The lossless-join decomposition is always defined with respect to a specific set F of dependencies.  Consider that we have table STUDENT with three attribute roll_no , s_name and department. 93IBS Hyderabad
  • 94. Decomposition 2. Lossyless join Decomposition:  This relation is decomposed into two relation S_name and Dept_name 94IBS Hyderabad Roll_no S_name Dept_Name 111 Parimal Computer 222 Soham Electrical 333 Parimal Electrical
  • 95. Decomposition 2. Lossyless join Decomposition:  S_name  Dept_name 95IBS Hyderabad Roll_no S_name 111 Parimal 222 Soham 333 Parimal Roll_No Dept_Name 111 Computer 222 Electrical 333 Electrical
  • 96. Decomposition 2. Lossyless join Decomposition:  Now ,when these two relations are joined on the common column 'roll_no' ,the resultant relation will look like stu_joined.  In lossless decomposition, no any spurious tuples are generated when a natural joined is applied to the relations in the decomposition. 96IBS Hyderabad Roll_no S_name Dept_Name 111 Parimal Computer 222 Soham Electrical 333 Parimal Electrical
  • 97. Reviews  DBMS Architecture & Users.  E-R Diagram.  Features of DBMS.  Normalization Process(upto 3NF).  Functional Dependencies.  Decomposition. 97IBS Hyderabad