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: 31/10/2019
Structured Query Language (SQL)
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 specific related information about every record in the table is maintained by
language
relation
tuple
field
2.
Which of the following language was designed for managing and accessing data in RDBMS?
DBMS
DDL
DML
SQL
3.
The clause used to sort data in a database
SORT BY
ORDER BY
GROUP BY
SELECT
4.
Which command lets to change the structure of the table?
SELECT
ORDER BY
MODIFY
ALTER
5.
Which commands provide definitions for creating table structure, deleting relations, and modifying relation schemas.
DDL
DML
DCL
DQL
6.
Write the syntax of creating table in database.
7.
Define TCL.
8.
What is the use of WAMP?
9.
What is RDBMS?
10.
What is SQL?
11.
What is the difference between SQL and MYSQL?
12.
Write the difference between table constraint and column constraint?
13.
Differentiate Unique and Primary Key constraint
14.
List the data types used in SQL.
15.
Write the use of Savepoint command with an example.
16.
Write any three DDL commands.
17.
Write a SQL statement to create a table for employee having any five fields and create a table constraint for the employee table.
18.
What are the components of SQL? Write the commands in each.
1.
(d)
field
2.
(d)
SQL
3.
(b)
ORDER BY
4.
(d)
ALTER
5.
(a)
DDL
6.
The syntax of CREATE TABLE command is :
CREATE TABLE < table-name >
( < column name > < data type > [ < size > ]
( < column name > < data type> [ < size > ] ..........
);
7.
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.
8.
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.
9.
RDBMS is a type of DBMS with a row-based table structure that connects related data elements and includes functions related to Create, Read, Update and Delete operations, collectively known as CRUD.
10.
(i) The Structured Query Language (SQL) is a standard programming language to access and manipulate databases.
(ii) SQL allows the user to create, retrieve, alter, and transfer information among databases.
(iii) It is a language designed for managing and accessing data in a Relational Data Base Management System (RDBMS).
11.
| 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 |
12.
| 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. |
13.
| 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. |
14.
(i) char (Character)
(ii) varchar
(iii) dec (Decimal)
(iv) numeric
(v) int (Integer)
(vi) smallint
(vii) float
(viii) real
(ix) double
15.
(i) The SAVEPOINT command is used to temporarily save a transaction so that you can rollback to the point whenever required.
(ii) The different states of our table can be saved at any time using different names and the rollback to that state can be done using the ROLLBACK command.
(iii) SAVEPOINT savepoint_name:
UPDATE student SET Name = 'Mini' WHERE Admno=105;
SAVEPOINT A;
16.
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;
17.
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.
18.
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. |
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