Question
Write SQL statements to create database and tables using the conceptual design from Phase I. Use appropriate naming conventions for all tables, attributes, primary keys,
Write SQL statements to create database and tables using the conceptual design from Phase I. Use appropriate naming conventions for all tables, attributes, primary keys, and foreign keys. You may copy and paste SQL statements from your own DBMS to the file you'll upload.
• Insert at least 5 rows data in each table via SQL statements. Write SELECT * for each table and do a SNIP or screen shot that shows your tables.
• Write SQL statements to update 1 column and delete 1 row for each table. You may copy and paste SQL statements from your own DBMS to the file you'll upload.
• Write four SQL queries,
1 contains GROUP BY
1 contains GROUP BY and HAVING
1 contains nested query with ALL
1 contains nested query with IN
show a screen shot or SNIP that shows the SQL code and the result.
For this relational schema:
PATIENT patient SSN full_name age gender address DEPARTMENT dept num name location In_patient DOCTOR doctor SSN Full_doctor_name Year_of_expirience specialty dnum +SERVICE service no BILL bill no DRUG drug no description bno name date PHARMACY pharmacy no address dose amount cost dssn phone_no dssn dssn name sno pno dnum dno dnum
Step by Step Solution
3.40 Rating (144 Votes )
There are 3 Steps involved in it
Step: 1
Creating Tables Lets assume a simple example with two tables Students and Courses Creating Students ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started