Answered step by step
Verified Expert Solution
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
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 surgeryStep by Step Solution
There are 3 Steps involved in it
Step: 1
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