0% found this document useful (0 votes)
3 views16 pages

DBMS

The document provides an overview of Database Management Systems (DBMS), detailing their purpose, advantages, disadvantages, and architectural types including 1-Tier, 2-Tier, and 3-Tier architectures. It also discusses various data models such as Hierarchical, Network, Relational, and Object-Oriented models, along with the Entity-Relationship (ER) model and its enhanced version (EER). Key concepts include data integrity, security, and the relationships between entities, attributes, and their types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views16 pages

DBMS

The document provides an overview of Database Management Systems (DBMS), detailing their purpose, advantages, disadvantages, and architectural types including 1-Tier, 2-Tier, and 3-Tier architectures. It also discusses various data models such as Hierarchical, Network, Relational, and Object-Oriented models, along with the Entity-Relationship (ER) model and its enhanced version (EER). Key concepts include data integrity, security, and the relationships between entities, attributes, and their types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

DBMS

Unit 1
Introduction to DBMS:
A Database Management System (DBMS) is software that is used to store,
retrieve, manage, and manipulate data efficiently. It provides an interface for
users and applications to interact with databases while ensuring data integrity,
security, and consistency.

Why Use a DBMS?


 Efficient Data Storage & Retrieval – Organizes and stores large amounts
of data systematically.
 Data Security – Controls access to sensitive data.
 Data Consistency & Integrity – Prevents data corruption and maintains
accuracy.
 Concurrent Access – Allows multiple users to access and modify data
simultaneously.
 Backup & Recovery – Ensures data safety even in case of system failure.
 Reduces Data Redundancy – Eliminates unnecessary duplication of data.

Characteristics of Data in a Database:


1. Data Persistence
 Data in a database is permanently stored and remains intact even after
the application that created it is closed.
2. Data Integrity
 Ensures accuracy, consistency, and reliability of data.
3. Data Consistency
 The database ensures that the same data is reflected across different
views without discrepancies.
4. Data Security
 Databases implement authentication (user logins, passwords) and
authorization (user roles, privileges) to restrict access.
5. Data Redundancy Control
 Avoids unnecessary duplication of data by using Normalization
techniques.
6. Data Independence
 Logical data independence: Changes in the schema (structure) do not
affect application programs.
7. Multi-User Access & Concurrent Processing
 Multiple users can access and modify the database simultaneously.
8. Data Scalability
 Databases can handle increasing amounts of data without significant
performance loss.
9. Data Sharing
 Authorized users can share data across applications and departments.
10. Data Recovery & Backup
 Backup systems ensure that data can be restored in case of failure.
Advantages of DBMS:
1. Data Security
2. Data Integrity and Consistency
3. Reduced Data Redundancy
4. Data Independence
5. Multi-User Access and Concurrency Control
6. Data Recovery and Backup

Disadvantages of DBMS:
1. High Cost of Implementation
2. Complexity
3. Performance Issues
4. Potential Security Risks
5. Data Loss Risk
6. High System Requirements

DBMS Architecture
A Database stores a lot of critical information to access data quickly and
securely. Hence it is important to select the correct architecture for efficient data
management. Database Management System (DBMS) architecture is crucial for
efficient data management and system performance. It helps users to get their
requests done while connecting to the database. It focuses on how the database
is designed, built and maintained, shaping how users access and interact with it.

Types of DBMS Architecture


 1-Tier Architecture
 2-Tier Architecture
 3-Tier Architecture

1-Tier Architecture:
In 1-Tier Architecture the database is directly available to the user, the user can
directly sit on the DBMS and use it that is, the client, server, and Database are
all present on the same machine. This setup is simple and is often used in
personal or standalone applications where the user interacts directly with the
database.
For Example: A Microsoft Excel spreadsheet is a great example of one-tier
architecture.
Advantages of 1-Tier Architecture
Below mentioned are the advantages of 1-Tier Architecture.
 Simple Architecture: 1-Tier Architecture is the most simple architecture
to set up, as only a single machine is required to maintain it.
 Cost-Effective: No additional hardware is required for implementing 1-
Tier Architecture, which makes it cost-effective.
 Easy to Implement: 1-Tier Architecture can be easily deployed, and
hence it is mostly used in small projects.

2-Tier Architecture:
The 2-tier architecture is similar to a basic client-server model . The application
at the client end directly communicates with the database on the server side.
APIs like ODBC and JDBC are used for this interaction. The server side is
responsible for providing query processing and transaction management
functionalities. On the client side, the user interfaces and application programs
are run.
For Example: A Library Management System used in schools or small
organizations is a classic example of two-tier architecture.
1. Client Layer (Tier 1): This is the user interface that library staff or users
interact with. For example they might use a desktop application to search
for books, issue them, or check due dates.
2. Database Layer (Tier 2): The database server stores all the library
records such as book details, user information, and transaction logs.
Advantages of 2-Tier Architecture
 Easy to Access: 2-Tier Architecture makes easy access to the database,
which makes fast retrieval.
 Scalable: We can scale the database easily, by adding clients or
upgrading hardware.
 Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture
and Multi-Tier Architecture .
 Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
 Simple: 2-Tier Architecture is easily understandable as well as simple
because of only two components.

3-Tier Architecture:
In 3-Tier Architecture , there is another layer between the client and the server.
The client does not directly communicate with the server. Instead, it interacts
with an application server which further communicates with the database
system and then the query processing and transaction management takes place.
This intermediate layer acts as a medium for the exchange of partially
processed data between the server and the client.
For Example: E-commerce Store
User: You visit an online store, search for a product and add it to your cart.
Processing: The system checks if the product is in stock, calculates the total
price and applies any discounts.
Database: The product details, your cart and order history are stored in the
database for future reference.
Advantages of 3-Tier Architecture
 Enhanced scalability: Scalability is enhanced due to the distributed
