Question: Q1. (A). Write SQL queries for the followings. i.Display the student name, father name, Discipline and admission date of Students, who got admission between 2017,

Q1.

(A). Write SQL queries for the followings.

i.Display the student name, father name, Discipline and admission date of Students, who got admission between 2017, and 20118. Order the query in ascending order by admission date.

ii. Display the names of all Student where the third letter of their name is M.

iii) Display all students, who are either belongs to the city Peshawar or had a grade above 100.

Iv) Count all the students from Peshawar with Aliases (Student of Peshawar)

(B).Explain characteristics of debase approach versus the file processing approach

(C) Draw an ERD for the following situation.

(If you believe that you need to make additional assumptions, clearly state them for each situation.) A hospital has a large number of registered physicians. Attributes of PHYSICIAN include Physician ID (the identifier) and Specialty. Patients are admitted to the hospital by physicians. Attributes of PATIENT include Patient ID (the identifier) and Patient Name. Any patient who is admitted must have exactly one admitting physician. A physician may optionally admit any number of patients. Once admitted, a given patient must be treated by at least one physician. A particular physician may treat any number of patients, or may not treat any patients. Whenever a patient is treated by a physician, the hospital wishes to record the details of the treatment (Treatment Detail). Components of Treatment Detail include Date, Time, and Results.

a) Did you draw more than one relationship between physician and patient? Why or why not?

b) Did you include hospital as an entity type? Why or why not?

c) Does your ERD allow for the same patient to be admitted by different physicians over time?

Q1. (A). Write SQL queries for the followings. i.Display the student name,

Q1 (A) .Write SQL queries for the followings. Display the student name, father name, Discipline and admission date of Students, who got admission between 2017, and 2018. Order the query in ascending order by admission date. ii. Display the names of all Student where the third letter of their name is M. iii) Display all students, who are either belongs to the city Peshawar or had a grade above 100. W.Count all the students from Peshawar with Aliases (Student of Peshawar) (B).Explain characteristics of debase approach versus the file processing approach. (C).Draw an ERD for the following situation. (If you believe that you need to make additional assumptions, clearly state them for each situation.) A hospital has a large number of registered physicians. Attributes of PHYSICIAN include Physician ID (the identifier) and Specialty. Patients are admitted to the hospital by physicians. Attributes of PATIENT include Patient ID (the identifier) and Patient Name. Any patient who is admitted must have exactly one admitting physician. A physician may optionally admit any number of patients. Once admitted, a given patient must be treated by at least one physician. A particular physician may treat any number of patients, or may not treat any patients. Whenever a patient is treated by a physician, the hospital wishes to record the details of the treatment (Treatment Detail). Components of Treatment Detail include Date, Time, and Results. a) Did you draw more than one relationship between physician and patient? Why or why not? b) Did you include hospital as an entity type? Why or why not? c) Does your ERD allow for the same patient to be admitted by different physicians over time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!