0% found this document useful (0 votes)
6 views

CLASS 11 IP MySQL

This worksheet for Class XI on MySQL includes exercises on database concepts such as DBMS, primary keys, and data types. It contains sections for fill-in-the-blanks, table creation, and SQL command writing based on a sample DEPARTMENT table. The document aims to enhance students' understanding of database management and SQL syntax.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CLASS 11 IP MySQL

This worksheet for Class XI on MySQL includes exercises on database concepts such as DBMS, primary keys, and data types. It contains sections for fill-in-the-blanks, table creation, and SQL command writing based on a sample DEPARTMENT table. The document aims to enhance students' understanding of database management and SQL syntax.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

INDIAN SCHOOL AL WADI AL KABIR

Worksheet, 2022-23
Class: XI SUB: INFORMATICS PRACTICES Date of Completion:

Worksheet TOPIC: MySQL 15-11-2022

Section A
Fill in the blanks:
Define: DBMS
1) A table Sales has 10 rows and 5 columns. What is degree and Cardinality?
2) Write the differences between Primary Key and Unique Keys.
3) What do you mean by alternate key in SQL? Give example.
4) Define: Domain & Cardinality.
5) Mr. Vasanth a database developer created a table BOOKING in the database
TRAVELS. Later on he is unable to remember the size of columns and any
constraints defined in the Table . Suggest him the commands which he should use
to get the required information.
6) Ms. Rekha has a database named CompanyDB. She wants to display all the tables
under the CompanyDB. Help her in writing commands to achieve the task.
7) Which commands are used to create in a database StockDB and open it?
8) What are the data types available in MySQL in creating a table with different
columns?
9) Write the differences between Char and Varchar data type in My SQL
10) Is Null and 0 (Zero) are same in a My SQL table? Give reasons to your answer!
Section B

1) Create a table MOVIE with the following structure.


Table : MOVIE
Colunm_Name DataType(size) Constraint

MOVIENO Int(5) Primary Key


MOVIENAME Text(50)
LANGUAGE Text(15) Default “English”
RELEASE_DATE date
ACTOR Numeric(5)
BOXOFFICE Numeric(10,2)

2) Create a table Customer with the following field(s) specifications:


Table : Customer
Field Name Field Data Type and Size Constraints
AccNo Varchar(15) Primary Key
CustName Varchar(20) Not Null
DateOpened Date
CustCity Varchar(20) Default “Delhi”
Contact Int(10)

1| 2 9 - 1 0 - 2 0 2 2 / P R E P A R E D B Y : M r . A . R a n j i t h K u m a r | I C T D e p t .
3) Create a table Flight with the following field(s) specifications:

Table : FLIGHT
Field Name Field Data Type and Size Constraints
FCode Char(5) Primary Key
Airlines Varchar(15) Default “Oman Air”
Source Varchar(25)
Destination Varchar(25)
Fare Double(8,2)
4) Insert the following records in the above table Flight.
(‘IX240’, “Air India Express”, “Kochi”, “Kolkata”, 14300)
(‘AI736’, “Air India”, “Muscat”, “New Delhi”, 27850)
(“WY483”, “Oman Air”, “Dubai”, “Muscat”, 18425)

Section C
Write SQL commands for the questions from (i) to (xii) and write output(s) from (xiii) to (xv)
based on the following table DEPARTMENTV
Table Name : DEPARTMENT (Each carries 1 mark)
AdmNo Name Address Join_Date Fee Sem Grade
1256 Aditya B-4, Dwarka, Mumbai 2016-07-23 45000 I A1
5678 Amit Sec 5, R.K.Puram 2015-06-15 35000 III B2
1425 Karina B3/2, V.Vihar, Patna 2013-06-22 26000 II C1
8954 Bikram Sec 2, Pune 2012-03-13 75000 I A2
1789 Vijay 123/a, Mumbai 2014-02-17 35000 II B1
8376 Ganesh 53/2, Chandigarh 2012-10-05 0 Il C3
2938 Bharath 11/7, Chennai 2012-06-24 25000 II B2
6498 Tanu 117-n, Delhi 2016-05-25 32000 I A1
5420 Rajan 56-e, Ahemadabad 2014-02-27 32000 III B2
8567 Anita 73/c, Faridabad 2012-08-22 38000 I C2

i. Display all the details.


ii. Display Admission Number and Name of the students.
iii. Display the all the details of C1 grade students.
iv. Display the Name and Join Date of all the students who have got A1 grades.
v. Display the Name and Fees of all the students who are studying in Semester I and III.
vi. Display the details of all students who have paid fees more than Rs. 35,000.
vii. Display the admission no., name and address of all the students who have paid the fees
less than Rs. 30,000.
viii. Display the details of students who have paid the fees in the range Rs. 30,000 – Rs.
40,000 (Both values inclusive).
ix. Display the name and address of all the students who have paid the fees in the range Rs.
Rs. 25,000 – Rs. 35,000 (Both values exclusive).
x. Display the details of the students whose have not paid any fees.
xi. Display the details of all scholars whose date of join is before ’30/June/2012.
xii. Display the Name. Fee and Grade of the student with the admission number 1425.
xiii. SELECT ADMNO, NAME FROM DEPARTMENT WHERE FEES > 40000;
xiv. SELECT NAME, JOIN_DATE FROM DEPARTMENT WHERE JOIN_DATE >= “2016-01-01”;
xv. SELECT * FROM DEPARTMENT WHERE GRADE IN (“B2”, “C1”);

2| 2 9 - 1 0 - 2 0 2 2 / P R E P A R E D B Y : M r . A . R a n j i t h K u m a r | I C T D e p t .

You might also like