Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SUBJECT : Database QUESTION 1 (10 MARKS) Instruction: Construct SQL statements for the following questions. Consider the following tables: DOCTOR DocID FirstName LastName Specialization 101

image text in transcribed

SUBJECT : Database

QUESTION 1 (10 MARKS) Instruction: Construct SQL statements for the following questions. Consider the following tables: DOCTOR DocID FirstName LastName Specialization 101 Muhammad Fateh Surgery 102 Maryam Mazlan Neurology 103 Sumayyah Idris Dermatology HireDate 15/05/2000 21/03/2001 07/02/2003 PATIENT PatientID 111 222 333 FirstName Khai Haqiem Siti Nurhaliza Last Name Bahar Rusli Taruddin DocID 101 102 101 The tables show the data for PATIENT and DOCTOR. Each patient will be treated by only one doctor and each doctor will treat many patients. Answer the following questions. a) Create table for PATIENT with these constraints: PatientID is a primary key and unique. DocID is the foreign key which referring to DocID in DOCTOR table. PatientID cannot be null. (5 marks) b) Admin wants to insert a new doctor named Ali bin Abu (DocID = 101). State its possibility of the insertion according to entity integrity constraint rules. (2 marks) c) Find the list of doctors who start working between 2000 until 2019 and his/her specialization is surgery

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

4. What action should Cherita Howard take and why?

Answered: 1 week ago