Page 333 - Trackpad 402_Class-X_Final
P. 333
SIZE INTEGER
AVGTEMP INTEGER
POLLUTIONRATE INTEGER
POPULATION INTEGER
Help her to complete the task by suggesting appropriate SQL commands.
Add 5 records in the table.
Display all the records from the table.
4. Amit is new to the concepts of a database. He opened the OpenOffice Base in his laptop to create a table in a database.
Help him understand the following concepts.
a. What are the advantages of creating a table in a database?
b. Why do we need a primary key in a table?
c. How many ways are there to create a table in a database?
d. What is the extension of a database created in an OpenOffice base?
5. A shopkeeper wants to use an SQL to maintain his stock. Using the given table to help him write an SQL command to do
the following:
Table: Stock
ITEM_ID ITEM_NAME PRICE QUANTITY DATE_OF_PURCHASE
101 Jeans 1500 200 12-Jul-2022
110 Shirt 1200 170 10-Sep-2022
121 Trousers 2300 182 11-Jan-2021
a. Display all records from the above table.
b. Display the records bought in the year 2022.
c. Display the amount calculated as Price X Quantity.
d. Display ITEM_ID, NAME and DATE_OF_PURCHASE in the ascending order of name.
6. Ananya wants to create multiple tables in a database and manage her data in her company. She wants to do a lot of other
things using the tables. Help her to do the following:
a. Name two different ways of creating a form in a table.
b. How can she create a Relationship between two tables?
c. Explain any two types of relationships.
d. What are reports in a database?
e. Name any one way of creating a report.
7. Write SQL commands:
Table: TEACHERS
NUMBER NAME AGE SUBJECT DATEOFJOIN SALARY GENDER
1 JUGAL 34 COMPUTER 10/01/2019 12000 M
2 PRATIGYA 31 SCIENCE 24/03/2019 20000 F
3 SANDEEP 32 MATHS 12/12/2019 30000 M
4 SANGEETA 35 SCIENCE 01/07/2020 40000 F
5 SATTI 42 MATHS 05/09/2020 25000 F
6 SHYAM 50 SCIENCE 27/06/2021 30000 M
7 SHIV OM 44 COMPUTER 25/02/2021 21000 M
8 SHALAKHA 33 MATHS 31/07/2020 20000 F
a. To show all the information about IT teachers.
b. To list the details of all the teachers who are getting salary between 20000 to 35000.
c. To display the subject of all the teachers whose age is more than 40 years.
d. To display the list of names of all the teachers in alphabetical order.
Database Management System 333

