Documente Academic
Documente Profesional
Documente Cultură
Data: It can be anything like name, place or number, etc. Data usually refers to raw data, or
unprocessed data.
Information: It is organized or classified data so that it has some meaningful values to the receiver.
Information is the processed data on which decisions and actions are based.
Age 12
Data does not help in decision making Information helps in decision making
Database
• A database is a shared collection of logically related data designed to meet the information
needs of an organization
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent-access anomalies
• Security problems
Uses of DBMS:
(i) Effective and efficient management of data
Components of DBMS:
A DBMS constitutes of five components that help in the use and
management of data in an organization.
These are:
(i) Data,
(ii) Hardware,
(iii) Software
(v) Procedure.
(i) Data:
Data is a collection of raw facts that are stored and used inside a
database in order to form meaningful information.
(ii) Hardware:
Hardware is a collection of physical components of a computer
system. It includes secondary storage devices like disk drives
(floppy, CD.), processor, etc.
(iii) Software:
Software refers to the program that a database system uses in order
to run a DBMS application. It is the platform through which data is
accessed from the physical location (hardware) where data is stored.
For example, a Software named “Database Manager”.
(iv) User:
Users are the people who use the database applications. They can be
Database Administrators, Application programmers, Database
designers, End users, etc.
(v) Procedure:
A set of instructions that describe the working of a DBMS is called
its procedure.
Applications of DBMS
• Banking: all transactions
3-tier Architecture
A 3-tier architecture separates its tiers from each other based on the
complexity of the users and how they use the data present in the database.
It is the most widely used architecture to design a DBMS.
• Database (Data) Tier − At this tier, the database resides along with its query
processing languages. We also have the relations that define the data and
their constraints at this level.
• Application (Middle) Tier − At this tier reside the application server and the
programs that access the database. For a user, this application tier presents
an abstracted view of the database. End-users are unaware of any existence
of the database beyond the application. At the other end, the database tier is
not aware of any other user beyond the application tier. Hence, the application
layer sits in the middle and acts as a mediator between the end-user and the
database.
• User (Presentation) Tier − End-users operate on this tier and they know
nothing about any existence of the database beyond this layer. At this layer,
multiple views of the database can be provided by the application. All views
are generated by applications that reside in the application tier.
• External or View level: It is the users’ view of the database. This level describes that part of
the database that is relevant to each user.
– For example, one user may view dates in the form (day, month, year), while another
may view dates as (year, month, day).
• Conceptual or logical level: It is the community view of the database. This level describes
what data is stored in the database and the relationships among the data.
• It represents:
• Internal or storage level: It is the physical representation of the database on the computer.
This level describes how the data is stored in the database.
Data Independence-Achievement of Layered Architecture of DBMS
Data independence is the type of data transparency that matters for a
centralized DBMS. It refers to the immunity of user applications to
changes made in the definition and organization of data.
• Two kinds of data independence:
Logical Data Independence: The capacity to change the
conceptual schema without having to change the external
schemas and their application programs.
Physical Data Independence: The capacity to change the internal
schema without having to change the conceptual schema.
• The processes of transforming requests and results between the
levels are called mappings.
• When a schema at a lower level is changed, only the mappings
between this schema and higher-level schemas need to be
changed in a DBMS that fully supports data independence. The
higher-level schemas themselves are unchanged. Hence, the
application programs need not be changed since they refer to the
external schemas.
Data Abstraction- in general, abstraction is the process of taking away or removing
characteristics from something in order to reduce it to a set of essential characteristics.
• A major purpose of database system is to provide user with an abstract view of data.
That is, system hides certain details of how the data are stored and maintained.
View of Data
➢ Transaction Manager
➢ File Manager
➢ Buffer Manager
• DDL Interpreter
• DML Compiler
• Centralized System
• Parallel System
• Distributed System
• Schema:- The overall description of the database is called the Database Schema.
ER
object based
logical model
Object
oriented
data models
types N/W
record based
Hierarchical
logical model
Relational
Consider you have four ENTITIES→ Dogs,Cats,Tiger,Lion. Now if you want an entity
that stores the information of Wild Animals and Domestic Animals. You can
generalise the above four entities as Dogs AND Cats under Domestic Animals
table(this table will have common attributes from Dogs and Cats tables) and
similarly for Wild Animals. This is the concept of Generalisation.
Attribute types:
For example, a person can have more than one phone number,
email_address, etc.
Entity-Relationship Model
Binary = degree 2
Ternary = degree 3
n-ary
Generally, most relationship sets in a database system are binary
Mapping Cardinalities
Express the number of entities to which another entity can be associated via a relationship set. Most
useful in describing binary relationship sets.
For a binary relationship set the mapping cardinality must be one of the following types:
o One to one
o One to many
o Many to one
o Many to many
ER Representation
Total and Partial Participation / Participation of an Entity Set in a
Relationship Set
Total participation (indicated by double line): every entity in the entity set participates in at least
one relationship in the relationship set
Partial participation: some entities may not participate in any relationship in the relationship set.
Example:
• we could decide that a person is a customer only if they have bought a product.
On the other hand, we could say that a customer is a person whom we know about and
whom we hope might buy something—that is, we can have people listed as customers in our
database who never buy a product.
In the first case, the customer entity has total participation in the bought relationship
(all customers have bought a product, and we can’t have a customer who hasn’t bought a
product), while in the second case it has partial participation (a customer can buy a
product).
Not all employees become a head, but department will always be headed by one employee.
Generalization
Example :
Specialization
Example:
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.
The E-R model cannot express relationships among relationships.
The solution is to use aggregation.
Relational Model
Relational Model
• It uses a collection of tables to represent both data and the relationships among those data
• Each table has multiple columns, and each column has unique name
• The relational model hides low-level implementation details from database developers and
users
• The relational model is the most widely used model. The relational model is at a lower level
of abstraction than E-R model.
• Database designs are carried out in the E-R model and then translated to the relational
model