Class 10 Computer Science Chapter 3 Database Question Answer, SEBA Class 10 Computer Science Solutions, NCERT Class 10 Computer Science Chapter 3 Database to each chapter is provided in the list so that you can easily browse throughout different chapters SCERT Class 10 Computer Science Chapter 3 Database and select needs one.
Class 10 Computer Science Chapter 3 Database
Also, you can read the SCERT book online in these sections Solutions by Expert Teachers as per SCERT (CBSE) Book guidelines. NCERT Solution of Class 10 Computer Science Chapter 3 Database is part of AHSEC All Subject Solutions. Here we have given Class 10 Computer Science Chapter 3 Database Notes for All Subjects, You can practice these here in Class 10 Computer Science.
DATABASE PART – II MYSQL
Chapter – 3
TEXTUAL QUESTIONS AND ANSWERS
I. MULTIPLE CHOICE QUESTIONS:
1. The command used to modify the contents of a table is:
(1) ALTER TABLE
Ans. (3) UPDATE.
2. The command used to display the table structure is:
Ans. (3) DESCRIBE.
3. A table name should begin with:
4. The command used to delete the database physically:
Ans. (3) DROP.
5. The wildcard character allows finding a match for any string of any length, including zero length.
Ans. (2) %
6. This operator displays only those records that do not satisfy the specified condition.
Ans. (3) NOT.
II. FILL IN THE BLANKS:
1. MySQL is named after co-founder Michael Widenius’s daughter, ____.
2. The number of rows denotes the ____ of the table.
3. The number of ___ denotes the Degree of the table.
4. _____ words are not allowed in a table name.
5. A MySQL statement is terminated by a ___.
6. The underscore wildcard allows finding a match for any ____ character.
III. ANSWER THE FOLLOWING QUESTIONS:
1. Who were the developers of MySQL?
Ans. The developers of the MySQL platform were Michael Widenius (Monty), David Axmark, and Allan Larsson.
2. Why is MySQL becoming so popular? Give two reasons.
Ans. MySQL is becoming popular because —
- Easy to use, has high performance, flexibility, security, maturity, and simple syntax
- It is compatible with many popular languages including PHP, PERL, C, C++, JAVA, etc.
3. What is a constraint? Name any two constraints.
Ans. In a database table, we can add rules to a column known as constraints. These rules control the data that can be stored in a column.
The constraints in MySQL are PRIMARY KEY, NOT NULL, etc.
4. Give example of DML commands.
Ans. Data Manipulation Language (DML) commands are used to modify the database. Some of the DML commands are —
SELECT, INSERT, UPDATE, DELETE etc.
5. What are the characteristics by which you can determine the data type of MySQL?
Ans. The data can be determined by the —
- Number of bytes it takes for storage.
- Kind of value it represents.
6. What is the query to display the table structure?
Ans. To display complete information about the table structure, the query is –
SHOW COLUMNS FROM table_name;
For example, if the table name is student, then the query is –
DESCRIBE student ;
DESC student ; .
7. What is the query to display all the records in a table?
Ans. To display all the records in a table, the query is –
SELECT * FROM table_name;
For example, if the table name is employee, then the query is –
SELECT * FROM employees;
8. List the Arithmetic Operators used in MySQL.
Ans. The Arithmetic Operators used in MySQL are –
|+||Addition||A + B|
|–||Subtraction||A – B|
|/||Division||A / B|
|*||Multiplication||A * B|
|%||Modulus or remainder||A % B|
9. List the Relational Operators used in MySQL.
Ans. Relational operators compare two expressions or values and return a Boolean result. The relational operators used in MySQL are –
|=||Equal to||A = B|
|<> Or !=||Not equal to||A != B|
|<||Less than||A > B|
|>||Greater than||A < B|
|<=||Less than or equal to||A <= B|
|>=||Greater than or equal to||A >= B|
10. Differentiate between COUNT (*) and COUNT.
Ans. COUNT(*) returns the count of all rows in the table, whereas COUNT() is used with Column_Name passed as an argument and counts the number of non-NULL values in a column.
11. What are the rules for naming a table in MySQL?
Ans. The rules for naming a table in MySQL are –
● Table names must be 32 characters or less
● A table name should begin with an alphabet.
● The special character (_) underscore is allowed.
● Reserved words are not allowed.
12. Explain the five categories of SQL commands.
Ans. SQL Commands are divided into five broad categories – DDL, DML, DCL, TCL, and DQL.
(1) DDL – Data Definition Language: – DDL refers to a set of SQL instructions for creating, modifying, and deleting database structures, but not data. A general user, who should be accessing the database through an application, should not execute these instructions.
Here are some commands that come under DDL:
(2) DML – Data Manipulation Language: – The SQL commands that deal with manipulating data in a database are classified as Data Manipulation Language, which covers the majority of SQL statements.
Here are some commands that come under DML:
(3) DCL – Data Control Language: – DCL commands are used to grant and take back authority from any database user.
Here are some commands that come under DCL:
(4) TCL – Transaction Control Language: – Transaction Control Language as the name suggests manages the issues and matters related to the transactions in any database. They are used to roll back or commit the changes in the database.
Here are some commands that come under TCL:
(5) DQL – Data Query Language: – Data Query Language (DQL) is used to fetch the data from the database:
Here are some commands that come under DQL: