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

Class: Xii Subject: Computer Science (083) DATE: 18.10.22

This document contains a worksheet with questions about databases, SQL, and MySQL. It includes questions that ask students to: 1. Write MySQL commands to open existing databases, create new databases, create tables with specific fields and constraints, and alter or delete databases and tables. 2. Identify the meaning of SQL, MySQL, DBMS software, data types like CHAR and VARCHAR, and constraints like PRIMARY KEY, UNIQUE, and FOREIGN KEY. 3. Suggest appropriate MySQL commands to view database and table structures, list databases and tables, and insert, update, or delete records from tables.

Uploaded by

Jayanth Kumar
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)
57 views3 pages

Class: Xii Subject: Computer Science (083) DATE: 18.10.22

This document contains a worksheet with questions about databases, SQL, and MySQL. It includes questions that ask students to: 1. Write MySQL commands to open existing databases, create new databases, create tables with specific fields and constraints, and alter or delete databases and tables. 2. Identify the meaning of SQL, MySQL, DBMS software, data types like CHAR and VARCHAR, and constraints like PRIMARY KEY, UNIQUE, and FOREIGN KEY. 3. Suggest appropriate MySQL commands to view database and table structures, list databases and tables, and insert, update, or delete records from tables.

Uploaded by

Jayanth Kumar
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

CHENNAI PUBLIC SCHOOL

TH ROAD * SH 50 * THIRUMAZHISAI * CHENNAI – 600 124


UNIT III : WORKSHEET 1 : DBASE & SQL
CLASS: XII SUBJECT : COMPUTER SCIENCE (083) DATE : 18.10.22

1. If a database "Employee" exists, which MySql command helps you to start


working in that
database?
2. Write MySql command will be used to open an already existing database
"LIBRARY".
3. Write MySql command to open an existing database.
4. What does SQL stand for? What is MySQL?
5. Write two examples of DBMS software.
6. Sharmila wants to make the database named ‘COMPANY’ active. Write MySQL
commands for it.
7. What is MySQL ?
8. What is the relationship between SQL and MySQL ?
9. Mention any two example of common Database Management System.
10. Suggest Archana suitable command for the following purpose:
To display the list of the database already existing in MySQL.
To use the database named City.
To remove the pre-existing database named Clients.
11. Write the command to create a new database “School”
12. Write an SQL query to create the table 'Menu' with the following structure:

13. Can a table have multiple primary keys? Can it have multiple foreign keys?
14. In a Student table, out of Roll Number, Name, Address which column can be set as
Primary key and why?
15. Ms. Mirana wants to remove the entire content of a table "BACKUP" along with its
structure to release the storage space. What MySql statement should she use ?
16. Write MySql command to create the Table STOCK including its Constraints. Table
STOCK :

17. Write one similarity and one difference between CHAR and VARCHAR data types.
18. Saumya had previously created a table named ‘Product’ in a database using MySQL.
Later on she forgot the table structure. Suggest her suitable MySQL command through
which she can check the structure of the already created table.
19. Roli wants to list the names of all the tables in her database named ‘Gadgets’. Which
command (s) she should use to get the desired result.
20. Name the SQL commands used to :

1
Physically delete a table from the database. (ii) Display the structure of a table.
21. Write one similarity and one difference between UNIQUE and PRIMARY KEY
constraints.
22. An attribute A of datatype varchar(20) has the value “Amit” . The attribute B of
datatype char(20) has value ”Karanita” . How many characters are occupied in
attribute A ? How many characters are occupied in attribute B?
23. Mrs. Sharma is the class teacher of Class ‘XII A’ She wants to create a table ‘Student’
to store details of her class.
i) Which of the following can be the attributes of Student table?
a) RollNo b) “Amit” c) Name d) 25
ii) Name the Primary key of the table ‘Student’. State reason for choosing it.
24. While creating a table named “Employee”, Mr. Rishi got confused as which data type
he should chose for the column “EName” out of char and varchar. Help him in
choosing the right data type to store employee name. Give valid justification for the
same.
25. Suggest her suitable command for the following purpose:
To display the list of the database already existing in MySQL.
To use the database named City.
To remove the pre-existing database named Clients.
To remove all the records of the table named “Club” at one go along with its structure
permanently.
26. Write SQL query to create a table ‘Player’ with the following structure:

27. Anita has created the following table with the name ‘Order’.

One of the rows inserted is as follows :


What is the data type of columns OrderId and OrderDate in the table Order ?
Anita is now trying to insert the following row ; Will she be able to successfully insert
it ? Give reason.

28. Observe the given table carefully and answer the following questions:

2
Name the column that might have a Primary Key constraint. Justify your answer.
Name the column that might have a Unique constraint. Justify your answer.
29. Write SQL query to create a table ‘Event’ with the following structure :
Field Type Constraint
EventId Varchar(5) PRIMARY KEY, EventName Varchar(30) NOT
NULL
Location Varchar(50) , ClientID Integer , EventDate Date

You might also like