Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q5. Suppose that we have the following database tables with three entities Clerks, Shaps, and Goods: Fieg 05=3 (a) Draw the ER diagram for these

image text in transcribed
Q5. Suppose that we have the following database tables with three entities Clerks, Shaps, and Goods: Fieg 05=3 (a) Draw the ER diagram for these three tables (remember to show the attributes and keys of the entities in the diagram). (3 marks) (b) Write the data definition language (DDL) to create these three tables. Assume that the: maximum field size for the character data is 30 . (5 marks) (c) Write the SQL to add the following values to the corresponding tables. Fig. 05b (3 marks) (d) Write the SQL to get the clerks" information with age more than 25 . (3. marks) (e) Write the SQL to get the name of the clerk who works in 'Sham Shui Po'. (3 marks) f) Draw the resultant table of the following query. SELECT S.sname FROM Shops S, Clerks C, Goods G WHERE S.sid=G.sid AND S.sid=C.cid AND G.gprice >500 AND C.cname = ' Jim

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions