Marks 1
Consider the relational database with the following four schemas and their respective instances.
Student( $$\underline {sNo} $$ , sName, dNo) Dept( $$...
Consider a relational database containing the following schemas.
The primary key of each table is indicated by underlying the constituent fields.
SEL...
Consider the following two tables and four queries in SQL.
Book (isbn, bname), Stock (isbn, copies)Query 1: SELECT B.isbn, S.copies
FROM Book B INNER...
Consider the following relation
$$\,\,\,\,\,\,\,\,$$ Cinema(theater, address, capacity)
Which of the following options will be needed at the end of th...
SELECT operation in SQL is equivalent to
Given the following statements:
S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL.
S2: Given the table R(a,...
Which of the following statements are TRUE about an SQL query?
P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
...
A relational schema for a train reservation database is given below:
Passenger ( pid, pname, age)
Reservation (pid, cass, tid)
Table: Passenger
.tg...
Consider the following relation schema pertaining to a students database:
Students (rollno, name, address)
Enroll(rollno,courseno, coursename)
Where t...
Marks 2
A relational database contains two tables Student and Performance as shown below:
The primary key of the Student table is Roll_no. For the Performanc...
Consider the following database table named $$water$$_$$schemes :$$
.tg {border-collapse:collapse;border-spacing:0;border-width:1px;border-style:sol...
Consider the following relation:
Student
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;paddi...
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following qu...
Consider the following relational schema:
employee (empId, empName, empDept ) customer (custId, custName, salesRepId, rating)
SalesRepId is a foreign...
Given the following schema:
employees(emp-id, first-name, last-name, hire-date, dept-id, salary)
departments(dept-id, dept-name, manager-id, location...
Consider the following relational schema.
Students(rollno: integer, sname: string) Courses(courseno: integer, cname: string) Registration(rollno: inte...
Database table by name Loan_Records is given below.
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:...
Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X = 1, Y = 1) is inserte...
Consider the following relational schema:
Suppliers(sid : integer, sname : string, city : string, street : string)
Parts(pid : integer, pname : string...
Consider the following relational schema:
Suppliers(sid : integer, sname : string, city : string, street : string)
Parts(pid : integer, pname : string...
Consider The Following Relational Scheme
Student (school-id, sch-roll-no, sname, saddress)
School (school-id, sch-name, sch-address, sch-phone)
Enrolm...
Consider The Following Relational Scheme
Student (school-id, sch-roll-no, sname, saddress)
School (school-id, sch-name, sch-address, sch-phone)
Enrolm...
Consider the table employee(empId, name, department, salary) and the two queries Q1, Q2 below. Assuming that department 5 has more than one employee, ...
Consider the relation account (customer, balance) where customer is a primary key and there are no null values. We would like to rank customers accord...
Consider the relation "enrolled (student, course)" in which (student, course) is the primary key, and the relation "paid (student, amount)" where stud...
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are Did and cid respectively and the...
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are Did and cid respectively and the...
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the foll...
A company maintains records of sales made by its salespersons and pays them commission based on each individual’s total sales made in a year. This dat...
In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, ...
The employee information in a company is stored in the relation
Employee (name, sex, salary, deptName)
Consider the following SQL query
Select deptN...
A relational database contains two table student and department in which student table has columns roll_no, name and dept_id and department table has ...
Consider two tables in a relational database with columns and rows as follows:
Table: Student
.tg {border-collapse:collapse;border-spacing:0;}...
Consider the set of relations shown below and the SQL query that follows.
Students: (Roll_number, Name, Date_of_birth)
Courses: (Course number, Course...
In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are trea...
Given relations r( w, x ) and s( y, z ), the result of
select distinct w,x
from r, s;
is guaranteed to be same as r, provided...
Which of the following is/are correct?
Consider the set of relations
EMP (Employee-no, Dept-no, Employee-name, Salary)
DEPT (Dept-no, Dept-name, Location)
Write an SQL query to:
(a) Find al...
Suppose we have a database consisting of the following three relations.
FREQUENTS (student, parlor) giving the parlors each student visits.
SERVES (pa...