2nd Chapter Slide
2nd Chapter Slide
L.H: 6
Database System Concepts
and Architecture
Database Models
Types of DBMS
Hierarchical Model/Database
Network Model/Database
Relational Model/Database
Object-Oriented/Database
This model was introduced by E.F Codd in 1970, and since then
it has been the most widely used database model, infect, we can
say the only database model used around the world.
E-R Models are defined to represent the relationships into pictorial form to
make it easier for different stakeholders to understand.
This model is good to design a database, which can then be turned into tables
in relational model(explained below).
Techniques are
Data attributes will have data types with exact precisions and
length.
Columns should have exact data types, lengths assigned and default
values.
Primary and Foreign keys, views, indexes, access profiles, and
authorizations, etc. are defined.
Advantages of Data model:
The main goal of a designing data model is to make certain
that data objects offered by the functional team are represented
accurately.
(But in Oracle database, the execution of data control language does not
have the feature of rolling back.)
There are the following operations which have the authorization of Revoke:
End Users
Application Programmers
Sophisticated users are those who have their own way of accessing the
database. This means they do not use the application program provided in
the system. Instead, they might define their own application or describe
their need directly by using query languages. These specialized users
maintain their personal databases by using ready-made program packages
that provide easy-to-use menu driven commands, such as MS Access
Application Programmers
Performance tuning
Security
Documentation
ER-Model
The main data objects are termed as Entities, with their details
defined as attributes, some of these attributes are important and
are used to identity the entity, and different entities are related
using relationships.
ER Model: Entity and Entity Set
Considering the above example, Student is an
entity, Teacher is an entity, similarly, Class, Subject etc are
also entities.
An Entity is generally a real-world object which has
characteristics and holds relationships in a DBMS.
If a Student is an Entity, then the complete dataset of all the
students will be the Entity Set
ER Model: Attributes
Simple attribute: The attributes with values that are atomic and cannot be
broken down further are simple attributes. For example, student's age.
Derived attribute: These are the attributes which are not present in the
whole database management system, but are derived using other attributes.
For example, average age of students in a class.
Super Key
Candidate Key
Primary Key
ER Model: Relationships
One to Many Relationship
When a single instance of an entity is associated with more
than one instances of another entity then it is called one to
many relationship. For example – a customer can place many
orders but a order cannot be placed by many customers.
More than one entity from entity set X can be associated with at
most one entity of entity set Y. However, an entity from entity
set Y may or may not be associated with more than one entity
from entity set X. For example, many students belong to the
same class.
Many to Many Relationship
When more than one instances of an entity is associated with
more than one instances of another entity then it is called many
to many relationship. For example, a can be assigned to many
projects and a project can be assigned to many students.
One entity from X can be associated with more than one entity
from Y and vice versa.For example, Students as a group are
associated with multiple faculty members, and faculty members
can be associated with multiple students.
How to Draw ER Diagrams
Identify all the entities in the system. An entity should
appear only once in a particular diagram. Create
rectangles for all entities and name them properly.