Professional Documents
Culture Documents
Assign 2 Problem Statements
Assign 2 Problem Statements
Assign 2 Problem Statements
Assignment 1
Title: ER Modeling and Normalization:
Problem Statement: Decide a case study related to real time application in group
of 2-3 students and formulate a problem statement for application to be
developed. Propose a Conceptual Design using ER features using tools like ERD
plus, ER Win etc. (Identifying entities, relationships between entities, attributes,
keys, cardinalities, generalization, specialization etc.) Convert the ER diagram
into relational tables and normalize Relational data model
Assignment 2A
Title: Design and Develop SQL DDL statements which demonstrate the use
of SQL objects such as Table, View, Index, Sequence, Synonym, different
constraints.
8) Delete record of particular instructor from instructor table using newly created viewname.
14) Create a view by showing a instructor name and title of course they teaches.
16) create a sequence (or use the AUTO_INCREMENT attribute) on course_id starting with
51
Assignment 2B
Title:Write at least 10 SQLqueries on the suitable database application
using SQL DML statements
Create a medical database having following table.
1. Patient table (pat_id,pat_name,date_adm,age,city);
2. Doctor table(doc_id,doc_name,qualification,exp,dept,city,salary);
3. Treats table(doc_id,pat_id,disease); foriegn key doc_id,pat_id;
doc_id on delete cascade
pat_id on delete set null
Query:--
1. Insert atleast 5 records in each table;
2. Display all the patient's name between the age group 18-50;
3. Display the list of doctors who are MD;
4. Display the list of doctors whose exp is 20+ years;
5. Display patients suffering from Cancer;
6. Display the patient name and the doctor name who r in cancer;
7. Display the patient name, whose name starts with letter A, End with A,
having the exacts 5 letters;
8. Remove all the records of patients with Pat_id =p10;
9. Remove all the records of doctor Suhas;
10. change the qualification of doctor shubham from mbbs to md;
11. give five percent salary raise to the dentist 5% and 10% to cardiologists,
in single query;
12. Display dept wise total salary of the doctors;
13. Find the dept , which has the highest avg salary;
find the avg salary of docs in dentist dept;
15. Find the dept where avg salary of the doctor is more than 50,000;
16. find how many docs works in hospital;
17. Find out how many doctors actually treated a patient;
18. list the cities in which either doctors or patient lives;
19. list the cites where both lives; List dname pname and their cities name if
they live in same city.
20. Find the doctors who have not treated any patient;
21. a) Display name of doctors and patients as a single column (union)
b) Let duplicate name appear many time (union all)
22. whats the total money collected so far from treatment of patients
23 Find average salary of each department.
24. Display patient name which does not have email id.