Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Case 2 Assume you have set up a relational database using only the 2 tables shown below. Student Hall Hall ID Name Age Address Hall_ID

Case 2

Assume you have set up a relational database using only the 2 tables shown below.

Student Hall

Hall ID Name Age Address Hall_ID Hall_ID Hall Name Tutor

001 CHEN Biming 17 Chongqing 01 01 Zhuo Ya Dr. Hanks

002 LIU Nuan 18 Tianjin 02 02 Huan Ya Dr. Chen

003 ZHANG Xiu 21 Wuhan 03 03 Wen Ya Dr. Wang

004 SONG Jian 19 Chengdu 01

a) What are the two entities for the relational database? (4 Marks)

b) What is the primary key and foreign key in the table STUDENT? (4 Marks)

c) Please draw the entity-relationship diagram to illustrate the relationship(s) among the entities in the above database. (4 Marks)

d) What are the query results that would be displayed if you wrote this SQL statement: (4 Marks)

e) Please write down the SQL statement: o To find the student who lived in Hall 1 and display their information, including their ID, Name, Age, and address. (2 marks) o To insert a new student record where ID is 006, Name is Chen Qing, Age is 18, and Address is Changsha and assign her to Hall 3. (2 marks).

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

Management And The Arts

Authors: William J. Byrnes

5th Edition

0415663296, 978-0415663298

More Books

Students also viewed these General Management questions

Question

2. Use the working-backward strategy to plan a party.

Answered: 1 week ago

Question

MB 1 3 . : 1 . ( ) : int No; / / ; / / ; / / ; / / ( - N ) ; / /

Answered: 1 week ago

Question

Understand the basic theories and concepts of OD

Answered: 1 week ago