Vous êtes sur la page 1sur 4

DATABASE MANAGEMENT SYSTEM - TEST (23rd - Apr -2019)

Q-1) What is database management system?

Q-2) What are the type of database manage system?

Q-3) What is use of DML command?

Q-4) Define a table?

Q-5) Create a table named "Course" with the following details,

Column Name Data type Size Constraint


Coursecode Number 4 Primary key
Course name String 30 Not null
Course fees Number 6,2 Not null
Q-6) write query to add five rows into the above table with following values.

Coursecode Course name Fees


1001 DA 20000.00
1002 ML 50000.00
1003 Testing 15000.00
1004 IOT 20000.00
1005 AI 35000.00
Q-7) Create a table named "Student" with following details,

Column name Data type Size Constraint


Rollno Number 4 Primary key
Fname String 30 Not null
Mname String 30
Lname String 30 Not null
Gender Char 1 'M','F'
DOB Date
Coursecode Number 4 Foreign key
Q-8) write query to add rows into the above table with following values.

Rollno Fname Mna Lname Gen DOB Course


me der code
1 Sachin Tendulkar M 01-Aug-1980 1001
2 Rohan Gavaskar M 22-Jul-1977 1003
3 Mithali Kuma Raj F 12-Jun-1986 1002
ri
4 Anjali Bhagwat F 30-Jul-1989 1001
5 Aparna Popat F 12-Feb-1990 1001
6 Sania Mirza F 10-sep-1990 Null
7 Seema Antil F 11-Dec-1992 1001
8 Atul Kuma Srivastav M 18-jan-2000 1002
r
9 Sarfraj Khan M 10-Jan-2001 1001
10 Naushad Khan M 11-Oct-2001 1001
11 Mahinder Singh Dhoni M 12-Jan-1984 1002
12 Rahul Dravid M 14-Feb-1984 1003
13 Saurbh Gangooli M 16-Aug-1980 1002
14 Dinesh Kartik M 12-Feb-1976 1001
15 Kumar Singh M 10-Jan-1997 null

Q-7) Write a query to show the record which start with the Fname with 'S' from
the above table.

Q-8) Write a query to show the record which end with the Lname with 'a' from
the above table.

Q-9) write a query to show the course which has range of 20000 to 35000.

Q-10) Write a query to show the course name which has highest fees.

Q-11) Write a query to show the course name which has lowest fees.

Q-12) Write the query to show count of student course wise with course name.

Q-13) Write the query to show the course details and student details from the
above query.

Q-14) Write the query to show the student and course details with all course.

Q-15) Write the query to show the student and course details along with those
student who are not enrolled in any course.
Q-16) Write the query to show student and course details along with those
student who are not enrolled in any course as well as those courses where no
student has been enrolled.

Q-17) create following table named - TableA

Column name Data type Size


ID Number 2
Val String 10
Q-18) Insert the following record into TableA

ID Value
10 A
20 B
30 C
40 D
Q-19) create following table named - TableB

Column name Data type Size


ID Number 2
Val String 10
Q-20) Insert the following record into TableB

ID Value
10 A
50 E
60 F
70 G
Q-20) Write the output of following query.

Select * from TableA

union

Select * from TableB

Q-21) Write the output of following query.

Select * from TableA


union all

Select * from TableB

Q-22) Write the output of following query.

Select * from TableA

intersect

Select * from TableB

Q-23) Write the output of following query.

Select * from TableA

Minus

Select * from TableB

Q-24) Write the output of following query.

Select * from TableA

union

Select ID from TableB

Q-25) Write the output of following query.

Select ID from TableA

union

Select * from TableB

Vous aimerez peut-être aussi