Professional Documents
Culture Documents
DBMS
DBMS
Systems
Some important Definitions:
• Data: Data are raw facts. The word “raw” is used to indicate
that the facts have not yet been processed to reveal their
meaning.
For example: Ram, 5
It includes:
• Authentication
• Authorization
Disadvantages of DBMS
• Problems associated with centralization
• Cost of software/hardware and migration
• Complexity of backup and recovery
Some definitions
• Record/Row/ Tuple: In a database, a record holds all the
information about one item or subject. Data is stored in records;
each record consists of a group of related data values.
• Record Type: Records are classified into record types, where each
record type describes the structure of a group of records that store
the same type of information.
• Field/Column/Attribute: A field is an item of information which is
stored for all records in a database.
• Table: A table consists of rows and columns of information.
Example
Here employee is record type with fields
name, address, city, phone#
EMPLOYEE
Data Models
• A collection of tools for describing
– data
– data relationships
– data semantics
– data constraints
• Entity-Relationship model
• Relational model
Importance of Data models
program-3 File-3
data description-3
Application program-1
with data semantics
Description
Application program-2 Manipulation
with data semantics
Control
….. Database
Application program-3 .
with data semantics
DBMS approach
E-R Model
• E-R model is a high level conceptual data model
developed by Chen in 1976 to facilitate database
design.
• A conceptual data model is a set of concepts that
describe the structure of a database and the
associated retrieval and update transactions on the
database.
• The major components of E-R model are:
• Entities
• Attributes
• Relationships
Entities
• An entity is viewed as the atomic real world
item.
• A collection of similar entities is known as
entity set.
For example: employees
• Entities are represented as
Attributes
Each entity has attributes i.e. the particular
properties that describe it. A particular entity
will have a value for each of its attributes.
Attributes are represented as:
• Attributes can be classified as:
• Simple
• Composite
• Single-valued
• Multi-valued
• Derived
Simple attributes
• Attributes that are not divisible are called
simple or atomic attributes.
• It is an attribute composed of a single
component with an independent existence.
• Examples are: roll no of a student
Composite attributes
• Composite attributes can be divided into
smaller subparts, which represent more basic
attributes with independent meanings.
• For example, the address attribute of the
employee entity can be divided into street
number, area, city, pincode.
Single valued attributes
When an attribute holds a single value for a
particular entity it is called single valued
attribute.
For example semester attribute for a
particular class of students.
Multi valued attributes
• It is one that holds multiple values for a
particular entity.
• It may have lower and upper bounds on the
number of values allowed for each individual
entity.
• For example, a student entity can have
multiple values for hobby attribute. Suppose
hobby of a student may have minimum of one
hobby and maximum of five hobbies.
Stored and Derived attribute
• In some cases two (or more) attribute values are
related- for example, the Age and Birthdate
attributes of a person.
• For a particular person we can determine the value
of Age from the current date and the Birthdate . The
Age attribute is hence called a derived attribute and
Birthdate is called a stored attribute.
• A derived attribute is one that represents a value
that is derivable from the value of a related attribute
or set of attributes, not necessarily in the same
entity.
E-R Diagram Conventions for
representing attributes and entities
• The entities are represented by a rectangular box
with the name of the entity in the box.
• An attribute is shown as an ellipse attached to a
relevant entity by a line and labeled with the
attribute name.
• The entity name is written in uppercase where as the
attribute name is written in lowercase.
• The primary keys(key attributes) are underlined.
• The attributes are connected using lines to the
entities. If the attribute is simple or single valued a
single line is used.
• If the attribute is derived a dashed ellipse is used.
• If it is multivalued then double ellipse is used.
• If the attribute is composite, its component
attributes are shown as ellipses emanating from the
composite attribute.
Example of various attributes
Relationships
• A relationship is an association between
entities.
• The relationships that exists between the
entities relates data items to each other in a
meaningful way.
• In addition the relationship entity could have
attributes of its own.
• Usually the relationship name is an active verb,
but passive verbs are also used.
• Relationships are represented by diamond shaped
symbols with the relationship name inside the diamond.
Terms associated with entities and
relationships
The terms are:
o Degree
o Connectivity
o Cardinality
o Dependency
o Participation
Degree
Examples
Binary relationship
Ternary relationship
Connectivity
• Relationships can be classified as one to one,
one to many and many to many. The term
connectivity is used to describe this
relationship.
DEPARTMENT 1 M EMPLOYEE
has
The company policy does not allow more than
100 employees in a department. Therefore
the cardinality rule governing the
DEPARTMENT-EMPLOYEE relationship is
expressed as “One department can have a
maximum of 100 employees.”
Dependency