1. AL-Zehra hospital maintains the details of doctors using SQL to store the data. As a database administer, Nimesh has decided that :
· Name of the database - ALZEHRA
· Name of the table - DOCTOR
· The attributes of DOCTOR are as follows:
Docid – Numeric, DocName – character of size 20, Dept- character of size 20 ,Gender-1 character (‘M’ / ‘F’)
Docid
DocName
Dept
Gender
Salary
1
Amit
Ortho
M
75000
2
Aneeta
Pediatrics
F
65000
3
Mahendra
Surgery
M
83000
4
Lolitha
General
F
92000
5
Kavith
Ortho
F
81000
6
Rizwin
Pediatrics
M
79000
7
Nayan
Surgery
M
95000
(a) Identify the attribute(s) best suitable to be declared as a primary key,
(b) Write the degree and cardinality of the table DOCTOR.
(c) Insert the following data into the attributes Docid, DocName and Gender respectively in the given table DOCTOR.
Docid= 8, DocName = “Farhaan” and Gender= “M”
(d) Nimesh wants to remove all the rows of the table DOCTOR of the
database ALZEHRA. Which command will he use from the following:
a) DELETE FROM DOCTOR;
b) ALTER TABLE DOCTOR;
c) DROP COLUMN FROM DOCTOR;
d) DELETE DOCTOR FROM ALZEHRA;
(e) Nimesh wants to display the structure of the table DOCTOR, i.e,name of the attributes and their respective data types that he has used in the table. Write the query to display the same.
Answers
Answered by
0
Answer:
Explanation:
1
Similar questions
Math,
1 month ago
World Languages,
1 month ago
Business Studies,
1 month ago
English,
2 months ago
Science,
2 months ago
Chemistry,
9 months ago