pdfererr
pdfererr
in
→
Table of Contents
Home Computer Science [083] Informatics Practices [065] Employability Skills Info. Tech. [402/802] Artificial Intelligence [417]
Artificial Intelligence [843] Computer Application [165] Sumita Arora Solution G.K. CBSE News Project Contact Us
Recent Posts
Unit 1 Database Concepts Question Answer based on CBSE Skill Education Syllabus and
Download pdf
/ Class 12 Information Technology 802, Class 12 Information Technology 802 NCERT Book
Solution, Java Question Answer / By mycstutorial / March 17, 2023 CBSE Syllabus & Curriculum 2023-24
Answer: Distinct
Que 4. _____________ command is used to delete the structure of the table. [CBSE SQP]
Que 5. Sana has given the following query but she is unable to execute it successfully.
Write the correct query after rectifying the error. [CBSE SQP]
Answer: Select Name, Marks from student Where Name like ”P%”;
DDL
(i) DDL is a language which is used to define structure and constraints of data
(ii) DDL – Create table, Alter table, Drop table
DML
(i) DML is used to insert, modify and delete data in a database.
(ii) DML- Insert, Update Delete
Que 7. Consider the following table Doctor and answer the following Queries in SQL.
[CBSE SQP]
II. To display the all the details of Doctors whose Department ends with ‘y’
IV. To display names and the fee of doctors in the descending order of fee
Que 8. _____________is a collection of raw facts which have not been processed to reveal
useful information. [CBSE SQP]
Answer: Data
Answer: Same information is stored in more than one file which result in wastage of space.
Que 10. _____________ constraint is used to restrict the values of an attribute within a
range. [CBSE SQP]
Answer: Check
Que 11. _______________command is used to modify the base table definition. [CBSE
SQP]
Que 12. Illustrate any two DML commands with the help of suitable example. [CBSE SQP]
Example:
Example:
1. Reduction in Redundancy
2. Improved Consistency
3. Improved Availability
4. Improved Security
5. User Friendly
Que 14. Explain the concept of Candidate Key with the help of a suitable example. [CBSE
SQP]
Answer: A candidate key is a column, or set of columns, in a table that can uniquely identifies a
tuple and is not null. Each table may have one or more candidate keys. It is eligible to be a Primary
key
Que 15. What is the purpose of group by command? How is it different from Order by
command? Give example. [CBSE SQP]
Answer: The GROUP BY statement is used with aggregate functions (COUNT, MAX, MIN, SUM,
AVG) to group the result-set by one or more columns.
The ORDER BY keyword is used to sort the result-set in ascending or descending order
Example of Group By
Example of Order By
Que 16. Radha has given the following query, she is unable to run due to errors, rectify the
errors and underline the correction made: [CBSE SQP]
Que 17. Consider the following and answer the questions. [CBSE SQP]
Location Varchar(25)
Package Varchar(30)
Charges Decimal(10,2)
Answer:
AgentName varchar(20),
Location Varchar(25),
Package Varchar(30),
Charges decimal(10,2)
);
Answer: INSERT INTO TravelAgency VALUES (“A006”, “John Sharon”, “Sam Ana Travel”,
“Domestic”, 45000);
Que 18. ______ command is used to modify the value of attribute of one or more tuple in a
table. [CBSE SQP]
Answer: Update.
Que 19. Keyword used to display the structure of the table. [CBSE SQP]
Answer: Describe
Que 20. ______ constraint is used to restrict the values of an attribute within a range.
[CBSE SQP]
Answer: Check
Answer: It gives the dept_name attribute values of all tuples without repetition
Answer: Referential Integrity is used to check that data entered in one relation is consistent with
the data entered in another relation.
Que 23. _________ is use to apply condition with GROUP BY [CBSE SQP]
Answer: a. HAVING
Answer: c. Round()
Que 25. ____________ replaces zero or more number of random character, when used with
Like keyword. [CBSE SQP]
a. _ b. % c. $ d. @
Answer: b. %
26. __________ command which displays list of databases available on the current server.
[CBSE SQP]
i. Show databases
Answer: Same information is stored in more than one file which result in wastage of space.
Que 28. ________is a collection of raw facts which have not been processed to reveal
useful information. [CBSE SQP]
Answer: Data
Que 29. Which SQL keyword is used to sort the result? [CBSE SQP]
Answer: Order By
Que 30. ____________ commands deletes the tuples from a Table. [CBSE SQP]
Answer: Delete
Que 31. Explain Drop table with Cascade command. [CBSE SQP]
Answer: Drop Table will be dropped and with the CASCADE option, i.e. all the constraints that
refer this table would also be automatically dropped.
Example
Que 32. A company is making database of Employees having Personal details and Salary
details table. Personal details table have columns Empid, Name, Address, BloodGroup.
Suggest Columns for Salary details Table. [CBSE SQP]
Que 33. Mention at least 2 work areas which uses Database Management Systems. [CBSE
SQP]
Que 34. Jatin has given the following query from the table Student but he is unable to
execute it successfully. Write the correct query after rectifying the error. [CBSE SQP]
Answer: SELECT NAME, MARKS FROM STUDENT WHERE NAME LIKE ‘P%’
Que 35. Consider the following table and write SQL statements. [CBSE SQP]
Table – Menu
i. To add a new row with the following data “P009”, “Lemon Rice”, “South Indian”, 140
ii. Display details of all Menu items in the descending order of Price
iii. Display Item and Description of those Items whose price is between 100 and 150
iv. Add a new column Rating datatype as int to the table Menu
Answer:
(i) INSERT INTO MENU VALUES (“P009”, “LEMON RICE”, “SOUTH INDIAN”, 140);
(iii) SELECT ITEM, DESCRIPTION FROM MENU WHERE PRICE BETWEEN 100 AND 150;
Que 36. Which SQL keyword is used to display the data based on certain pattern? [CBSE
SQP]
Answer: a. LIKE
Que 37. Sagun is creating a table SALESMAN with fields Salesman number, Name, Total
Sales. She doesn’t want the Total Sales column to be remain unfilled i.e. she wants to
make entry in this field mandatory. Which constraint she should use at the time of creating
SALESMAN table: [CBSE SQP]
Que 38. Ranjana wants to delete the records where name starts with ‘A’ from the table
CUSTOMER having fields Name, Amount, Discount. Identify the correct command: [CBSE
SQP]
Name City
Akash Mumbai
Ajay Chennai
Banit Delhi
Fauzia Mumbai
Sakal Chennai
Select the command which will count the number of people in each city.
Que 40. Consider the Table EMPLOYEE given below: [CBSE SQP]
Harit West 28 10
Kritika Centre 30 10
Naveen East 40 20
Uday North 38 30
Nupur East 24 20
Moksh South 28 10
Shelly North 24 30
Choose the correct query/queries that will give the following output:
Name
Harit
Kritika
Moksh
ii. SELECT NAME FROM EMPLOYEE WHERE AGE BETWEEN 25 AND 30;
iv. SELECT NAME FROM EMPLOYEE WHERE ZONE IN (“WEST”, “CENTRE”, ”SOUTH”);
a. Only (i) b. Both (i) and (ii) c. Both (ii) and (iv) d. All (i), (ii) and (iv)
Que 41. The _________ command is used to modify the structure of the table STUDENT in
MySQL. [CBSE SQP]
c. ALTER STUDENT
d. MODIFY STUDENT
YEAR PRODUCTION
2008 12000
2009 10000
2010 10600
2011 15000
2012 14500
Reema wants to calculate the average production of the years 2008-2012. Help her select
the correct SQL command for it: [CBSE SQP]
Que 43. Garvit wants to change the default value of DISCOUNT in the CUSTOMER table
from 10 to 15. Select the most appropriate command to do the same from the following
options: [CBSE SQP]
Que 44. Consider a table: COACHING having fields CITY_NAME, ENROLMENTS. Shikhar
wants to display the data of the above table in ascending order of enrolments. Choose the
correct query/queries from the following: [CBSE SQP]
Que 45. Geeta wants to know the usage of NULL in MySQL. Help her choose in which of
the following case NULL value cannot be assigned to the column Admission_Number:
[CBSE SQP]
Que 46. Which of the following is NOT an advantage of DBMS approach ? [CBSE SQP]
a. All the data is stored at one place. There is no repetition of the same data.
b. There is a single copy of data that is accessed or updated by all the users.
c. The DBA can provide security to the database by controlling users’ database access rights.
Answer: d. Designing the database specifications and writing application programs is a time-
consuming process.
Que 47. An attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of
datatype char(20) has value ”Meenakshi”. How many characters are occupied in attribute A
and attribute B? [CBSE SQP]
a. 20, 6
b. 6, 20
c. 9, 6
d. 6, 9
Answer: b. 6,20
ID Salary Dept
Q101 54000 10
Q103 67000 20
Q105 75000 20
Q109 NULL 30
Que 49. Cardinality of a table is four and degree is three. If two columns and four rows are
added to the table what will be the new degree and cardinality of the given table: [CBSE
SQP]
a. 5,8
b. 3,4
c. 8,5
d. 4,3
Answer: a. 5,8
1 Greesha Science 10
2 Satish Commerce 30
3 Teena NULL 20
4 Yasmine Humanities 10
5 Yashika Science 10
5 Lalit Humanities 20
Reema wants to display names of those students who have not been assigned any stream.
Help her select the correct query:
Que 51. Consider the table SCORE in Q50. Select the correct query from the options given
below to display the names of all streams only once.[CBSE SQP]
Table – STORE
Table – OWNER
OwnerId OwnerName
Choose the correct query to display the number of employees present in Delhi and
Mumbai. [CBSE SQP]
ii. Select SUM(noofemployee), Location from STORE group by location WHERE location in
(“Delhi”,”Mumbai”);
iii. Select SUM(noofemployee), Location from STORE group by location HAVING location =“Delhi”
and location=”Mumbai”;
iv. Select SUM(noofemployee), Location from STORE group by location WHERE location =“Delhi”
or location=”Mumbai”;
a. Both i and ii
Que 53. Consider the table STORE given in above question (52). Choose the correct
query to display Stores names, Location and Date of Opening of stores that were opened
before 2015. [CBSE SQP]
Answer:
Que 54. Consider the table STORE given in Q52. Radhika wants to add a new column SALE
on type integer to the table. Choose the correct query for the same: [CBSE SQP]
Que 55. Consider the table STORE and OWNER given in Q52. Seema wants to display
StoreName and OwnerName of all stores in Mumbai. Help her select the correct query
from the options given below: [CBSE SQP]
Que 56. Consider the table STORE given in Q52. Radhika wants to display the following
output: [CBSE SQP]
S101 Libas 45
Que 57. Which of the following is true for self-referencing table? [CBSE SQP 2022]
(a) A foreign key constraint can reference columns within the same table.
Answer: (a) A foreign key constraint can reference columns within the same table.
Que 58. Identify the operator that performs pattern searching in MYSQL. [CBSE SQP 2022]
Que 59. Name two domains where database management may be used. [CBSE SQP 2022]
Answer: Railway Reservation, Banking System, Store Management, Education System etc.
Que 60. List any two advantages of DBMS. [CBSE SQP 2022]
Que 61. While entering the data in the table, Seema is not able to leave the column age as
blank in the table. What can be the possible reason? [CBSE SQP 2022]
Answer: Because she has set NOT NULL constraint in age column.
Que 62. Which of the following queries will give the same output: [CBSE SQP 2022]
(b) SELECT ROLLNO, NAME FROM STUDENT WHERE SUBJECT BETWEEN ‘INFORMATION
TECHNOLOGY’ AND ‘INFORMATICS PRACTICES’;
Que 63. In the table teacher, Riya doesn’t want repeated values in column marks. Rewrite
the correct command. [CBSE SQP 2022]
OR
Que 64. Rema wants to input the price of shoes as 999.99. What should be the datatype and
size of the column price in the table? [CBSE SQP 2022]
Que 65. What is the MYSQL command to list the names of teachers in alphabetical order in
the teacher table? [CBSE SQP 2022]
Que 66. Write the command to see the structure of a table? [CBSE SQP 2022]
Que 67. The following commands are giving errors. Write the correct MYSQL commands.
Que 68. Ms Prabha has mistakenly entered ‘‘AMIT’’ instead of ‘‘AMITA’’ in name field of table
‘TEACHER’. Help her to write the correct SQL command to make the desired changes in
the table. [CBSE SQP 2022]
Que 69. Give any two characteristics of a relational model. [CBSE SQP 2022]
Que 70. Which aggregate function is used to find the average of all the values for a
selected attribute of a table. [CBSE SQP 2022]
Answer: AVG()
Que 71. Write the Mysql commands for the following queries :- [CBSE SQP 2022]
TABLE – TRAIN
TrainID Station
0001 DELHI
0002 MUMBAI
TABLE – COUNTER
(b) To find the total ticket amount collected from each station.
Related Posts
educational aids free of cost, study CBSE Question Bank 2023-24 Class 10
material, sample papers and so many CBSE Question Bank 2023-24 Class 12 Contact Info
other things also.
CBSE Question Bank 2023-24 (KVS Raipur)
Our only moto to help the students CBSE Question Bank 2023-24 (KVS Raipur) Phone
without any trouble or cost.
CBSE Question Bank 2023-24 (KVS Hyd) +91 8221909045
Follow Us [email protected]
COPYRIGHT © 2023 MYCSTUTORIAL- THE PATH TO SUCCESS IN EXAM POWERED BY ANJEEV SINGH