{"id":1023,"date":"2021-07-12T23:11:54","date_gmt":"2021-07-12T17:41:54","guid":{"rendered":"https:\/\/cbsepython.in\/?p=1023"},"modified":"2023-12-28T09:43:13","modified_gmt":"2023-12-28T04:13:13","slug":"database-questions-for-class-12","status":"publish","type":"post","link":"https:\/\/cbsepython.in\/database-questions-for-class-12\/","title":{"rendered":"100+ Important Database questions for class 12"},"content":{"rendered":"<h2><span style=\"color: #000000;\">Important Database questions for Class 12<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>1. What is database?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Database is a collection of interrelated data.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>2. What is database system?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A combination of computer based record keeping system and database .<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>3. What is Database Management Systems (DBMS)?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A Database Management System (DBMS) is software designed to store, retrieve, define, and manage data in a database.\u00a0Examples: Ms-Access, MySQL, Microsoft SQL Server, Oracle etc.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>4. What is relational data model?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A\u00a0relational data model\u00a0involves the use of\u00a0data\u00a0tables that collect groups of elements into relations. These\u00a0models\u00a0work based on the idea that each table setup will include a primary key or identifier.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>5. What do you mean by Base Table?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A table having an independent existence , represented in storage by a distinct stored file.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>6. What is data redundancy?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Duplication of data.<\/span><\/p>\n<p><span style=\"color: #000000;\"><em>Data redundancy<\/em>\u00a0arises when the same data piece is stored in two or more separate places, either by accident or intentionally.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>7.\u00a0 What is view in database?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A virtual table derived from one or more underlying base tables.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>8. What is relation in database?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Data arranged in the form of rows and columns and having certain properties.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>9. What do you mean by domain in database?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A pool of values from which the actual values appearing in a given column are drawn.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>10. What is attribute in a relation?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A column of a relation. It may also refer as field.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">Also Read:<\/span> <a href=\"https:\/\/cbsepython.in\/introduction-to-database-concept-class-12-notes\/\">Introduction to Database Concept Class 12 Notes<\/a><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>11. What is tuple in a relation?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A row of a relation. Also known as record.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>12.\u00a0 Define a Key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A\u00a0key in DBMS\u00a0is an attribute or a set of attributes that help to uniquely identify a tuple (or row) in a relation (or table).<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">Database concepts for class 12<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>13. What is Primary Key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A\u00a0<em>primary key<\/em>, also called a primary keyword, is a key in a relational database that is unique for each record. It is a unique identifier.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>14. What is Candidate Key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A Candidate Key is a set of attributes that uniquely identify tuples in a table that can serve as primary key also.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>15. What is Alternate Key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A candidate key, which is not primary key.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>16. What is Foreign Key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A Foreign Key is a field (or collection of fields) in one table, that refers to the Primary Key\u00a0in another table.<\/span><\/p>\n<p><span style=\"color: #000000;\">The table with the foreign key is called the child table, and the table with the primary key is called the referenced or parent table.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>17. What is Degree?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Number of attributes (columns) in a table\/relation is known as degree of that relation.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>18. What is Cardinality?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Number of tuples (rows) in a table\/relation is known as cardinality of that relation.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #000000;\">One word Important Database questions for Class 12<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>19. Name the command\/clause which is used to display the records in ascending or descending order. <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Order by clause<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"color: #000000;\">20. Give example of any two DML commands.<\/strong><\/p>\n<p><span style=\"color: #000000;\">Insert, Delete<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>21. What is the purpose of SQL? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">SQL is structured query language. It is a standard language of all the RDBMS<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>22. What is primary key?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">A field which is unique for each and every record in table is called primary key.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>23. Which command is used to display a list of already existing tables? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Show tables;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>24. Which command is used to change the structure of table? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Alter<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"color: #000000;\">25. Which command is used to change the data of the table?<\/strong><\/p>\n<p><span style=\"color: #000000;\">Update<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>26. Which command is used to delete data of the table? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Delete<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>27. Which command delete the structure of table? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Drop<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>28. Which clause is used with aggregate functions? (Group by\/ Where)<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Group by<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>29. What do you mean by candidate key? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Those fields which can act as primary key is called candidate key<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"color: #000000;\">30. Correct the error in the following query. <\/strong><\/p>\n<p><strong style=\"color: #000000;\">Select * from RECORD where Rname = %math%;<\/strong><\/p>\n<p><span style=\"color: #000000;\">Correct Query: Select * from RECORD where Rname like %math%;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>31. What is max () function in SQL? <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">It returns the largest value from a particular column.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>32. What do you mean by degree and cardinality of table?<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Number of columns in table is called degree. Number of rows in a table is called cardinality.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>33. Expand DDL and DML <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">DDL \u2013 Data Definition Language<\/span><\/p>\n<p><span style=\"color: #000000;\">DML \u2013 Data Manipulation Language<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>34. Which command is used to increase the salary of workers in table salary? (Update \/ Alter) <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Update<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>35. Name the command used to see the structure of table. <\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Desc<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">36. Which aggregate function is used to find sum of column in a table?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">sum()<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">37. What is the difference between having and where clause?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Having clause can be used with group by clause while where clause can be used without group by clause.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">38. Name an aggregate function in SQL which return the average of numeric values.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Avg ( )<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">39. What is the use of \u201clike\u201d in SQL?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">\u201cLike\u201d operator is used to match a particular pattern in a particular column in SQL.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">40. Correct the following statement: <\/span><\/strong><span style=\"color: #000000;\">Delete table data;<\/span><\/p>\n<p><span style=\"color: #000000;\">Delete from data<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">41. What do you mean by aggregate function?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">A function which perform calculation on multiple values and return single value<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">42. Write two wild card characters which are used with like operator?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">% and underscore( _ )<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">43. Duplication of record is called ____________<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Redundancy<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">44. What is the difference between char and varchar?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Char is fixed length data type and varchar is variable length data type<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #000000;\">Important Database questions for Class 12<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">45. What is the difference between cardinality and degree?.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Degree &#8211; The number of attributes or columns in a relation is called the Degree of the relation.<\/span><\/p>\n<p><span style=\"color: #000000;\">Cardinality &#8211; The number of tuples\/ rows in a relation is called the Cardinality of the relation.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">46. Differentiate between WHERE and HAVING clause.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">WHERE clause is used to select particular rows that satisfy a condition, whereas HAVING clause is used in connection with the aggregate function, GROUP BY clause<\/span><\/p>\n<p><span style=\"color: #000000;\">For ex. \u2013 select * from student where marks &gt; 75;<\/span><\/p>\n<p><span style=\"color: #000000;\">This statement shall display the records for all the students who have scored more than 75 marks.<\/span><\/p>\n<p><span style=\"color: #000000;\">On the contrary, the statement \u2013 select * from student group by stream having marks &gt; 75; shall display the records of all the students grouped together on the basis of stream but only for those students who have scored marks more than 75.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">47. Define Primary Key of a relation in SQL. Give an Example using a dummy table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Primary Key- one or more attribute of a relation used to uniquely identify each and every tuple in the relation. For Example : In the below Table Student, RollNo can be the Primary Key<\/span><\/p>\n<p><span style=\"color: #000000;\">RollNo Name Marks<\/span><\/p>\n<p><span style=\"color: #000000;\">1 Pratham 75<\/span><\/p>\n<p><span style=\"color: #000000;\">2 Srishti 80<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">48. Consider the following Python code is written to access the record of CODE passed <\/span><span style=\"color: #000000;\">to function: Complete the missing statements:<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">def Search(eno):<\/span><\/p>\n<p><span style=\"color: #000000;\">#Assume basic setup import, connection and cursor is created<\/span><\/p>\n<p><span style=\"color: #000000;\">query=&#8221;select * from emp where empno=________&#8221;.format(eno)<\/span><\/p>\n<p><span style=\"color: #000000;\">mycursor.execute(query)<\/span><\/p>\n<p><span style=\"color: #000000;\">results = mycursor._________<\/span><\/p>\n<p><span style=\"color: #000000;\">print(results)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">{ } and fetchone()<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">49. Differentiate between DDL and DML with one Example each.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">DDL- Data definition language. Consists of commands used to modify the metadata of a <\/span><span style=\"color: #000000;\">table. For Example- create table, alter table, drop table<\/span><\/p>\n<p><span style=\"color: #000000;\">DML-Data manipulation language. Consist of commands used to modify the data of a table. <\/span><span style=\"color: #000000;\">For Example- insert, delete, update<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">50. Name the package for connecting Python with MySQL database.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">import mysql.connector<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">Also Check:<\/span><\/h2>\n<h2 style=\"text-align: left;\"><a href=\"https:\/\/cbsepython.in\/important-computer-network-class-12-question-answer\/\"><span style=\"text-decoration: underline;\">Computer Networking Question and Answer<\/span><\/a><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<h2 style=\"text-align: left;\"><span style=\"text-decoration: underline;\"><a href=\"https:\/\/cbsepython.in\/important-question-answer-class-12-computer-science\/\">Important Question Answer for Term 2 Exam<\/a><\/span><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<h2 style=\"text-align: left;\"><span style=\"text-decoration: underline;\"><a href=\"https:\/\/cbsepython.in\/computer-science-sample-paper-class-12\/\">Solved Computer Science Term 2 Sample Papers\u00a0<\/a><\/span><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">51. What is the purpose of cursor object?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">It is the object that helps to execute the SQL queries and facilitate row by row processing of records in the resultset.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">52. What do you mean by domain of an attribute in DBMS? Explain with an example.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Domain of an attribute is the set of values from which a value may come in a column. E.g. Domain of section field may be (A,B,C,D).<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">53. Differentiate between fetchone() and fetchmany() methods with suitable examples.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">fetchone() is used to retrieve one record at a time but fetchmany(n) will fetch n records at a time from the table in the form of a tuple.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">54. What is Constraint ? Give example of any two constraints.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Constraints are the checking condition which we apply on table to ensure the correctness of data . Example primary key, not null, default, unique etc<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">55. Write the steps to perform an Insert query in database connectivity application.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Table \u2018student\u2019 values are rollno, name, age (10,\u2019Ashok\u2019,26)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">import mysql.connector as mydb<\/span><\/p>\n<p><span style=\"color: #000000;\">conn= mydb.connect(host=\u201dlocalhost\u201d, user=\u201droot\u201d, passwd=\u201d1234\u201d)<\/span><\/p>\n<p><span style=\"color: #000000;\">cur=conn.cursor()<\/span><\/p>\n<p><span style=\"color: #000000;\">cur.execute(\u201cINSERT INTO student values(10,\u2019Ashok\u2019,26);\u201d)<\/span><\/p>\n<p><span style=\"color: #000000;\">cur.commit()<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">56. Define Candidate Key and Alternate Key with suitable examples from a table containing some meaningful data.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">A table may have more than one such attribute\/group of attributes that identifies a tuple<\/span><\/p>\n<p><span style=\"color: #000000;\">uniquely, all such attribute(s) are known as Candidate Keys. All the candidate key except primary key are called Alternate key.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">Table: Employee (empno, aadhar_no, voter_id, ename, deptno, sal, city)<\/span><\/p>\n<p><span style=\"color: #000000;\">In the above table Employee, empno,aadhar_no, voter_id all are candidate key If we define empno as primary key then remaining candidate keys will be alternate key.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">57. Define RDBMS. Name any two RDBMS software.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">RDBMS stands for Relational Database Management System. It is a program that offers commands to create, update, and manage the data with multiple tables. Examples of RDBMS are 1. MySQL 2. Oracle 3. Microsoft SQL Server.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">58. What is the purpose of the ORDER BY clauses in a select statement?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\"><strong>Order By :<\/strong> This clause is used to arrange the records in ascending or descending order. for example Select * from book order by price;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">59. What is the purpose of the HAVING clauses in a select statement?<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">HAVING Clause in SQL is used to specify conditions on the rows with GROUP BY clause. for example Select sum(price) from book group by (subject) having price &gt; 100;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">60. Write any two differences between Single_row functions and Aggregate functions.<\/span><\/strong><\/p>\n<p><strong><span style=\"color: #000000;\">Single row Functions Multiple row functions :<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">It operates on a single row at a time.<\/span><\/p>\n<p><span style=\"color: #000000;\">It returns one result per row<\/span><\/p>\n<p><span style=\"color: #000000;\">It can be used in Select, Where, and Order by clause.<\/span><\/p>\n<p><span style=\"color: #000000;\">Math, String and Date functions are examples of single row functions.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">Aggregate Functions:<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">It operates on multiple rows.<\/span><\/p>\n<p><span style=\"color: #000000;\">It returns one result for multiple rows.<\/span><\/p>\n<p><span style=\"color: #000000;\">It can be used in the select clause only.<\/span><\/p>\n<p><span style=\"color: #000000;\">\u00a0Max(), Min(), Avg(), Sum(), Count() and Count(*) are examples of multiple row functions.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #000000;\">Fill in the blanks<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">61. SQL stands for _______ Query Language.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Structured<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">62. A connectivity package such as _______ must be imported before writing database connectivity Python code.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Mysql.connector<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">63. The SQL keyword_______ is used to specify the table(s) that contains the data to be retrieved.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">FROM<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">64. To remove duplicate rows from the result of a query, specify the SQL qualifier________ in select list.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">DISTINCT<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">65. To obtain all columns, use a(n) _________ instead of listing all the column names in the select list.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Asterisk (*)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">66. The SQL _______ clause contains the condition that specifies which rows are to the selected.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">WHERE<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">67. To sort the rows of the result table, the _________ ________ clause is specified.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">ORDER BY<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">68. Columns can be sorted in descending sequence by using the SQL keyword ____________<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">DESC<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">69. When two conditions must both be true for the rows to be selected, the conditions are separated by the SQL keyword ________<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">AND<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">70. To refer to a set of values needed for a condition, we can use the SQL operation __________<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">IN<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">71. To exclude one or more values (a list of values) using a condition, the SQL keyword ________ ________ should be used.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">NOT IN<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">72. The SQL keyword _______ is used in SQL expressions to select based on patterns<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">LIKE<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">73. The SQL built-in function ________ totals values in numeric columns.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">SUM<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">74. The SQL built-in function _________ obtains the largest value in a numeric column.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">MAX<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">75. The SQL built-in function _________ obtains the smallest value in a numeric column.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">MIN<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">76. The SQL built-in function __________ computes the number of rows in a table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">COUNT<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">77. The SELECT clause _________ is used to collect those rows that have the same value in a specified column.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">GROUP BY<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">78. ______________ method returns the result set in the form of tuples containing the records or rows returned by the sql table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Fetchall()<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">79. A session between the application program and the database is called______________<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Connection<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">80. A __________ query is used to check if data has been added to the table or not.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Select<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">81. The ______________ function works with data of multiple rows at a time and returns aggregated value.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Group\/row\/ aggregation function<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">82. The _____ clause lets you arrange the result set in the order of single column, multiple column and custom sort order too.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">ORDER BY<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">83. To specify filtering condition for groups, the _____________ clause is used in MYSQL.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Having<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">84. By default, the ORDER BY clauses sorts the result set in the ________ order.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Ascending<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">85. To sort the result set in descending order, ___________ keyword is used with ORDER BY.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">DESC<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">True\/False Questions<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">86. The condition in a WHERE clause in a SELECT query can refer to only one value<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">\u00a0False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">87. SQL provides the AS keyword, which can be used to assign meaningful column names to the results of queries using the SQL built-in functions.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">88. The rows of the result relation produced by a SELECT statement can be sorted but only by one column.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">89. SQL is a programming language.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">90. SELECT DISTINCT is used if a user wishes to see duplicate columns in a query.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">91. The HAVING clause acts like a WHERE clause, but it identifies groups that meet a criterion, rather than rows.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">92. The qualifier DISTINCT must be used in an SQL statement when we want to Eliminate duplicate rows.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">93. DISTINCT and its counterpart, ALL, can be used more than once in a SELECT statement.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">94. DISTINCT and its counterpart, ALL, can be used together on single field in a SELECT statement.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">95. SUM, AVG, MIN and MAX can only be used with numeric columns.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">96. The SQL statement: SELECT salary + Comm AS Total FROM Emp; adds two fields salary and comm from each row together and lists the results in a column named Total.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">97. ORDER BY can be combined with the SELECT statement.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">98. Data manipulation language (DML) commands are used to define a database, including creating, altering, and dropping tables and establishing constraints.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">99. The keyword LIKE can be used in a WHERE clause to refer to a range of values.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">100. The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">101. The keyword BETWEEN can be used in a WHERE clause to refer to a range of values.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">102. Read operation on any table means to fetch some useful information from the table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">103. Use fetchall() method to retrieve only one value from a database table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">104. Row count is a read-only attribute.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">105. To disconnect database connection, use connect () method.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">106. Update statement is used to insert data into the table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">107. The ORDER BY clause combines all those records that have identical values in a particular field or a group of fields.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">108. The WHERE clause is used to specify filtering conditions for groups.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">109. DISTINCT option causes a group function to consider only the unique values of the argument expression.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">110. By default, ORDER BY clause sorts the result set in descending order.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">111. COUNT () function ignores duplicate and null values while counting the records.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">112. The return value of MAX () function is a numeric value.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">True<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">113. Multiple row function is also known as scalar function<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">114. SUM () function is used to count the total number of records in a table.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #000000;\">115. Argument type of AVG () function can be numeric or string data type.<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">False<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">Also Check:<\/span><\/h2>\n<h2 style=\"text-align: left;\"><a href=\"https:\/\/cbsepython.in\/important-computer-network-class-12-question-answer\/\"><span style=\"text-decoration: underline;\">Computer Networking Question and Answer<\/span><\/a><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<h2 style=\"text-align: left;\"><span style=\"text-decoration: underline;\"><a href=\"https:\/\/cbsepython.in\/important-question-answer-class-12-computer-science\/\">Important Question Answer for Term 2 Exam<\/a><\/span><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<h2 style=\"text-align: left;\"><span style=\"text-decoration: underline;\"><a href=\"https:\/\/cbsepython.in\/computer-science-sample-paper-class-12\/\">Solved Computer Science Term 2 Sample Papers\u00a0<\/a><\/span><\/h2>\n<h2 style=\"text-align: left;\"><\/h2>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important Database questions for Class 12 &nbsp; 1. What is database? Database is a collection of interrelated data. &nbsp; 2. What is database system? A combination of computer based record keeping system and database . &nbsp; 3. What is Database Management Systems (DBMS)? A Database Management System (DBMS) is software designed to store, retrieve, define, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,20],"tags":[],"class_list":["post-1023","post","type-post","status-publish","format-standard","hentry","category-database-mysql","category-cbse-computer-science-with-python-class-12"],"_links":{"self":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/1023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/comments?post=1023"}],"version-history":[{"count":0,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/1023\/revisions"}],"wp:attachment":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/media?parent=1023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/categories?post=1023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/tags?post=1023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}