[go: up one dir, main page]

0% found this document useful (0 votes)
48 views3 pages

Data Base Basic Worksheet

Uploaded by

Waseem Al-Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views3 pages

Data Base Basic Worksheet

Uploaded by

Waseem Al-Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Database concepts- RDBMS

Q.1 What is DBMS and what is its need?

Q.2 Mention the different data models used to organize data.

Q.3 Define: a) RDBMS b) Tuples c) Attributes d) views

Q.4 Explain the types of SQL commands with their examples.

Multiple Choice Questions

Which statement is used to display data from a table?


Q.1
A. select B. display C. read D. extract

Q.2
How would you display all those rows from a table named "Empl" where the value of the column "desig" is
"SALESMAN" ?
A. Select all from empl where desig is ' salesman '; B. Select * from empl where desig =' salesman ';
C. Select * from empl where desig = ' salesman " ; D. Select all from empl where desig ' salesman ' ;
Q.3
Which SQL keyword(s) is/are used to sort the rows in the output?
A. Sorted order B. Sort C. Sort by D. Order by

Q.4
Which keyword is used to return only different values in a column?
A. Different B. Exclusive C. Distinct D. Unique

Which command is used create table in a database?


Q.5
A. Create database B. Create table C. Create view D. create order

87 | P a g e
True or False

Q.1
DBMS is not used for sharing of data.
Q.2 RDBMS organizes data in the form of a tree.
Q.3 Update is an example of DML command.
Q.4 Sorting in a database can be done by using Group by clause.
Answer the queries given below
Q.1 While creating the table, Mr Ram forgot to add a column ‘marks’ in the table ‘student’. Give the name of a
command to a column in a table ‘student’.
Q.2 Write the command to create the table ‘book’ with the following specification.
Bookno integer,
Bookname varchar(10),
Price decimal(5,2)
Q.3 While entering the salary of the employees in the table ‘EMP’ , Mr. Laxman made a mistake in the salary of
employee no 1122.It should be 1300 instead of 1500.What command should he write to rectify the mistake.
Q.4 Study the given tables and answer the queries given below
Table: HOSPITAL
PNo Name Age Department DateofAdm Charges Sex

1 Sandeep 65 Surgery 23/02/98 300 M


2 Ravina 24 Orthopedic 01/01/98 200 F
3 Karan 45 Orthopedic 19/02/98 200 M
4 Tarun 12 Surgery 01/01/98 300 M
5 Zubin 36 ENT 12/01/98 250 M
6 Ketaki 16 ENT 24/02/98 300 F
7 Ankita 29 Cardiology 20/02/98 800 F
8 Zareena 45 Gynecology 22/02/98 300 F
9 Kush 19 Cardiology 13/01/98 800 M
10 Shailya 31 Medicine 19/02/98 400 M

a) To list the names of female patients who are either in the orthopedic or surgery department.
b) To list the name of all the patients with their date of admission in ascending order.
c) To count the number of patients with age > 20.
d) To display various departments in the hospital .
e) To display the number of patients in each department.

88 | P a g e
Q.5 Study the given tables and answer the queries given below.

Table: ACTIVITY
Acode ActivityName Stadium ParticipantsNum PrizeMoney ScheduleDate

1001 Relay 100x4 Star Annex 16 10000 23-Jan-2004


1002 High Jump Star Annex 10 12000 12-dec-2003
1003 Shot Put Super Power 12 8000 14-Feb-2004
1005 Long Jump Star Annex 12 9000 01-Jan-2004
1008 Discuss Throw Super Power 10 15000 19-Mar-2004

Table: COACH

Pcode Name Acode

1 Ahmed Hussain 1001


2 Ravinder 1008
3 Janila 1001
4 Naaz 1003

a) Display the coach’s name and Acodes in ascending order of Acode from the table COACH.
b) Display the content of Activity table whose ScheduleDate is earlier than 01/01/2004 in ascending order
of ParticipantsNum.
c) Display the names of coaches who are not associated with any activity at all.

Find the output for the queries given below:

d) Select activityname from activity where stadium =’ Star Annex’;


e) Select acode, participantsnum from activity group by stadium;

89 | P a g e

You might also like