DBMS Module-1 PPT Updated
DBMS Module-1 PPT Updated
DBMS Module-1 PPT Updated
Module 1
Introduction to Database
Database:-
Database is the collection data.
Database is the software to manage the data.( e.g. Oracle, MySQL, DB2, etc..)
Database Applications:
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
Integrity problems
Integrity constraints (e.g. account balance > 0) become part
of program code
Atomicity of updates
Failures may leave database in an inconsistent state with partial
updates carried out
E.g. transfer of funds from one account to another should either
complete or not happen at all
Security problems
1:M (One-Many)
Network Model (NDBMS) (1970)
N:M (Many-Many)
Relational Model (RDBMS) (1978)
Logical level: describes what data are stored in the database, and
what relationships exist among those data.
data
data relationships
data semantics
data constraints
Entity-Relationship model
Relational model
Other models:
object-oriented model
semi-structured data models
The E-R representation of the above Student Entity Type is done below.
Note: We use a rectangle to represent an entity type in the E-R diagram, not entity.
Types of Entity type
Strong Entity Type: Strong entity are those entity types which has a key attribute.
The primary key helps in identifying each entity uniquely. It is represented by a
rectangle. In the above example, Roll_no identifies each element of the table
uniquely and hence, we can say that STUDENT is a strong entity type.
Weak Entity Type: Weak entity type doesn't have a key
attribute.
Weak entity type can't be identified on its own.
It depends upon some other strong entity for its distinct identity.
This can be understood with a real-life example:
There can be children only if the parent exits. There can be no independent
existence of children.
There can be a room only if building exits.
There can be no independent existence of a room.
A weak entity is represented by a double outlined rectangle.
The relationship between a weak entity type and strong entity type is called an
identifying relationship.
An entity set that does not have sufficient attributes to form a primary key
is referred to as a weak entity 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.
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.
Foreign key dependencies appear as arrows from the foreign key attributes of the
referencing relation to the primary key of the referenced relation.
Do not confuse a schema diagram with an E-R diagram.
In particular, E-R diagrams do not show foreign key attributes explicitly, whereas
schema diagrams show them explicitly.
Design Issues in ER Diagram