deployment of application servers. Now, individual connections need
not be made between the client and server.
 Data Integrity: 3-Tier Architecture maintains Data Integrity. Since
there is a middle layer between the client and the server, data corruption
can be avoided/removed.
 Security: 3-Tier Architecture Improves Security. This type of model
prevents direct interaction of the client with the server thereby reducing
access to unauthorized data.
Disadvantages of 3-Tier Architecture
 More Complex: 3-Tier Architecture is more complex in comparison to
2-Tier Architecture. Communication Points are also doubled in 3-Tier
Architecture.
 Difficult to Interact: It becomes difficult for this sort of interaction to
take place due to the presence of middle layers.
What is a Data Model in DBMS
A data model can be defined as an integrated collection of concepts describing

and manipulating data, as well as constraints on the data within an

organization. A data model is not just a set of tables; it is a conceptual

representation of physical data stored in the database.


1. Hierarchical Model
The hierarchical model is one of the types among many data models in dbms

used in early database systems that organize data into a tree-like structure,

similar to a computer file system. In a hierarchical model, data is organized

into a series of levels or layers, with each layer representing a particular type of

data. The data is stored as records, which are linked together through parent-

child relationships.

2. Network Model
It is another of the many types of data models in dbms. It was introduced in the

1960s by the Database Task Group. Being one of the early data models in

dbms, it organizes data into a more flexible, complex structure than the

hierarchical model. In a network model, data is organized into a graph-like

structure, where each record can have multiple parent or child records, forming

a network of relationships.

3. Relational Model

The relational model is a type of data model used in database systems that

organizes data into tables, with each table representing a specific entity or

relationship between entities. In a relational model, data is organized into rows

and columns, with each row representing a unique record or instance of the

entity, and each column representing a specific attribute or characteristic of the

entity.
4. Object-Oriented Model

One of the various types of data models in dbms follows the paradigms of

object-oriented programming. The data is in form of objects, which are

instances of a certain class with each having its own methods and attributes.

ER Model
An Entity-Relationship (ER) Model in Database Management Systems

(DBMS) is a high-level conceptual data model used to define the data

elements, relationships, and structure of a database. It visually represents how

data is interconnected in a system using entities, attributes, and relationships.


Key Components of an ER Model:
Entity

 Represents a real-world object or concept.

 Example: A "Student" in a university database.

 Entity Types:

o Strong Entity: Can exist independently (e.g., Student, Teacher).

o Weak Entity: Depends on a strong entity (e.g., OrderItems

depends on Orders).

Attributes
 Properties that describe an entity.

 Example: A "Student" entity may have attributes like StudentID, Name,

Age.

 Types of Attributes:

o Simple (Atomic): Cannot be divided further (e.g., Name, Age).


o Composite: Can be divided into sub-parts (e.g., Name → First

Name, Last Name).

o Derived: Derived from other attributes (e.g., Age from Date of

Birth).

o Multivalued: Can have multiple values (e.g., PhoneNumbers).

Relationships

 Defines how entities are related.

 Example: A "Student" enrolls in a "Course".

 Types of Relationships:

o 1:1 (One-to-One): One entity relates to only one other entity.

o 1:M (One-to-Many): One entity can be related to multiple

entities.

o M:N (Many-to-Many): Multiple entities are related to multiple

entities.
 Primary Key (PK) & Foreign Key (FK)
o Primary Key (PK): A unique attribute identifying an entity.
o Foreign Key (FK): A reference to the PK of another entity to establish
relationships.

Symbols Used in ER Model


 Rectangles: Rectangles represent Entities in the ER
Model.
 Ellipses: Ellipses represent Attributes in the ER Model.
 Diamond: Diamonds represent Relationships among
Entities.
 Lines: Lines represent attributes to entities and entity
sets with other relationship types.
 Double Ellipse: Double Ellipses represent Multi-Valued
Attributes.
 Double Rectangle: Double Rectangle represents a Weak
Entity.

Enhanced Entity-Relationship (EER) Model


The Enhanced Entity-Relationship (EER) model extends the basic ER model
by incorporating more advanced concepts like subclasses, specialization,
generalization, and categories to better represent real-world scenarios.

Key Concepts of EER Model:


1. Superclass and Subclass (Inheritance)
 Superclass: A higher-level entity that shares common attributes.
 Subclass: A lower-level entity that inherits attributes from the superclass
and has additional attributes.

2. Specialization
 Definition: The process of creating subclasses from a superclass based
on distinguishing characteristics.
 Example:
o Entity: Vehicle
 Subclasses: Car, Bike, Truck.
o Here, Vehicle is specialized into Car, Bike, and Truck, each
having unique attributes.

3. Generalization
 Definition: The opposite of specialization—combining multiple lower-
level entities into a higher-level entity.
 Example:
o Entities: SavingsAccount, CurrentAccount
o Generalized into: Account (Superclass).

4. Categorization (Union)
 Definition: When a subclass inherits attributes from multiple
superclasses.
 Example:
o Person and Company both can be Customers.
5. Aggregation
 Definition: A relationship where an entire relationship acts as an entity.
 Example:
o A Project is assigned to multiple Employees, and each Employee
belongs to a Department.
o The Works_On relationship (between Employee and Project) can
itself be considered an entity.

Key Features of the EER Model


1. Subtypes and Supertypes
2. Generalization and Specialization
3. Inheritance
4. Constraints
5. Union Types
6. Multi-valued Attributes

You might also like