This document contains an assignment on relational databases and SQL from Delhi Public School Bopal for Class 12. It includes questions on data models, DBMS features, SQL statements, and example SQL queries. The assignment has three sections - learned lessons, extra efficient, and road to mastery. The road to mastery section provides sample tables and asks to write SQL queries on them related to creating tables, describing structure, aggregating data, and joining tables.
This document contains an assignment on relational databases and SQL from Delhi Public School Bopal for Class 12. It includes questions on data models, DBMS features, SQL statements, and example SQL queries. The assignment has three sections - learned lessons, extra efficient, and road to mastery. The road to mastery section provides sample tables and asks to write SQL queries on them related to creating tables, describing structure, aggregating data, and joining tables.
This document contains an assignment on relational databases and SQL from Delhi Public School Bopal for Class 12. It includes questions on data models, DBMS features, SQL statements, and example SQL queries. The assignment has three sections - learned lessons, extra efficient, and road to mastery. The road to mastery section provides sample tables and asks to write SQL queries on them related to creating tables, describing structure, aggregating data, and joining tables.
Class XII Ch: 8- Relational Database and SQL DOS: 30.08.2022
(Section A – Learned Lessons)
1. Explain different Data models with example. 2. Write the advantages of DBMS 3. Explain Cardinality and degree 4. What is data redundancy? 5. How does database management system ensure data security and privacy? 6. Write features of SQL 7. Draw table of classification of SQL Statements.
(Section B – Extra Efficient)
1. What is Cartesian Product? Show with example 2. What is Primary Key, Alternate key and Foreign Key. 3. What are aggregate functions and name them? 4. What is use of Having clause? 5. Explain: Cartesian product, Selection, Projection and Union operations in context of RDBMS 6. What are candidate keys in a table? Explain with example. 7. What is Relation? Define the properties of relation. 8. Write SQL commands for the following statements: (a) (i) Create table command for both the Tables using proper constraints (ii) Insert query for first record for both the tables. (iii) Describe structure of WORKER table.
(b) Write SQL commands for the following statements:
(i) To display the details of all WORKERs in descending order of DOB. (ii) To display NAME and DESIG of those WORKERs, whose PLEVEL is either P001 or P002. (iii) To display the content of all the WORKERs table, whose DOB is in between '19-JAN-1984' and '18-JAN-1987'. (iv) To add a new row with the following: 19, 'Daya Kishore', 'Operator', 'P003', '19-Jun-2008', '11-Jun-1984' (c) Give the output of the following SQL queries: 2 (i) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL; (ii) SELECT MAX (DOB), MIN (DOJ) FROM WORKER; (iii) SELECT Name, Pay FROM WORKER W, PAYLEVEL P WHERE W. PLEVEL = S. PLEVEL AND P.ECODE<13 ; (iv) SELECT PLEVEL, PAY+ALLOWANCE FROM PAYLEVEL WHERE PLEVEL= 'P003' ;
(Section C – Road to Mastery)
1. Create below given tables and do as directed Children ADMN NAME CLASS SEC RNO PHONE 1271 Utsav Patel 12 C 1 9865467344 1324 Naresh Sharma 10 A NULL 9876789566 1325 Md. Yusuf 12 A 2 9288334655 1328 Bijal Shukla 10 B 23 8766458999 1364 Varun Upadhyay 11 B 13 7654657687 1434 Babul DSouza 12 B 21 7434222443 1461 Dharmendra Singh 11 B NULL 8992222299 2324 Monty Mehta 10 C NULL NULL 2328 Peter Jones 10 C 18 9898989898 2371 Tarun Sheth 11 A 22 7887877887 Hobby ADMN GAME COACHNAME GRADE 1324 Cricket Narendra Shah A 1364 Volleyball M. P. Singh A 1271 Volleyball M. P. Singh B 1434 Basket Ball S. Malhotra B 1461 Cricket Narendra Shah B 2328 Basket Ball S. Malhotra A 2324 Cricket Narendra Shah A 2371 Basket Ball S. Malhotra B
Write queries for the following :
I. Write create table command for both the table using primary key and foreign key. II. Write a command to describe the structure of Hobby table. III. Display the lowest and Highest admn from the table Children. IV. Display the number of students in each class from the table Children. V. Display the admn, name, class, section of those students whose grade in Hobby table is ‘A’ VI. Display the name and phone from the table Children in descending order. VII. Display the name of the Children whose coach name is Narendra Shah 2. How group by is different from order by clause?