0% found this document useful (0 votes)
2 views13 pages

DBMS

This project report details the creation and execution of Data Manipulation Language (DML) commands in SQL, focusing on operations such as INSERT, UPDATE, DELETE, and SELECT to manage data in a relational database. It emphasizes the importance of these commands in maintaining data integrity and accuracy, while also addressing challenges such as concurrency control and performance issues. The project demonstrates practical applications of DML through a sample database and highlights the foundational role of SQL in various industries.

Uploaded by

adimarathe234
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)
2 views13 pages

DBMS

This project report details the creation and execution of Data Manipulation Language (DML) commands in SQL, focusing on operations such as INSERT, UPDATE, DELETE, and SELECT to manage data in a relational database. It emphasizes the importance of these commands in maintaining data integrity and accuracy, while also addressing challenges such as concurrency control and performance issues. The project demonstrates practical applications of DML through a sample database and highlights the foundational role of SQL in various industries.

Uploaded by

adimarathe234
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/ 13

• PROJECT REPORT•

Create & Execute dml


command using sql

Presented by,
CO-FY
 Sarvadyna Mangesh Mahale (Roll No:24)
 Om Appasaheb Mandavgad (Roll No: 25)
 Aditya Ramkrishna Marathe (Roll No: 26)
 Tejas Vilas Mhaske (Roll No: 27)

Guided by,
Prof. Borse M. N.

Introduction
In today's data-driven world, databases play a crucial
role in the storage, management, and retrieval of
information. SQL (Structured Query Language) is the
standard language used for interacting with relational
databases. Within SQL, Data Manipulation Language (DML)
commands allow users to manage data within tables,
enabling the insertion, modification, deletion, and retrieval
of records.
This project focuses on the creation and execution of
DML commands in SQL. It aims to provide a practical
demonstration of how DML operations can be utilized to
interact with a relational database, ensuring data is
efficiently handled and maintained. The key objectives of
this project include:
 Understanding the structure and syntax of basic SQL
DML commands.
 Executing INSERT, UPDATE, DELETE, and SELECT
operations to manipulate data.
 Analyzing the results of DML commands on a sample
dataset.
Throughout the project, a sample database is designed
with a basic schema to illustrate the fundamental
principles of data manipulation. The project will showcase
how DML commands can be applied to add new records,
modify existing data, delete unnecessary entries, and
retrieve specific information from the database.

Abstract
This project explores the practical application of Data
Manipulation Language (DML) commands in SQL for
managing data within a relational database. DML
commands, which include INSERT, UPDATE, DELETE,
and SELECT, are essential for modifying and retrieving
data stored in database tables. The project involves
creating a sample database and performing a series of
DML operations to demonstrate how these commands
work in real-world scenarios.
The focus of this study is on understanding the syntax
and functionality of each DML command and analyzing
their effect on database records. The project provides a
step-by-step guide on how to insert new data, update
existing records, remove unwanted data, and retrieve
specific information from a database. Each command is
tested and its results are examined to highlight the
efficiency and importance of SQL in data manipulation.
By the end of the project, users will gain a
comprehensive understanding of how DML commands are
used in SQL to maintain data integrity and ensure
effective data management. This project also provides
insights into the vital role SQL plays in the broader context
of database management systems (DBMS) and its
application across various industries.

Theory
Objective:
The primary objective of this project is to:

 Demonstrate the creation of a sample relational


database.
 Implement key DML commands, including INSERT,
UPDATE, DELETE, and SELECT.
 Analyze the impact of these commands on the database.
 Understand the importance of DML operations in
maintaining data accuracy and integrity.

Background and Literature Review:


SQL has been the standard language for managing
relational databases since its development in the 1970s.
Among the core functionalities of SQL, the Data
Manipulation Language (DML) allows users to interact
directly with the data, making it the most frequently used
subset of SQL.

Inserting, updating, deleting, and retrieving records are


fundamental operations that ensure data is both accurate and
accessible. These operations not only help in maintaining data
integrity but also assist in transforming and managing large
datasets across various applications, such as finance,
healthcare, and e-commerce.

Research has shown that efficient data manipulation and


retrieval are critical to database performance, especially in
high-volume applications.
The importance of DML commands in SQL stems from the
early work on relational databases by E.F. Codd in the 1970s.
Codd's Relational Model introduced the concept of
organizing data into tables (relations) and using SQL to
manage data stored in those tables. His pioneering work
established the foundation for modern relational database
management systems (RDBMS).

Building on Codd's work, Donald D. Chamberlin and


Raymond F. Boyce developed SQL at IBM in the early 1970s.
Their innovation allowed users to manipulate data within
tables using a set of structured commands. These DML
commands are now part of virtually all RDBMS systems, such
as MySQL, PostgreSQL, Oracle, and Microsoft SQL
Server.

DML Operations in Practice:

Research into SQL usage has shown that DML


commands are frequently used in large-scale applications to
manipulate data in real time. For example, in financial
systems, DML commands are critical for updating account
balances, inserting transaction records, and deleting outdated
information. In healthcare systems, DML operations help
manage patient records, update treatment plans, and retrieve
medical history for analysis.

Query Optimization and Performance:

