0% found this document useful (0 votes)
20 views9 pages

Unit 1-1

The document provides an overview of Database Management Systems (DBMS), detailing their components, types, and the differences between database systems and file systems. It explains key concepts such as data models, schemas, data independence, and the Entity Relationship Model (ER Model) for data modeling. Additionally, it covers database languages, including Data Definition Language (DDL) and Data Manipulation Language (DML), and outlines the overall structure of a database.

Uploaded by

Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views9 pages

Unit 1-1

The document provides an overview of Database Management Systems (DBMS), detailing their components, types, and the differences between database systems and file systems. It explains key concepts such as data models, schemas, data independence, and the Entity Relationship Model (ER Model) for data modeling. Additionally, it covers database languages, including Data Definition Language (DDL) and Data Manipulation Language (DML), and outlines the overall structure of a database.

Uploaded by

Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

2025

DATABASE MANAGEMENT SYSTEM

Prepared By
Dr. Praveen Kumar Mathur
UNIT I

Syllabus- Introduction: Overview, database system Vs file system, Database system


concept and architecture, data model schema and instances, data independence and
database language and interfaces, data definitions language, DML, Overall Database
Structure. Data modeling using the Entity Relationship Model: ER model concepts,
notation for ER diagram, mapping constraints,

DBMS Overview
A database management system (DBMS) is a software system that manages and organizes data in a structured
way. It allows users to create, read, update, and delete data in a database, and provides tools for maintaining data
integrity, security, and performance.
A DBMS typically consists of several components, including:
Data definition language (DDL): This is a set of commands used to create and modify the structure of the database,
such as creating tables, defining relationships between tables, and specifying data types and constraints.
Data manipulation language (DML): This is a set of commands used to retrieve, insert, update, and delete data in
the database. Examples of DML commands include SELECT, INSERT, UPDATE, and DELETE.
Query language: This is a language used to retrieve and manipulate data from the database. SQL (Structured
Query Language) is a popular query language used by most DBMS.
Database engine: This is the core component of the DBMS that manages the storage, retrieval, and manipulation
of data in the database. It includes a query optimizer that determines the most efficient way to execute queries,
and a transaction manager that ensures data consistency and integrity.
User interface: This is the component that allows users to interact with the DBMS, usually through a graphical
user interface (GUI) or command-line interface
DBMSs can be classified into different types based on their architecture and functionality. Some common types
of DBMS include:
Relational DBMS: This type of DBMS stores data in tables that are related to each other through key fields.
Examples of relational DBMS include Oracle, MySQL, and SQL Server.
Object-oriented DBMS: This type of DBMS stores data as objects, which encapsulate both data and the methods
used to manipulate the data. Examples of object-oriented DBMS include ObjectStore and Objectivity/DB.
Document-oriented DBMS: This type of DBMS stores data as documents, typically in JSON or XML format.
Examples of document-oriented DBMS include MongoDB and CouchDB.
Graph DBMS: This type of DBMS stores data as nodes and edges, which are used to represent relationships
between data entities. Examples of graph DBMS include Neo4j and OrientDB.
DBMSs play a critical role in managing data in modern organizations, and are widely used in various industries,
including finance, healthcare, education, and e-commerce.
Database system Vs file system
A file system is a method of storing and organizing computer files and data on a storage medium, such as a hard
disk drive or flash drive. In a file system, files are stored as individual entities, and each file may have its own
metadata and permissions.
On the other hand, a database system is a software system that allows for the organization and storage of large
amounts of structured data in a way that enables efficient access, retrieval, and manipulation of data. A database
system stores data in tables, where each table contains multiple rows of data, and each row represents a single
record or instance of that data.
While both file systems and database systems are used to manage data, there are several key differences between
the two:
Structure: A file system typically organizes data in a hierarchical structure of directories and files, while a database
system organizes data in a structured format with tables, columns, and rows.
Access: In a file system, data is accessed through a file path, while in a database system, data is accessed through
SQL queries.
Scalability: File systems are typically not designed for large-scale data storage and may become slow or unstable
when managing large amounts of data. Database systems, on the other hand, are designed for efficient storage
and management of large amounts of data.
Data Integrity: A database system is designed to maintain data integrity, which ensures that data is accurate and
consistent, while file systems do not have built-in mechanisms to ensure data integrity.
Security: Database systems typically provide more advanced security features such as role-based access control,
auditing, and encryption, while file systems may have limited security features.
In summary, a file system is a method for storing and organizing files on a storage medium, while a database
system is a software system designed to manage and organize large amounts of structured data in an efficient and
secure way.
Database system concept and Architecture
A database system is a software system designed to manage and organize large amounts of data in an efficient,
secure, and reliable way. A database system is typically made up of three main components: a database, a database
management system (DBMS), and applications that interact with the database.
Database: A database is a collection of related data that is organized in a specific way to enable efficient storage,
retrieval, and manipulation of data. A database may include one or more tables, each of which contains multiple
rows of data, and each row represents a single record or instance of that data.
DBMS: A database management system (DBMS) is software that allows users to define, create, maintain, and
control access to a database. The DBMS provides tools for creating and modifying the structure of the database,
as well as for inserting, updating, and deleting data. The DBMS also provides security and data integrity features,
such as access control, backup and recovery, and transaction management.
Applications: Applications are programs that interact with the database through the DBMS, typically through
SQL queries or other programming languages. Applications can be used to retrieve, analyze, and manipulate data
in the database, as well as to generate reports and other outputs.
Database architecture refers to the overall design and structure of a database system. There are several key
components of database architecture, including:
Data model: A data model is a conceptual representation of the data in a database, including the structure of tables,
relationships between tables, and constraints on the data. The most common data models are the relational data
model, object-oriented data model, and document-oriented data model.
Database schema: A database schema is a blueprint for the structure of a database, including the definition of
tables, columns, relationships, and constraints. The schema is typically created using a data definition language
(DDL), such as SQL.
Storage engine: The storage engine is responsible for managing the physical storage of data in the database,
including how data is stored on disk, how it is indexed for fast retrieval, and how it is cached in memory for
efficient access.
Query engine: The query engine is responsible for processing SQL queries and generating efficient execution
plans to retrieve data from the database. The query engine uses algorithms to optimize queries for speed and
efficiency, and may cache frequently accessed data in memory for faster access.
Transaction manager: The transaction manager is responsible for ensuring the consistency and integrity of data
in the database, by enforcing rules for data updates and maintaining a log of all changes to the data.
Overall, database architecture plays a critical role in the performance, scalability, and security of a database
system, and requires careful consideration and design to meet the needs of the application and users.
Data model Schema and Instances
In a database system, a data model defines the structure, relationships, and constraints of the data. A schema is a
formal description of the database structure, including the definition of tables, columns, keys, relationships, and
constraints. An instance is a specific set of data that conforms to the schema.
Here’s a brief overview of each concept:
Data model: A data model is a conceptual representation of data that defines how data is organized and stored. It
typically includes concepts such as entities, attributes, relationships, and constraints.
Schema: A schema is a blueprint that defines the structure of a database, including the definition of tables,
columns, keys, relationships, and constraints. A schema is typically created using a data definition language
(DDL), such as SQL.
Instance: An instance is a specific set of data that conforms to the schema. For example, if the schema defines a
table called “Customers” with columns for “Customer ID,” “Name,” and “Address,” then an instance of the
Customers table might include rows of data representing specific customers, such as “1234,” “John Smith,” and
“123 Main Street.”
In a relational database, the schema defines tables, columns, primary keys, foreign keys, and other constraints
that define the structure of the database. The instance, on the other hand, is a specific set of data stored in the
database that conforms to the schema.
For example, consider a simple schema for a customer database:
Customers
———
CustomerID (primary key)
FirstName
LastName
Email
The schema defines a table called “Customers” with columns for “CustomerID,” “FirstName,” “LastName,” and
“Email.” An example instance of the Customers table might look like:
Customers Table
—————-
CustomerID FirstName LastName Email
——————————————
1 John Smith [email protected]
2 Jane Doe [email protected]
3 Bob Johnson [email protected]
This instance includes three rows of data, each representing a specific customer with a unique CustomerID, first
name, last name, and email address.
Data Independence
Data independence is the ability to modify the database schema without affecting the applications that use the
data. There are two types of data independence: logical data independence and physical data independence.
Logical data independence: Logical data independence refers to the ability to modify the logical schema (or
conceptual schema) of the database without affecting the applications that use the data. The logical schema defines
the logical structure of the database, including tables, views, constraints, and relationships. Logical data
independence allows for changes to the logical schema, such as adding or removing tables, columns, or
relationships, without affecting the application programs that use the database.
Physical data independence: Physical data independence refers to the ability to modify the physical schema of the
database without affecting the applications that use the data. The physical schema describes the physical storage
of the data on the storage devices, including details such as data file formats, disk allocation, and indexing.
Physical data independence allows for changes to the physical schema, such as moving data files to different disks
or changing the file formats, without affecting the application programs that use the database.
The goal of data independence is to separate the data and the programs that use the data, so that changes to the
data do not require changes to the programs. This separation makes it easier to modify and maintain both the
database and the applications that use the data, and it reduces the risk of introducing errors or bugs when making
changes to the database schema.
Database Language and interfaces, Data definitions language
There are several types of database languages and interfaces used to interact with a database. These include:
Data Definition Language (DDL): DDL is a language used to define the database schema, including tables,
columns, constraints, and relationships. DDL statements are used to create, modify, and delete database objects,
such as tables, indexes, and views. Examples of DDL statements include CREATE TABLE, ALTER TABLE,
and DROP TABLE.
Data Manipulation Language (DML): DML is a language used to interact with the data stored in the database.
DML statements are used to insert, update, delete, and query data in the database. Examples of DML statements
include SELECT, INSERT, UPDATE, and DELETE.
Query Language: A query language is a specialized language used to retrieve data from a database. Examples of
query languages include SQL (Structured Query Language), which is used to interact with relational databases,
and NoSQL query languages, which are used to interact with non-relational databases.
Programming Languages: Programming languages such as Java, Python, and C# can be used to interact with
databases using programming interfaces such as JDBC, ODBC, and ADO.NET.
User Interfaces: User interfaces such as web applications, desktop applications, and mobile applications can be
used to interact with databases using APIs and libraries that provide access to the database.
Data definition language (DDL) is a type of database language that is used to define and manage the structure of
a database. DDL statements are used to create, modify, and delete database objects, such as tables, views, and
indexes. Some common DDL statements include:
CREATE TABLE: Creates a new table in the database.
ALTER TABLE: Modifies the structure of an existing table.
DROP TABLE: Deletes a table from the database.
CREATE VIEW: Creates a new view in the database.
ALTER VIEW: Modifies an existing view in the database.
DROP VIEW: Deletes a view from the database.
DDL statements are typically used by database administrators and developers to manage the structure of the
database. The syntax and functionality of DDL statements can vary depending on the specific database
management system being used.
DML
DML (Data Manipulation Language) is a type of database language used to interact with the data stored in a
database. DML statements are used to insert, update, delete, and query data in a database. Some common DML
statements include:
SELECT: Retrieves data from one or more tables in the database.
INSERT: Inserts new rows of data into a table.
UPDATE: Modifies existing data in a table.
DELETE: Deletes rows of data from a table.
Data Modelling using the Entity Relationship Model
The Entity Relationship Model (ER Model) is a data modeling technique used to represent and visualize the
relationships between entities in a database. The ER Model uses three main components:
Entity: An entity is a real-world object or concept that can be identified and described by its properties, also
known as attributes. In a database, entities are represented by tables.
Relationship: A relationship describes the association between two or more entities. In a database, relationships
are represented by the connections between tables.
Attributes: Attributes are the properties or characteristics of an entity. In a database, attributes are represented by
the columns of a table.
DML statements can also include clauses such as WHERE, ORDER BY, and GROUP BY, which are used to
filter, sort, and group the data being retrieved or modified. DML statements are typically used by application
developers and database administrators to manage and manipulate the data stored in the database.
The syntax and functionality of DML statements can vary depending on the specific database management system
being used. For example, SQL (Structured Query Language) is a commonly used DML language for interacting
with relational databases, while NoSQL databases may use different DML languages and syntax.
Overall Database Structure
The overall structure of a database can be conceptualized as a hierarchical structure consisting of several
components. These components include:
Database: The database is the overall container that stores all of the data and metadata for an application or
organization. It is typically stored on disk or in memory and can be accessed by multiple users or applications.
Tables: Tables are the primary objects in a database that store data in a structured way. Tables consist of rows
and columns, where each row represents a single record and each column represents a specific field or attribute
of that record.
Columns: Columns represent the specific fields or attributes of a record in a table. Each column is associated with
a specific data type, such as text, numeric, or date/time.
Rows: Rows represent individual records in a table. Each row contains data values for each of the columns in the
table.
Indexes: Indexes are used to improve the performance of queries by providing a fast lookup mechanism for
specific data values or ranges of values. Indexes can be created on one or more columns in a table
Relationships: Relationships are used to link data between tables. There are three types of relationships: one-to-
one, one-to-many, and many-to-many.
Views: Views are virtual tables that are created based on one or more tables in the database. Views are used to
provide a customized view of the data for specific users or applications.
Procedures: Procedures are stored procedures or functions that are stored in the database and can be executed by
users or applications. Procedures are used to encapsulate business logic and other complex operations.
The overall structure of a database is typically managed by a database management system (DBMS), which is
responsible for creating, modifying, and deleting database objects, as well as providing tools for managing and
querying the data in the database.
To create an ER Model, you must first identify the entities that you want to model. You can then define the
attributes of each entity and the relationships between entities. Relationships can be of three types:
One-to-one: One entity is related to one and only one instance of another entity.
One-to-many: One entity is related to one or more instances of another entity.
Many-to-many: One or more instances of an entity can be related to one or more instances of another entity.
The ER Model is often represented graphically using an Entity Relationship Diagram (ERD). An ERD uses
symbols to represent entities, attributes, and relationships, and lines or arrows to show the connections between
entities. The ERD is a useful tool for designing and visualizing a database schema.
Overall, the ER Model provides a simple, intuitive way to model complex data relationships and can be used to
design efficient and effective database schemas.
ER Model concept
The Entity Relationship (ER) Model is a data modeling technique used to describe the data and relationships in a
database in a graphical form. The ER Model represents the data as entities, attributes, and relationships. Here’s
an overview of these concepts:
Entity: An entity is a real-world object or concept that has a distinct existence and can be identified by its
properties or attributes. In the ER Model, an entity is represented by a rectangle with its name written inside.
Attribute: An attribute is a characteristic or property of an entity that helps to describe it. An entity can have
multiple attributes, each of which has a name and a data type. In the ER Model, an attribute is represented by an
oval shape that is connected to its respective entity.
Relationship: A relationship is a connection between two or more entities that describes how they are related to
each other. Relationships are represented by a diamond shape and can have various cardinalities, such as one-to-
one, one-to-many, or many-to-many.
Cardinality: Cardinality describes the number of occurrences of one entity that are related to the number of
occurrences of another entity in a given relationship. For example, a one-to-one relationship means that one
instance of an entity is related to only one instance of another entity, while a one-to-many relationship means that
one instance of an entity can be related to multiple instances of another entity.
Primary Key: A primary key is a unique identifier for an entity in a database. It is used to ensure that each record
in a table can be uniquely identified. In the ER Model, a primary key is represented by an underline beneath the
attribute name.
The ER Model provides a visual representation of the database schema, making it easier for developers to
understand and design the database. It is a powerful tool for designing efficient and effective database schemas
that can help to meet business needs.
Notation for ER diagram
There are several notations used to create an Entity Relationship (ER) Diagram, but the most widely used is the
Crow’s Foot notation. This notation uses different symbols to represent entities, attributes, and relationships in a
graphical form. Here’s an overview of the Crow’s Foot notation:
Entity: An entity is represented by a rectangle with its name written inside. The rectangle has rounded corners
and can have a thicker border to indicate a strong entity.
Attribute: An attribute is represented by an oval shape that is connected to its respective entity. The oval shape
contains the name of the attribute.
Relationship: A relationship is represented by a diamond shape that is connected to the related entities. The
diamond shape contains the name of the relationship.
Cardinality: Cardinality is indicated by lines drawn between the diamond and the entities it relates. These lines
have marks or symbols to represent the cardinality. For example, a single line with an arrowhead pointing to the
“many” side of the relationship represents a one-to-many relationship.
Primary Key: A primary key is represented by an underline beneath the attribute name.
Foreign Key: A foreign key is represented by a dashed underline beneath the attribute name.
Optional Relationship: An optional relationship is represented by a circle or oval that is connected to the
relationship line.
Identifying Relationship: An identifying relationship is represented by a double line between the related entities.
The Crow’s Foot notation is a useful tool for designing and visualizing a database schema. It provides a clear and
concise representation of the entities, attributes, and relationships in a database, making it easier to understand
and maintain.
Data Modelling using the Entity Relationship Model
The Entity Relationship Model (ER Model) is a data modeling technique used to represent and visualize the
relationships between entities in a database. The ER Model uses three main components:
Entity: An entity is a real-world object or concept that can be identified and described by its properties, also
known as attributes. In a database, entities are represented by tables.
Relationship: A relationship describes the association between two or more entities. In a database, relationships
are represented by the connections between tables.
Attributes: Attributes are the properties or characteristics of an entity. In a database, attributes are represented by
the columns of a table.
To create an ER Model, you must first identify the entities that you want to model. You can then define the
attributes of each entity and the relationships between entities. Relationships can be of three types:
One-to-one: One entity is related to one and only one instance of another entity.
One-to-many: One entity is related to one or more instances of another entity.
Many-to-many: One or more instances of an entity can be related to one or more instances of another entity.
The ER Model is often represented graphically using an Entity Relationship Diagram (ERD). An ERD uses
symbols to represent entities, attributes, and relationships, and lines or arrows to show the connections between
entities. The ERD is a useful tool for designing and visualizing a database schema.
Overall, the ER Model provides a simple, intuitive way to model complex data relationships and can be used to
design efficient and effective database schemas.
ER Model concept
The Entity Relationship (ER) Model is a data modeling technique used to describe the data and relationships in a
database in a graphical form. The ER Model represents the data as entities, attributes, and relationships. Here’s
an overview of these concepts:
Entity: An entity is a real-world object or concept that has a distinct existence and can be identified by its
properties or attributes. In the ER Model, an entity is represented by a rectangle with its name written inside.
Attribute: An attribute is a characteristic or property of an entity that helps to describe it. An entity can have
multiple attributes, each of which has a name and a data type. In the ER Model, an attribute is represented by an
oval shape that is connected to its respective entity.
Relationship: A relationship is a connection between two or more entities that describes how they are related to
each other. Relationships are represented by a diamond shape and can have various cardinalities, such as one-to-
one, one-to-many, or many-to-many.
Cardinality: Cardinality describes the number of occurrences of one entity that are related to the number of
occurrences of another entity in a given relationship. For example, a one-to-one relationship means that one
instance of an entity is related to only one instance of another entity, while a one-to-many relationship means that
one instance of an entity can be related to multiple instances of another entity.
Primary Key: A primary key is a unique identifier for an entity in a database. It is used to ensure that each record
in a table can be uniquely identified. In the ER Model, a primary key is represented by an underline beneath the
attribute name.
The ER Model provides a visual representation of the database schema, making it easier for developers to
understand and design the database. It is a powerful tool for designing efficient and effective database schemas
that can help to meet business needs.
Notation for ER diagram
There are several notations used to create an Entity Relationship (ER) Diagram, but the most widely used is the
Crow’s Foot notation. This notation uses different symbols to represent entities, attributes, and relationships in a
graphical form. Here’s an overview of the Crow’s Foot notation:
Entity: An entity is represented by a rectangle with its name written inside. The rectangle has rounded corners
and can have a thicker border to indicate a strong entity.
Attribute: An attribute is represented by an oval shape that is connected to its respective entity. The oval shape
contains the name of the attribute.
Relationship: A relationship is represented by a diamond shape that is connected to the related entities. The
diamond shape contains the name of the relationship.
Cardinality: Cardinality is indicated by lines drawn between the diamond and the entities it relates. These lines
have marks or symbols to represent the cardinality. For example, a single line with an arrowhead pointing to the
“many” side of the relationship represents a one-to-many relationship.
Primary Key: A primary key is represented by an underline beneath the attribute name.
Foreign Key: A foreign key is represented by a dashed underline beneath the attribute name.
Optional Relationship: An optional relationship is represented by a circle or oval that is connected to the
relationship line.
Identifying Relationship: An identifying relationship is represented by a double line between the related entities.
The Crow’s Foot notation is a useful tool for designing and visualizing a database schema. It provides a clear and
concise representation of the entities, attributes, and relationships in a database, making it easier to understand
and maintain.
Mapping Constraints
In a database management system, mapping constraints are used to ensure that the relationships between entities
in a database are consistent and accurate. These constraints are rules that define how entities are connected in a
database schema, and they help maintain data integrity and consistency.
There are several types of mapping constraints that can be used in a database schema, including:
One-to-One (1:1) Constraint: This constraint requires that each instance of one entity is associated with only one
instance of another entity.
One-to-Many (1:N) Constraint: This constraint requires that each instance of one entity is associated with one or
more instances of another entity.
Many-to-One (N:1) Constraint: This constraint requires that multiple instances of one entity are associated with
only one instance of another entity.
Many-to-Many (N:M) Constraint: This constraint requires that multiple instances of one entity are associated
with multiple instances of another entity.
Mapping constraints are often enforced using keys, which are attributes or combinations of attributes that uniquely
identify an entity instance. Primary keys are used to enforce the one-to-one and one-to-many constraints, while
foreign keys are used to enforce the many-to-one and many-to-many constraints.
By enforcing mapping constraints, a database management system can ensure that data is consistent and accurate,
and that it can be accessed and manipulated efficiently.

You might also like