0% found this document useful (0 votes)
28 views2 pages

CSE311 Mid Question

The document discusses database concepts like relational databases, users and their functionality in a database, foreign keys, joins, common table expressions (WITH clause), and SQL queries on a university database schema. It contains 5 questions asking to identify the father of relational databases and his award, describe database users, explain foreign key markings, rewrite a SQL query using a WITH clause, and write SQL queries on a university database diagram.

Uploaded by

maisha.ayman.75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

CSE311 Mid Question

The document discusses database concepts like relational databases, users and their functionality in a database, foreign keys, joins, common table expressions (WITH clause), and SQL queries on a university database schema. It contains 5 questions asking to identify the father of relational databases and his award, describe database users, explain foreign key markings, rewrite a SQL query using a WITH clause, and write SQL queries on a university database diagram.

Uploaded by

maisha.ayman.75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Name:

ID:

1. Who is the father of relational database? Mention his 2. Describe the functionality
name and the award (most prestigious award in computer of the below users? (3)
science field) he achieved? (2)
Answer:

3. Generally, single mark arrow indicates a foreign key. Illustrate the reason for choosing
the double markings in the university database schema. Mention the possible options for
coding in SQL server? (5)

4. The output of below query is given.


select A.course_id,p.prereq_id from
(select t.course_id from
instructor as i, teaches t
where i.id = t.id
and name = 'Srinivasan') as A
left outer join prereq p
on A.course_id = p.course_id

Rewrite the same query using With Clause. (2). Answer:


DB Name: University

Table: Student

Table: Course

Table: Section Table: Grade

5. Specify the following queries in SQL on the database schema of above Figure.
a) For each section of those courses offered by CS department, retrieve the course number,
semester, year, and number of students who took the section. (4)

b) For each student who took more than 2 sections, retrieve the name, student number, major of
the student and the number of sections taken by the student. (4)

You might also like