Module 1 -DBMS
Module 1 -DBMS
Navathe
CHAPTER 1
Data:
Known facts that can be recorded and have an implicit
meaning.
Mini-world:
Some part of the real world about which data is stored in
biology, genetics
Spatial: weather, earth and atmospheric sciences
and astronomy
XML (eXtensible Markup Language)
First decade of the 21st century has seen
tremendous growth in user generated data and
automatically collected data from applications
and search engines.
Social Media platforms such as Facebook and
Twitter are generating millions of transactions a
day and businesses are interested to tap into
this data to “understand” the users
Cloud Storage and Backup is making unlimited
amount of storage available to users and
applications
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 1- 38
Extending Database
Capabilities (3)
Emergence of Big Data Technologies and NOSQL databases
New data storage, management and analysis technology
was necessary to deal with the onslaught of data in
petabytes a day (10**15 bytes or 1000 terabytes) in
some applications – this started being commonly called as
“Big Data”.
Hadoop (which originated from Yahoo) and Mapreduce
Programming approach to distributed data processing
(which originated from Google) as well as the Google file
system have given rise to Big Data technologies (Chapter
25). Further enhancements are taking place in the form of
Spark based technology.
NOSQL (Not Only SQL- where SQL is the de facto standard
language for relational DBMSs) systems have been
designed for rapid search and retrieval from documents,
processing of huge graphs occurring on social networks,
and other forms of unstructured data with flexible models
of transaction processing (Chapter 24).
Multi-valued
An entity may have multiple values for that attribute.
For example, Color of a CAR or PreviousDegrees of a
STUDENT.
Denoted as {Color} or {PreviousDegrees}.
from the current (today’s) date and the value of that person’s
Birth_date.
The Age attribute is hence called a derived attribute and is said to be
derivable from the Birth_date attribute, which is called a stored attribute.
Some attribute values can be derived from related entities; for example, an
attribute Number_of_employees of a DEPARTMENT entity can be derived by
counting the number of employees related to (working for) that department.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 3- 102
Types of Attributes (5)
NULL Values
•In some cases, a particular entity may not have an applicable value
for an attribute.
• For example, the Apartment_number attribute of an address applies only to
addresses that are in apartment buildings and not to other types of
residences, such as single-family homes.
•A College_degrees attribute applies only to people with college degrees.
For such situations, a special value called NULL is created.
• An address of a single-family home would have NULL for its
Apartment_number attribute, and a person with no college degree would
have NULL for College_degrees.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Slide 3- 103
Types of Attributes (5)
NULL Values
•The unknown category of NULL can be further classified into two cases.
• The first case arises when it is known that the attribute value exists but is
•The second case arises when it is not known whether the attribute value
entity type
Example:
A DEPENDENT entity is identified by the dependent’s first
ENTITY TYPE
RELATIONSHIP TYPE
ATTRIBUTE
KEY ATTRIBUTE
MULTIVALUED ATTRIBUTE
COMPOSITE ATTRIBUTE
DERIVED ATTRIBUTE
E1 R E2 TOTAL PARTICIPATION OF E2 IN R
E1 1 N
R E2
CARDINALITY RATIO 1:N FOR E 1:E2 IN R
(min,max)
R E STRUCTURAL CONSTRAINT (min, max) ON
PARTICIPATION OF E IN R
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Proper Naming of Schema
Constructs
Use singular names for entity types, rather
than plural one.
151
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Discussion of n-ary relationships
(n > 2)
In general, 3 binary relationships can represent
different information than a single ternary
relationship (see Figure 3.17a and b on next slide)
If needed, the binary and n-ary relationships can
all be included in the schema design (see Figure
3.17a and b, where all relationships convey
different meanings)
In some cases, a ternary relationship can be
represented as a weak entity if the data model
allows a weak entity type to have multiple
identifying relationships (and hence multiple
owner entity types) (see Figure 3.17c)
156
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
Constraints on Ternary (or Higher-
Degree) Relationships
There are two notations for specifying structural constraints on n-ary relationships, and they
specify different constraints.
They should thus both be used if it is important to fully specify the structural constraints on a
The second notation is based on the (min, max) notation displayed for binary relationships.
entity is related to at least min and at most max relationship instances in the relationship set.
157
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe
ER Digram –University
database
Lname SSN
Fname Addr
d
d
TypingSpeed
EngType MANAGER
TGrade HOURLY_EMP
SECRETARY
EMPLOYEE Fname, Lname, SSN, Addr TypingSpeed
TECHNICIAN
Fname, Lname, SSN, Addr, TGrade
d ENGINEER
Fname, Lname, SSN, Addr, EngType
TypingSpeed EngType
TGrade
SECRETARY ENGINEER
TECHNICIAN
d
d
TypingSpeed
EngType MANAGER
TGrade HOURLY_EMP