Database Management System
Database Management System
Name Description
Date It can store a month, day, and year in the mm/dd/yyyy format.
Time It can store data about time, i.e. hour, minute, and second in
hh:mm:ss format.
Timestamp It can store both date and time information combined.
F. Application-based questions
1. a.
Column Name Type Size
Item_No. integer 10
Item_Name varchar 15
Price decimal 5, 2
Quantity integer 3
b.
i. SELECT Price * QuantityFROM Item;
ii. SELECT * FROM Item
WHERE “Price” < 50;
2.
a. SELECT* FROM Hospital
WHERE “Department” = ‘Cardiology’;
b. SELECT Name FROM Hospital
WHERE “Gender” = ‘F’ AND “Department” = ‘Orthopaedic’;
c. SELECT Name, Date_of_AdmissionFROM Hospital
ORDER BY Date_of_Admission ASC;
d. SELECT Count (Age)FROM Hospital WHERE “Age” > 20;
3.
a. SELECT Name FROM Graduate
WHERE “Division” = ‘First’ORDER BY Name;
b. INSERT INTO “Graduate” (Name, Subject, Average Marks, Division) VALUES (‘Kajol’,
‘Computer’, ‘7s5’, ‘First’)