Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can help me with this database task? CONFIDENTIAL CS/OCT - FEB 2023/1C7450 PART A (20 MARKS) Consider the following tables: DOCTOR PATIENT The tables show
can help me with this database task?
CONFIDENTIAL CS/OCT - FEB 2023/1C7450 PART A (20 MARKS) Consider the following tables: DOCTOR PATIENT 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 a database. Name your database as CYOUR NAME-CMATRIC b) Create table for DOCTOR with these constraints: DocID is a primary key and cannot be null FirstName, LastName and Specialization set to CHAR data type HireDate is set to DATE data type (2 marks) c) Create table for PATIENT with these constraints: PatientID is a primary key and unique. DocID is the foreign key which refers to DocID in DOCTOR table. PatientID cannot be null. (4 marks) d) Admin want to insert a new patient's info, Siti Halimah and she will be treated by the doctor (DocID =104 ). Is it possible to insert this new data into PATIENT's table? Describe your answer. (3 marks) e) Admin wants to insert a new doctor named Ali bin Abu (DocID = 101). State its possibility of the insertioa according to entity integrity constraint rules. f) Find the list of doctors who start working between 2000 until 2019 and hisher specialization is surgery. (4 marks) o Hah Opta Univerit Telmilag Masa CONFIDENTAL The following questions will be based on the Crow's Foot ERD below: a) Create table DRESS. (4 marks) b) Insert a new dress record as follows, into table DRESS: (3 marks) c) Add a new column called Dress_Color in the DRESS table. (2 marks) d) Find the number of dresses which price is RM50.00 and above. (3 marks) e) List all the information about the dresses and their boutiques sorted by boutique name. (4 marks) f) Update the DRESS table so that the dress which price is above RM100.00 will be given 10% discount. (4 marks) Step 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