Sei sulla pagina 1di 2

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code & Title: 17CS2210 & Data base Management Systems
Tutorials
Tutorial-6
Execute various queries involving inner joins, outer joins, Cartesian product, natural join on
student table and marks table.
Data Dictionary:
Student:
SNO ATTRIBUTE DATA TYPE & CONSTRAINTS
SIZE
1 SNO PRIMARY KEY, STARTS WITH ‘S’
VARCHAR2(5)
2 SNAME VARCHAR2(15)
UPPER CASE
3 DOB DATE -
4 ELECTIVE VARCHAR2(15)
MBA (or) MCA
Marks:
SNO ATTRIBUTE DATATYPE&SIZE CONSTRAINTS
1 SNO VARCHAR2(5) PRIMARY KEY, REFERENCES STUDENT (SNO)
2 M1 NUMBER(3) BETWEEN 0 AND 100
3 M2 NUMBER(3) BETWEEN 0 AND 100
4 M3 NUMBER(3) BETWEEN 0 AND 100
E-R Diagram:

SNAME DOB M1 M2

SNO ELECTIVE SNO M3

SM
STUDENT MARKS

1. Display all the student details using natural join?


2. Display the students no, name and marks who secured above 80 in all subjects using
inner join?
3. Display the students no, name and marks who secured below 40 in any of the subject
using left outer join?
4. Display the student details who have joined in MCA using right outer join?
5. Display the student details whose date of birth is ’17-AUG-08’ or ’15-NOV-07’ using
full outer join?
6. Display the details of student ‘SN005’ using Cartesian product?

Potrebbero piacerti anche