An essential aspect of DML commands is their efficiency.


Large databases often face performance issues when handling
frequent insertions, updates, or deletions. Researchers like
Hellerstein et al. (1997) have studied query optimization
techniques to enhance the performance of SQL queries,
especially for SELECT statements, which are often used to
retrieve vast amounts of data. These optimizations include
using indexes to speed up queries, particularly for operations
involving large datasets.

Challenges with DML Commands:

While DML commands are fundamental, they come with


challenges, especially in large-scale databases. Ensuring data
integrity during update and delete operations requires strict
adherence to ACID (Atomicity, Consistency, Isolation,
Durability) properties. Additionally, transaction
management becomes critical in environments where
multiple users may simultaneously attempt to manipulate the
same data. Techniques like locking and concurrency
control are necessary to prevent data corruption or loss
during DML operations.

Modern Applications of DML:

In recent years, DML commands have been adapted to


work with NoSQL databases and other non-relational
database models, which manage unstructured or semi-
structured data. However, the core principles of DML—
manipulating and retrieving data—remain central to all
modern database technologies.

Importance of DML Commands:


DML commands are fundamental for several reasons:

 Dynamic Data Management: They allow databases to


adapt to changes in real time, making it possible to add
new data, update existing records, and delete outdated
information.
 Data Integrity: By following proper syntax and rules,
DML commands help maintain data integrity, ensuring
that databases remain accurate and reliable.
 Querying Capabilities: The SELECT command is critical
for retrieving data, enabling analysis and reporting, which
are essential for decision-making in various sectors.

Challenges in DML Operations


While DML commands are powerful tools for data
management, they present several challenges:

 Concurrency Control: Simultaneous execution of DML


commands by multiple users can lead to data
inconsistencies. Proper concurrency control mechanisms
are essential to prevent conflicts.
 Performance Issues: Extensive use of UPDATE and
DELETE commands can degrade performance, especially
in large databases. Efficient indexing and query
optimization techniques are necessary to mitigate this.
 Data Integrity Violations: Improperly constructed DML
commands can lead to unintended data loss or
corruption. This emphasizes the need for thorough
validation and testing.
Methodology
Database Creation
Before executing DML commands, a database must be
created. For this project, a sample database named Students
was created to store information about students, including
their StudentID, FirstName, LastName, and Age.

The table creation script used in this project:

DML Operations
INSERT Command:

The INSERT command is used to add new records to the


database. Below is the syntax used to insert records into the
Students table:
UPDATE Command:

The UPDATE command is used to modify existing data in the


table. In this project, the age of Om Mandavgad was
updated:

DELETE Command

To remove records from the table, the DELETE command is


used. Below is an example where the record of Emily
Johnson was deleted from the Students table:

SELECT Command:

The SELECT command retrieves data from the database,


either entirely or selectively. Below is the example used to
retrieve all records from the Students table:
Results and Discussion
1. Data Insertion

After executing the INSERT command, three records were


successfully added to the Students table. The result of the
SELECT command after insertion is:

StudentID FirstName LastName Age


24 Sarvadyna Mahale 17
25 Om Mandavgad 17
26 Aditya Marathe 17
27 Tejas Mhaske 17

2. Data Update

The UPDATE command was executed to modify Om


Mandavgad’s age. The result of the SELECT command after
updating is:

StudentID FirstName LastName Age


24 Sarvadyna Mahale 17
25 Om Mandavgad 21
26 Aditya Marathe 17
27 Tejas Mhaske 17

3. Data Deletion

The record for Emily Johnson was deleted using the DELETE
command. The result of the SELECT command after deletion
is:

StudentID FirstName LastName Age


25 Om Mandavgad 21
26 Aditya Marathe 17
27 Tejas Mhaske 17

4. Data Retrieval

The SELECT command was used throughout the project to


verify changes in the table. It was effective in confirming the
success of INSERT, UPDATE, and DELETE operations.

StudentID FirstName LastName Age


25 Om Mandavgad 21
26 Aditya Marathe 17
27 Tejas Mhaske 17

5. Discussion

The successful execution of the DML commands demonstrates


their importance in managing and manipulating data in SQL
databases. These operations, when used effectively, ensure
that databases remain accurate, up-to-date, and optimized for
queries. This project highlights the foundational role of DML in
database systems and its widespread application in various
industries.
conclusion
In this project, we examined the creation and execution of
Data Manipulation Language (DML) commands using SQL,
which are essential for managing and interacting with data in
relational databases. By utilizing key operations such as
INSERT, UPDATE, DELETE, and SELECT, we demonstrated
how these commands enable dynamic and efficient data
management, ensuring that databases remain accurate and
up-to-date. The implementation of DML commands
emphasizes the importance of transactions and the ACID
properties, which guarantee data integrity and consistency
even in complex environments. This project underscored the
practical value of DML in maintaining the relevance and
quality of data, highlighting the importance of mastering
these commands for effective database management in real-
world applications.

References:
1. https://www.w3schools.com/sql/
2. https://www.geeksforgeeks.org/sql-tutorial/
3. https://www.google.com/
4. Codd, E. F. (1970). A relational model of data for large
shared data banks. Communications of the ACM.

You might also like