Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

Screen Shot 2023-04-16 at 10.12.48 PM.png 

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

What are the major inputs into physical database design?

Answered: 1 week ago

Question

=+a. Find the probability that both bids are successful.

Answered: 1 week ago