12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 03/02/2021
12th Standard Computer Science English Medium Structured Query Language Reduced Syllabus Important Questions 2021
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
The command to delete all the rows in the table is
DELETE ALL FROM tablename
DELETE tablename
DELETE * FROM tablename
DELETE * FROM tablename ALL
2.
How many types of database integrity constraints are there?
4
5
3
Multiple
3.
Which SQL TCL command save a transaction temporarily
Commit
Roll back
Save point
None of these
4.
The SQL DQL command used to display all the records from the table is
Select
display
Show
Select all
5.
Which of the following is not a SQL DDL commands?
Alter
Drop
Grant
Truncate
6.
Which component provides a self definitions to specify storage structure used by the database system?
DML
DQL
DDL
TCL
7.
DCL stands for
Dynamic Control Language
Data Communication Language
Data Control Language
Dynamic Data Control Language
8.
Which component of SQL includes commands to insert, delete and modify tables in database?
DCL
TCL
DDL
DML
9.
The data in RDBMS, is stored in database objects called
Queries
Languages
Relations
Tables
10.
Latest SQL standard as of now is
SQL 2008
SQL 2009
SQL 2018
SQL 2.0
11.
SQL originally called as
DBMS
RDBMS
SQL
SQLITE
12.
SQL stands for
Standard Query Language
Secondary Query Language
Structural Query Language
Standard Question Language
13.
Which of the following language was designed for managing and accessing data in RDBMS?
DBMS
DDL
DML
SQL
14.
The clause used to sort data in a database
SORT BY
ORDER BY
GROUP BY
SELECT
15.
Which commands provide definitions for creating table structure, deleting relations, and modifying relation schemas.
DDL
DML
DCL
DQL
16.
How will you retain duplicate rows while displaying the table?
17.
Write the syntax of creating table with constraint.
18.
Explain the following SQL TCL commands.
(i) Commit
(ii) Roll back
(iii) Save point
19.
What are two basic types of DML.
20.
What is the use of WAMP?
21.
Expand
(i) SQL
(ii) DBMS
(iii) RDBMS
22.
What is the difference between SQL and MYSQL?
23.
Write the difference between table constraint and column constraint?
24.
Differentiate Unique and Primary Key constraint
25.
Write a query that selects all students whose age is less than 18 in order wise.
26.
Write the different categories of SQL commands.
27.
How will you generate queries and retrieve data from the table? Explain?
28.
How will set a primary key for more than one field? Explain with example.
29.
List the data types used in SQL.
30.
Write the syntax for the following commands.
(i) INSERT
(ii) DELETE
(iii) UPDATE
31.
Write the function performed by DDL.
32.
How the data in RDBMs is stored? Explain.
33.
Write a SQL statement using DISTINCT keyword.
34.
Write any three DDL commands.
35.
What is a constraint? Write short note on Primary key constraint.
36.
Explain TCL commands in detail.
37.
Write a note on
(i) TRUNCATE command.
(ii) DROP TABLE command.
38.
Explain ALTER command in detail.
39.
Write the processing skills of SQL.
40.
Write a SQL statement to create a table for employee having any five fields and create a table constraint for the employee table.
41.
What are the components of SQL? Write the commands in each.
42.
1.
(c)
DELETE * FROM tablename
2.
(a)
4
3.
(c)
Save point
4.
(a)
Select
5.
(c)
Grant
6.
(c)
DDL
7.
(c)
Data Control Language
8.
(d)
DML
9.
(d)
Tables
10.
(a)
SQL 2008
11.
(c)
SQL
12.
(c)
Structural Query Language
13.
(d)
SQL
14.
(b)
ORDER BY
15.
(a)
DDL
16.
The ALL keyword retains duplicate rows. It will display every row of the table without considering duplicate entries
SELECT ALL Place FROM Student;
17.
The syntax for a table created with constraint is given as below
CREATE TABLE < table-name >
( < column namee-cdata type > [ < size > ]
< column constraint >,
( < column name > < data type > [ < size > ]
< column constraint >
< table constraint >( < column name >,
[ < column name > .... ]) .....
);
18.
(i) Commit: Saves any transaction into the database permanently.
(ii) Roll back: Restores the database to last commit state.
(iii) Save point: Temporarily save a transaction so that you can rollback.
19.
The DML is basically of two types:
(i) Procedural DML - Requires a user to specify what data is needed and how to get it.
(ii) Non-Procedural DML - Requires a user to specify what data is needed without specifying how to get it.
20.
WAMP stands for "Windows, Apache, MySQL and PHP" It is often used for web development and internal testing, but may be also be used to serve live websites.
21.
(i) SQL -Structured Query Language
(ii) DBMS-Database Management System
(iii) RDBM - Relational Database Management System
22.
| SQL | MYSQL |
| Structured Query Language is a language used for accessing database | MySQL is a database | accessing databases. management system, like SQL Server, Oracle, Informix,postgres,etc. |
| SQL is a DBMS | MySQL is a RDBMS |
23.
| Table Constraints | column constraints |
| Table constraint is apply to a group of one or more columns. | Column constraint can be apply only to individual columns. |
24.
| S.No | Unique Key Constraint | Primary Key Constraint |
|---|---|---|
| (i) | This constraint ensures that no two rows have the same value in the specified columns. | This constraint declares a field as a Primary Key which helps to uniquely identify a record. |
| (ii) | The UNIQUE constraint can be Create applied only to fields that have also been declared as NOT NULL. | The Primary Key does not allow NULL values. |
25.
SELECT * FROM Student WHERE Age <= 18 ORDER BY Name;
26.
(i) DDL - Data Definition Language
(ii) DML - Data Manipulation Language
(iii) DCL - Data Control Language
(iv) TCL - Transaction Control Language
(v) DQL - Data Query Language
27.
One of the most important tasks when working with SQL is to generate Queries and retrieve data. A Query is a command given to get a desired result from the database table. The SELECT command is used to query or retrieve data from a table in the database. It is used to retrieve a subset of records from one or more tables. The SELECT command can be used in various forms:
Syntax of SELECT command:
SELECT < column-list > FROM < table-name > ;
(i) Table-name is the name of the table from which the information is retrieved.
(ii) Column-list includes one or more columns from which data is retrieved.
28.
Table Constraint: When the constraint is applied to a group of fields of the table, it is known as Table constraint. The table constraint is normally given at the end of the table definition. Let us take a new table namely Student with the following fields Admno, Firstname, Lastname, Gender, Age, Place:
Create Table Student 1
(
Admno integer NOT NULL,
Firstname char(20),
Lastname char(20),
Gender char(1),
Age integer,
Place char(10),
PRIMARY KEY (Firstname, Lastname) ⟶ Table constraint
);
In the above example, the two fields, Firstname and Lastname are defined as Primary key which is a Table constraint.
29.
(i) char (Character)
(ii) varchar
(iii) dec (Decimal)
(iv) numeric
(v) int (Integer)
(vi) smallint
(vii) float
(viii) real
(ix) double
30.
(i) INSERT:
INSERT INTO <table-name>
[column-list] VALUES (values);
(ii) DELETE:
DELETE FROM table-name WHERE condition;
(iii) UPDATE:
UPDATE <table-name > SET column-name = value, column-name = value, ... WHERE condition;
31.
(i) It should identify the type of data division such as data item, segment, record and database file.
(ii) It gives a unique name to each data item type, record type, file type and data base.
(iii) It should specify the proper data type.
(iv) It should define the size of the data item.
(v) It may define the range of values that a data item may use.
(vi) It may specify privacy locks for preventing unauthorized data entry.
32.
(i) The data in RDBMS, is stored in database objects, called Tables. A table is a collection of related data entries and it consist of rows and columns.
(ii) A field is a column in a table that is designed to maintain specific related information about every record in the table. It is a vertical entity that contains all information associated with a specific field in a table. The fields in a student table may be of the type AdmnNo, StudName, StudAge, StudClass, Place etc
(iii) A Record is a row, which is a collection of related fields or columns that exist in a table. A record is a horizontal entity in a table which represents the details of a particular student in a student table
33.
(i) The DISTINCT keyword is used along with the SELECT command to eliminate duplicate rows in the table. This helps to eliminate redundant data.
(ii) For Example: SELECT DISTINCT Place FROM Student;
Will display the following data as follows:
Place
Chennai
Banglore
Delhi
34.
Data Definition Language:
(i) Create Command: To create tables in the database.
CREATE TABLE Student
(Admno integer,
Name char(20),
Gender char(1),
Age integer,
Place char(10),
);
(ii) Alter Command: The ALTER command is used to alter the table structure like adding a column, renaming the existing column, change the data type of any column or size of the column or delete the column from the table.
ALTER TABLE <table-name> ADD <column-name><data type><size>;
To add a new column "Address" of type 'char' to the Student table, the command is used as
ALTER TABLE Student ADD Address char;
(iii) Drop Command: The DROP TABLE command is used to remove a table from the database.
The table can be deleted by DROP TABLE command in the following way:
DROP TABLE table-name;
35.
Constraint:
Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database. Constraints could be either on a column level or a table level. Constraint is a condition applicable on a field or set of fields.
Primary key constraint:
(i) This constraint declares a field as a Primary key which helps to uniquely identify a record.
(ii) It is similar to unique constraint except that only one field of a table can be set as primary key.
(iii) The primary key does not allow NULL values.
36.
TCL commands:
(i) COMMIT command: The COMMIT command is used to permanently save any transaction to the database. When any DML commands like INSERT. UPDATE. DELETE commands are used. the changes made by these commands are not permanent. It is marked permanent only after the COMMIT command is given from the SQL prompt. Once the COMMIT command is given. the changes made cannot be rolled back. The COMMIT command is used as COMMIT;
(ii) ROLLBACK command:
The ROLLBACK command restores the database to the last committed. state. It is used with SAVEPOINT command to jump to a particular savepoint location. The syntax for the ROLLBACK command is: ROLLBACK TO save point name;
(iii) SAVEPOINT command:
The SAVEPOINT command is used to temporarily save a transaction so that you can rollback to the point whenever required. The different states of our table can be saved at anytime using different names and the rollback to that state can be done using the ROLLBACK command.
SAVEPOINT savepoint_name;
37.
(i) TRUNCATE command: The TRUNCATE command is used to delete all the rows from the table. the structure remains and the space is freed from the table. The syntax for TRUNCATE command is:
TRUNCATE TABLE table-name;
For example to delete all the records of the student table and delete the table the SQL statement is given as follows:
TRUNCATE TABLE Student;
The table Student is removed and the space is freed.
(ii) DROP TABLE command: The DROP TABLE command is used to remove a table from the database. If you drop a table. all the rows in the table is deleted and the table structure is removed from the database. Once a table is dropped we cannot get it back. so be careful while using DROP TABLE command. But there is a condition for dropping a table; it must be an empty table.
Remove all the rows of the table using DELETE command. The DELETE command is already explained.
To delete all rows, the command is given as;
DELETE * FROM Student;
Once all the rows are deleted. the table can be deleted by DROP TABLE command in the following way:
DROP TABLE table-name;
For example to delete the Student table:
DROP TABLE Student;
38.
ALTER Command:
(i) The ALTER command is used to alter the table structure like adding a column, renaming the existing column, change the data type of any column or size of the column or delete the column from the table. It is used in the following way:
(ii) ALTER TABLE <table-name>
(iii) To add a new column "Address" of type 'char' to the Student table, the command is used as
(iv) ALTER TABLE Student ADD Address char;
To modify, existing column of table, the ALTER TABLE command can be used with MODIFY clause like wise:
(v) ALTER < table-name > MODIFY < column-name > < data type > < size >;
ALTER TABLE Student MODIFY Address char (25);
(vi) The above command will modify the address column of the Student table to now hold 25 characters.
(vii) The ALTER command can be used to rename an existing column in the following way:
(viii) ALTER < table-name > RENAME old-column- name TO new-column-name;
(ix) For example to rename the column Address to City, the command is used as :
(x) ALTER TABLE Student RENAME Address TO City;
(xi) The ALTER command can also be used to remove a column or all columns. for example to remove a particular column, the DROP COLUMN is used with the ALTER TABLE to remove a particular field, the command can be used as:
ALTER < table-name > DROP COLUMN < column-name >;
(xii) To remove the column City from the Student table, the command is used as :
ALTER TABLE Student DROP COLUMN City;
39.
The various processing skills of SQL are:
(i) Data Definition Language (DDL): The SQL DDL provides commands for defining relation schemas (structure), deleting relations, creating indexes and modifying relation schemas.
(ii) Data Manipulation Language (DML): The SQL DML includes commands to insert, delete, and modify tuples in the database.
(iii) Embedded Data Manipulation Language: The embedded form of SQL is used in high level programming languages.
(iv) View Definition: The SQL also includes commands for defining views of tables.
(v) Authorization: The SQL includes commands for access rights to relations and views of tables.
(vi) Integrity: The SQL provides forms for integrity checking using condition.
(vii) Transaction control: The SQL includes commands for file transactions and control over transaction processing.
40.
Table constraint:
Table constraint apply to a group of one or more columns. The Syntax tor a table created with Constraint is given as below:
CREATE TABLE <table_name>
(<column name> <datatype>[<size>]
<column constraint>,
(<column name> <data type> [<size>]
<column constraint).....
<table constraint>(<column name>, [<column name>..........])............);
Following is an example for employee table with "NOT NULL' column constraint. This constraint enforces a field to always contain a value.
CREATE TABLE employee (No int NOT NULL PRIMARY KEY,
NAME varchar(50), Age int (10), Address varchar(50)
PhoneNo int(10), Pincode int (6) PRIMARY KEY (NAME, PhoneNo);
The above command creates a table "employee" in which the field No of integer type is defined NOT NULL, which means this field must have values. The field NAME is of char type. The fields NAME, PhoneNo, have table constraint.
41.
SQL commands are divided into five categories:
Data Definition Language:
(i) The Data Definition Language (DDL) consist of SQL statements used to define the database structure or schema.
(ii) It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in databases.
(iii) The DDL provides a set of definitions to specify the storage structure and access methods used by the database system.
DDL performs the following functions:
(i) It should identify the type of data division such as data item, segment, record and database file.
(ii) It gives a unique name to each data item type, record type, file type and data base.
(iii) It should specify the proper data type.
(iv) It should define the size of the data item.
(v) It may define the range of values that a data item may use.
(vi) It may specify privacy locks for preventing unauthorized data entry.
Commands:
| CREATE | To create tables in the database. |
| ALTER | Alters the structure of the database |
| DROP | Data tables from database. |
| TRUNCATE | Remove all records from a table, also release the space occupied bv those records. |
Data Manipulation Language:
This is a computer programming language used for adding, removing and modifying data in a database. This language comprises the SQL-data change statements, which modify stored data but not the schema of the database table
Data Manipulation includes
(i) Insertion of new information into the database
(ii) Retrieval of information stored in a database
(iii) Deletion of information from the database.
(iv) Modification of data stored in the database
The DML is basically of two types:
Procedural DML - Requires a user to specify what data is needed and how to get it.
Non-Procedural DML - Requires a user to specify what data is needed without Specifying how to get it.
Commands:
| INSERT | Inserts data into a table |
| UPDATE | Updates the existing data within a table |
| DELETE | Deletes all records from a table, but not the space occupied by them. |
Data Control Language:
(i) A Data Control Language (DCL) is a programming language used to control the access of data stored in a database. It is used for controlling privileges in the database (Authorization).
(ii) The privileges are required for performing all the database operations such as creating sequences, views of tables etc.
Commands:
| GRANT | Grants permission to one or more users to perform specific tasks. |
| REVOKE | Withdraws the access permission given by the GRANT statement. |
Transactional Control Language:
Transactional control language (TCL) commands are used to manage transactions in the database. These are used to manage the changes made to the data in a table by DML statements.
Commands:
| COMMIT | Saves any transaction into the database permanently. |
| ROLL BACK | Restores the database to last commit state. |
| SAVE POINT | Temporarily save a transaction so that you can rollback. |
Data query language:
The Data Query Language consist of commands used to query or retrieve data from a database. One such SQL command in Data Query Language is
| SELECT | It displays the records from the table. |
42.
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards