RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
Practical 1
1. Installation and configuration of Oracle 10g express.
Run setup File
2. Click on “Next” button
Name : Voraliya Harshil P ag e |1
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
3. Select “I accept the terms in the license agreement” and click on “Next” button.
4. Select Oracle Database 10g Express Edition and click on “Next” button.
Name : Voraliya Harshil P ag e |2
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
5. Enter Password and confirm password.
6. Review settings before proceeding with the installation.
Name : Voraliya Harshil P ag e |3
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
7. Click on “install” button:
8. Click on “Finish” button
Name : Voraliya Harshil P ag e |4
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
PRACTICAL 2
SET 1
1. Create the Simple DEPARTMENT Table (DEPARTMENT (dept_no, dept_name, location).
CREATE table DEPARTMENT(dept_no number, dept_name varchar(50), location varchar(50));
2. Display structure of department table.
DESC DEPARTMENT;
3. Insert below records into Department Table.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(10,'Account','NY');
1 row created.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
docation)VALUES(20,'HR','NY');
1 row created.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(30,'Production','DL');
1 row created.
Name : Voraliya Harshil P ag e |5
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(40,'Sales','NY');
1 row created.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(50,'EDP','MU');
1 row created.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(60,'TRG', '');
1 row created.
SQL> INSERT INTO DEPARTMENT (dept_no, dept_name,
location)VALUES(110,'RND', 'AH');
1 row created.
Name : Voraliya Harshil P ag e |6
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
4. Display all records of Department table.
SELECT * FROM DEPARTMENT;
5. Display all department belonging to location 'NY'
SELECT * FROM DEPARTMENT Where location = 'NY';
6. Display details of Department 10
SELECT * FROM DEPARTMENT Where dept_no = '10';
7. List all department names starting with 'A'.
SELECT * FROM DEPARTMENT Where dept_name like 'A%';
Name : Voraliya Harshil P ag e |7
RELATIONAL DATABASE MANAGEMENT SYSTEM (MC01094031)
8. List all departments whose number is between 1 and 100.
SELECT * FROM DEPARTMENT where dept_no between 1 and 100:
9. Delete 'TRG' department.
Delete from DEPARTMENT where dept_name = ‘TRG’;
10. Change department name 'EDP' to 'IT.
Update DEPARTMENT set dept_name = ‘IT’ where dept_name = ‘EDP’;
Name : Voraliya Harshil P ag e |8