* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download File
Survey
Document related concepts
Microsoft Access wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Ingres (database) wikipedia , lookup
Concurrency control wikipedia , lookup
Functional Database Model wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Relational algebra wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
Unit 1 1. List five responsibilities of a database management system. For each responsibility explain the problems that would arise if the responsibility were not discharged.[5] 2. Define DBMS. Explain advantages of DBMS.[5] 3. Explain the distinctions among the terms primary key, candidate key, and superkey.[3] 4. Construct an E-R diagram for a car-insurance company whose customers own one or more cars each. Each car has associated with it zero to any number of recorded accident.[5] 5. Write short note on View , Foreign key, Primary key.[4] 6. Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.[5] 7. Give an example of a relation schema R and a set of dependencies such that R is in 3NF, but is not in BCNF.[5] 8. How does the concept of an object in the object-oriented model differ from the concept of an entity in the entity-relationship model?[4] 9. Explain 1NF,2NF,3NF,BCNF.[8] 10. Explain Various DML and DDL statements using Example.[6] 11. What are DCL and TCL statements.[4] 12. Explain Indexing with suitable example.[7] 13. Consider the relational database[4(1M for each query)] branch (branch_name, branch_city, assets) ,,,customer (customer_name, customer_street, customer_city) account (account_number, branch_name, balance) ,,,loan (loan_number, branch_name, amount) …depositor (customer_name, account_number) …borrower (customer_name, loan_number) Write SQL queries for the following: 1. Find customer name who lives in city Harrison. 2. Find all the customers of the bank who have an account but not a loan. 3. Find the name of all customers who have a loan at the Perryridge branch. 4. Find the name of all customers who have a loan at the bank along with the loan number and the loan amount. 14. Consider following relations[8(1m for each query)] Department (dept name varchar (20), building varchar (15), budget numeric (12,2), primary key (dept name)); Instructor (ID varchar (5), name varchar (20) not null, dept name varchar (20), salary numeric (8,2), primary key (ID), foreign key (dept name) references department); Teaches (ID varchar (5), semester varchar (6), year numeric (4,0), primary key (ID, semester, year), foreign key (ID) references instructor); And write sql queries for following. i. Find the average salary of instructors in computer science department . Use as clause. ii. Find the total no of instructors who teach course in fifth semester 2013.Use distinct keyword. iii. Find average salary in each department user group by clause. iv. Find the departments where average salary of instructors more than 20000.Use group by and having clause. v. Find the departments that have highest average salary. vi. Delete the records of all instructors with salary below average. vii. Write a query to give 5% salary raise to instructors whose salary is less than average. viii. Find those departments who has maximum budget. 15. Consider the relational database given below [2(1m for each query)] Employee(emp_name,street,city) Works(emp_name company_name, salary) Company(company_name,city) Manages(emp_name,manager_name) For each of the given query ,give an expression in relational algebra/ or queries in SQL. i) Find the emp_name,street and cities of residence whose salaries exist in between 10000 and 2000 and work for ABC Ltd. ii)Find the name,street and cities of employees who live in the same city as the company they works for. 16. What is view? Explain major problem with processing update operations expressed in terms of views.[4] 17. ) How Following Problems are handled with DBMS. [ 6] i. Data Isolation. ii. Data Redundancy and Inconsistency. iii.Data Integrity 18. Explain various Data Models used in DBMS in detail. [8] 19. What are different types of JOINS in database? 20. What are different integrity constrains? [6] [-8] 21. What is role of ER diagram in database design? 22. What is Entity? Give examples of entities.[4] 23. What are the advantages of DBMS over conventional File processing system[4] 24. Explain with Example how E-R diagrams are converted into tables.[6] 25. Consider following database. [5] Student(roll_no,name,address) Subject(sub_code,sub_name) Marks(roll_no,sub_code,marks) Write following queries in SQL. i. Find average marks of each student ,along with the name of the student. ii. Find how many students have failed in the subject”DBMS”(note:Failed means marks < 40) 26. Consider the relation database given below: [6] employee ( emp-name , street , city ) works (emp-name, company-name, salary) company (company-name, city) manages (emp-name , manager-name) i) Give an SQL DDL definition of this database. Identify referentrial integrity constraints that should hold and include them in the DDL definition. ii) Write SQL expression for the following queries 1) Find the company with most employees 2) Find the company with the smallest payroll. 27. Consider the relational database: dept(dept_no, dname, LOC) emp(emp_no,ename,designation) project(project_no,project_name,status) dept and emp are related as 1 to many. project and emp are realted 1 to many. [6] Write SQL expressions for the following : i) List all employees of 'INVERTORY' department of 'PUNE' location. ii) Give the names of employees who are working on 'BLOOD BANK' project iii) Give the name of managers from 'MARKETING' department iv) Give all the employees working under status 'INCOMPLETE' projects. 28. What is data abstraction?