Rishi - Dbms Lab File
Rishi - Dbms Lab File
Department of CSE
LAB FILE
ON
MS JYOTI RANI
NAME: MD SAMAN
(Assistant Professor) MAZHAR
ERP ID-0221DCSML165
INDEX
B. TECH. SECOND YEAR
Course ACSAI0452 LTP Credit
Code
Course Database Management Systems Lab 0 0 2 1
Title
List of Experiments:
Sr. No. Name of Experiment CO Date of Faculty
Experiment Sign
1. Installing ORACLE/ MYSQL/NOSQL. CO1
Figure 1: Open any Browser and search for "SQL community installer
download".
XD
MD
Pa ge |4
Figure 2:Click on any one of the download options.
MD
Pa ge |5
Figure 4:Select the option "Full" and click on "Next"
MD
Pa ge |6
Figure 6:when download is complete click on "Next"
MD
Pa ge |7
Figure 8:Once installed click on "next
MD
Pa ge |8
Figure 10:click on "next".
MD
Pa ge |9
Figure 12:set a SQL password and click on "next".
MD
P a g e | 10
Figure 14:to apply configuration click "execute".
MD
P a g e | 11
Figure 16:click on "next".
MD
P a g e | 12
Figure 18:connect to the server by entering the password and then click on”
check”.
MD
P a g e | 13
Figure 20: click on " execute " to apply configuration.
MD
P a g e | 14
Figure 22:click on "Finish". and the installation is completed.
MD
P a g e | 15
INSTALLING ORACLE
Figure 23:open any browser and search “oracle express edition download”.
Figure 24:click on the oracle version according to your operating system and
download it.
MD
P a g e | 16
Figure 25:Click on "Next".
MD
P a g e | 17
Figure 27:Select the Destination and then click on "Next".
Figure 28:Enter the password and confirm it and then click on "Next".
MD
P a g e | 18
Figure 29:Click on "Install".
MD
P a g e | 19
PROGRAM 2
Creating Entity-Relationship Diagram using case tools with Identifying
(Entities, attributes, keys and relationships between entities, cardinalities, generalization,
specialization etc.)
DDL COMMANDS: DDL is a subset of SQL and a part of DBMS(DataBase Management System). DDL
consists to commands like CREATE, ALTER, TRUNCATE and DROP. These commands are used to create or
modify the tables in SQL.
CREATE :- create command is use for creating database and also use to create a table
ALTER :- The ALTER command in SQL DDL is used to modify the structure of an already existing table
DROP :- The DROP command is a type of SQL DDL command, that is used to delete an existing database or an
object within a database.
TRUNCATE :- The TRUNCATE command in SQL DDL is used to remove all the records from a table. Let’s
insert a few records in the Books table
INSERT :- The INSERT statement is used to insert a new row in the database that is adding data to a table.
SELECT :- The SELECT statement is used to retrieve record from one or more tables.
UPDATE :- To update a table or row or column in the table we use the update command.
2. COMMIT :- COMMIT command is used to permanently save any transaction into the database.
ROLLBACK :- ROLLBACK is a command that causes all data changes since the last BEGIN WORK , or START
TRANSACTION to be discarded by the relational database management systems
SAVEPOINT :- SAVEPOINT command is used to temporarily save a transaction so that you can rollback to
that point whenever required.
COUNT:- The COUNT() function returns the number of rows that matches a specified criteria.
SUM:- SUM() function is an aggregate function that calculates the sum of all or distinct values in an
expression
AVG:- The AVG() function provides the average value of a numeric column.
MAX:- MAX() is used to find the maximum value or highest value of a certain column or expression.
MIN:- The MIN() function returns the smallest value of the selected column.
GROUP BY:- The GROUP BY statement groups rows that have the same values into summary rows
HAVING:- A HAVING clause in SQL specifies that an SQL SELECT statement must only return rows where
aggregate values meet the specified conditions.
VIEWS Creation:- A view is created with the CREATE VIEW statement.
EXISTS:- It is used to restrict the number of rows returned by the SELECT Statement. UNION:- It is
used to combine the result set of two select queries
INTERSECT:- is used to combine two SELECT statements, but returns rows only from the first
SELECT statement that are identical to a row in the second SELECT statement.
CONSTRAINTS:- Constraints are used to limit the type of data that can go into a table.