Class 10 Computer Science Chapter 3 Database

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

Join Telegram channel

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

COMPUTER SCIENCE

TEXTUAL QUESTIONS AND ANSWERS

EXERCISE

I. MULTIPLE CHOICE QUESTIONS: 

1. The command used to modify the contents of a table is:

(1) ALTER TABLE

(2) SELECT

(3) UPDATE

Ans. (3) UPDATE.

2. The command used to display the table structure is:

(1) DISPLAY

(2) STRUCTURE

(3) DESCRIBE

Ans. (3) DESCRIBE.

3. A table name should begin with: 

(1) Number

(2) Alphabet

(3) Symbol

Ans.(2) Alphabet.

4. The command used to delete the database physically:

(1) DELETE

(2) ERASE

(3) DROP

Ans. (3) DROP.

5. The wildcard character allows finding a match for any string of any length, including zero length.

(1) * 

(2) % 

(3) #

Ans. (2) %

6. This operator displays only those records that do not satisfy the specified condition.

(1) AND

(2) OR

(3) NOT

Ans. (3) NOT.

II. FILL IN THE BLANKS: 

1. MySQL is named after co-founder Michael Widenius’s daughter, ____.

Ans. My.

2. The number of rows denotes the ____ of the table.

Ans. Cardinality.

3. The number of ___ denotes the Degree of the table.

Ans. Columns.

4. _____ words are not allowed in a table name.

Ans. Reserved.

5. A MySQL statement is terminated by a ___.

Ans. Semi-colon.

6. The underscore wildcard allows finding a match for any ____ character.

Ans. Single.

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 – 

DESCRIBE table_name;

or

SHOW COLUMNS FROM table_name;

For example, if the table name is student, then the query is – 

DESCRIBE student ;

Or 

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 – 

OperatorMeaningExample
+AdditionA + B
SubtractionA – B
/DivisionA / B
*MultiplicationA * B
%Modulus or remainderA % 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 –

OperatorMeaningExample
=Equal toA = B
<> Or !=Not equal toA != B
<Less thanA > B
>Greater thanA < B
<=Less than or equal toA <= B
>=Greater than or equal toA >= 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:

  • CREATE
  • ALTER
  • DROP
  • TRUNCATE.

(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:

  • INSERT
  • UPDATE
  • DELETE.

(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:

  • GRANT
  • REVOKE

(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:

  • COMMIT
  • ROLLBACL
  • SAVEPOINT.

(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:

  • SELECT
  • SHOW
  • HELP.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top