0 evaluări0% au considerat acest document util (0 voturi)
68 vizualizări2 pagini
This document is a mid-semester exam for a database systems and applications course. It contains 6 questions assessing students' understanding of data models, ER diagrams, relational schemas, SQL queries, relational algebra expressions, and database indexing strategies. Students are instructed to answer all parts of the questions consecutively and start each answer on a fresh page.
This document is a mid-semester exam for a database systems and applications course. It contains 6 questions assessing students' understanding of data models, ER diagrams, relational schemas, SQL queries, relational algebra expressions, and database indexing strategies. Students are instructed to answer all parts of the questions consecutively and start each answer on a fresh page.
This document is a mid-semester exam for a database systems and applications course. It contains 6 questions assessing students' understanding of data models, ER diagrams, relational schemas, SQL queries, relational algebra expressions, and database indexing strategies. Students are instructed to answer all parts of the questions consecutively and start each answer on a fresh page.
Course No. : IS ZC332 Course Title : DATABASE SYSTEMS & APPLICATIONS Nature of Exam : Closed Book Weightage : 40% Duration : 2 Hours Date of Exam : 04/08/2007 (AN) Note: 1. Please follow all the Instructions to Candidates given on the cover page of the answer book. 2. All parts of a question should be answered consecutively. Each answer should start from a fresh page. 3. Mobile phones and computers of any kind should not be brought inside the examination hall. 4. Use of any unfair means will result in severe disciplinary action.
Q.1 What do you understand by the term data model? Discuss two most common data models. Explain the difference between a data model and its implementation. Why is the difference important? [6]
Q.2 What is aggregation relationship with respect to ER Diagrams? When should we use aggregation? Explain with an example. [6]
Q.3 The Universal Market Corp. has organized its operations using the database schema described here. The customers listed are themselves retail businesses that order large quantities of various products from the universal Market Corp. for resale. Distinct customers in the customers table are uniquely identified by values in the cid (customer identifier) column. Customers call in the orders to agents (uniquely identified by the aid value in the agents table). Each time an order is placed, a new row is inserted in the orders table, uniquely identified by an ordno value.
Customers (cid, cname, city, discount) Agents (aid, aname, city, percent) Products (pid, pname, city, quantity, price) Orders (ordno, month, cid, aid, pid, qty, dollars) Based on the schema shown above, answer the following queries in SQL.
A. Get cities of agents booking an order from customer with cid=c002 B. Find cids of customers who did not place an order through agent with aid=a03. C. Find cids of customer who order all the products. D. Get pnames and pids of products that are stored in the same city as one of the agents who sold these products E. Get pids of products ordered by all customers with any orders placed through agent a03 [2 x 5 = 10] No. of Pages = 2 No. of Questions = 6 IS ZC332 (EC-1 REGULAR) FIRST SEMESTER 2007-2008 PAGE 2
Q.4 Consider the relational database employee (person-name, street, city) works (person-name, company-name, salary) company (company-name, city) manages (person-name, manager-name)
Give a relational-algebra expression for each of the following queries: (a) Find the company with the most employees. (b) Find the company with the smallest payroll. (c) Find those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation. [2 x 3 = 6]
Q.5 What is the difference between a web server and an application server? What functionality do typical application servers provide? [6]
Q.6 Consider a relation R(a,b,c,d,e) containing 5,000,000 records, where each data page of the relation holds 10 records. R is organized as a sorted file with the search key R.a. Assume that R.a is a candidate key for R, with values lying in the range 0 to 4,999,999. For the relational algebra , state which of the following approaches (or combination thereof) is most likely to be the cheapest. Provide proper explanation. [6]
o Access the sorted file for R directly. o Use a clustered B+ tree index on attribute R.a. o Use a clustered hash index on attribute R.a. o Use a clustered B+ tree index on attributes (R.a,R.b). o Use a clusered hash index on attributes (R.a,R.b). o Use an unclustered B+ tree index on attribute R.b.