7.5 KB · commit 40bb182
Department of Electrical & Computer Engineering
Course No: ECE 2215
Course Title: Database Systems
| Question No. | Question Description | Marks |
|---|---|---|
| Q.1 (a) | Write down four significant differences between a file processing system and a DBMS. | 04 |
| Q.1 (b) | Draw an E-R diagram for RUET student database which can be used to store student's basic information, course advisor's information, subject registration, result information. | 06 |
| Q.1 (c) | What are the main functions of a database administrator? Point out the name only. | 02 |
| Question No. | Question Description | Marks |
|---|---|---|
| Q.2 (a) | Consider the following relational database.employee(person_name, street, city)works(person_name, company_name, salary)company(company_name, city)manages(person_name, manager_name)Now write down the relational algebra(Not SQL) to express each of following queries: (i) Find the names of all employees who live in the city same as their corresponding company location. (ii) Give a 10% salary raise to all the managers only. (iii) Update the city information of the employee named "James" to "Newtown". (iv) Find the company with most employees. | 08 |
| Q.2 (b) | What is the purpose of data abstraction? Describe the different level of data abstraction. | 04 |
| Question No. | Question Description | Marks | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Q.3 (a) | What do you mean by normalization? Why normalization is important for database? | 03 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Q.3 (b) | Consider the following data table com_employee. Is it already normalized? If not then normalize the table com_employee up to 3rd normal form. com_employee
| 09 |
| Question No. | Question Description | Marks | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Q.4 (a) | Considering following tables (INFO, MARKS, CREDIT) answer (i),(ii) & (iii).
(i) Write down the SQL query to create the table MARKS. (ii) Write down the SQL query to find out subject code and corresponding gpa of the student whose class serial 02. (iii) Write the the SQL query to calculate the cgpa of each student using the formula, cgpa=ΣcreditΣgpa⋅credit | 09 |
(Note: In the original printed question paper, Q.4 contains only sub-question (a) with 09 marks indicated in the margin, leaving a 3-mark deficit from the standard 12 marks).
| Question No. | Question Description | Marks |
|---|---|---|
| Q.5 (a) | Briefly discuss the ACID properties of transaction. | 04 |
| Q.5 (b) | What do you know about conflict serializability? | 02 |
| Q.5 (c) | Consider the following two transactions. T1: read(A);read(B);if A = 0 then B:=B+1;write(B);T2: read(B);read(A);if B = 0 then A:=A+1;write(A);Let the consistency requirement be A=0 or B=0 with A=B=0 the initial values. (i) Show a concurrent execution of T1 and T2 that produces a nonserializable schedule. (ii) Is there a concurrent execution of T1 and T2 that produces a serializable schedule? | 06 |
| Question No. | Question Description | Marks |
|---|---|---|
| Q.6 (a) | Write short note on specialization and generalization in DBMS. | 02 |
| Q.6 (b) | How concurrent execution of transactions are controlled using two phase based locking protocol? Briefly discuss with an example. | 04 |
| Q.6 (c) | Classify and discuss the failures in DBMS. | 03 |
| Q.6 (d) | Discuss shortly the log-based recovery approach to ensure atomicity despite of failures of DBMS. | 03 |
| Question No. | Question Description | Marks |
|---|---|---|
| Q.7 (a) | What is starvation? Consider the following two transactions. T1: read(A);read(B);if A = 0 then B:=B+15% of B;write(B);T2: read(B);read(A);if B = 0 then A:=A+20% of A;write(A);Add lock and unlock instructions to transaction T1 and T2, so that they observe the two phase locking protocol. Can the execution of these transactions result in a deadlock? Justify. | 05 |
| Q.7 (b) | Define deadlock. Explain how deadlock is prevented? | 04 |
| Q.7 (c) | What is hashing? Differentiate between static and dynamic hashing. | 03 |
| Question No. | Question Description | Marks |
|---|---|---|
| Q.8 (a) | Describe four of the main threats to database security. | 04 |
| Q.8 (b) | Using examples, discuss how Trigger can contribute to the security of database, before and after a security breach. | 05 |
| Q.8 (c) | What is 1NF, 2NF and 3NF? | 03 |