DBMS PRACTICAL
FILE
Submitted to:
Ms Akanksha Chopra
Assistant professor (IT)
submitted by :
Name: ADITI TOMAR
ROLL NO- 35314002021 BCA 2ND SEM 1ST SHIFT
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Certificate
This is to certify that Dbms practical file being submitted is a
bona fide work done by Aditi tomar student of BCA 2nd sem
1st shift in a partial fulfillment of the award of the BCA degree
she has worked under my guidance and supervision and has
fulfilled the requirements of the file that has been reached the
required standards.
Date: 20th July 2022
Ms. Akanksha
(assistant professor(IT))
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Acknowledgment
I, Aditi Tomar, the student of BCA 2nd sem 1st shift Am
extremely grateful to JIMS college for the confidence be
stored in me an interesting my practical file of dbms.
at this juncture I feel deeply honoured in expressing my
sincere thanks to my faculty MS. Akanksha Chopra for her
valuable inputs for guidance encouragement and wholehearted
cooperation and constructive criticism throughout the
preparation of this practical file.
I take this opportunity to thank all the lab assistance
coordinators who have directly or indirectly without which
this file would not have been possible lastly but not that the
least I place a deep family members and my friends who have
been constant source of inspiration during the preparation of
this practical file.
student name:
Aditi Tomar
date: 20th July 2022
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
following tables are created -
STUDENT (USN, SName, Address, Phone, Gender)
SEMSEC (SSID, Sem, Soo)
CLASS (USN, SSID)
SUBJECT (Subcode, Title, Sem, Credits)
IAMARKS (USN, Subcode, SSID, Test1. Test2, Test3,
FinallA),
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Q2. Convert the ER diagram into a Relational model with proper constraints.
Q3. Write queries to execute the CREATE, ALTER [Change the size of a column, add a new column to
the table, remove a column from the table], and DROP commands.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Q4. Write queries to: A. INSERT: ‘Insert 5 records in the table’ B. UPDATE: ‘Modify data in a single
and multiple columns in a table’ C. DELETE: ‘Destroy the table along with its data’
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Question5: Write queries to execute following DMI. Command-
SELECT: Retrieve the entire contents of the table
Retrieve the selective contents (based on provided conditions) from a table.
Retrieve contents from a table based on various operators i.e. string operators, logical
operators and conditional operators, Boolean operators.
Sort the data in ascending and descending order in a table on the basis of one column or
more than one column.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Question6: Create table using following integrity constraints:
Primary Key Unique Key, Not Null, Check, Default, Foreign Key
Question7: Write queries to execute following Aggregate functions Sum, Average, Count , Minimum
and Maximum value of a numeric column of a table using aggregate fun
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Question8: Retrieve data from a table using alias names.
Question9: Retrieve data of a table using nested queries.
Question10; Retrieve data from more than one table using inner join, left outer, right outer
and fall outer
Joins.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Question11: Create view from one table and more than one table.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
Question12: Create index on a column of a table.
Questio13: Consider the Insurance Company’s Database given below. The primary keys are
underlined and
The data types are specified.
PERSON (driver id: string, name string, address string)
CAR (regno: string, model: string, year int)
ACCIDENT (report number int, acc date: date, location: string)
OWNS (driver ide: string, regno string)
PARTICIPATED (driver_id: string, regno: string, report number int, damage amount number
(10, 2))
I) Create the above tables by properly specified the primary key and the foreign
key.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ii) Enter at least five tuples for each relation.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
iii) Demonstrate how you can
a. Update the damage amount for the car with a specific regno, the accident with
Report number 12 to 25000.
b. Add a new accident to the database.
c. iv) Find the total number of people who owned cars that were involved in accident.
d. v) Find the number of accident in which cars belonging to a specific models were in 2002
involved.
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR
ADITI TOMAR
(35314002021)
BCA 1ST SHIFT 1ST YEAR