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/12/2019
Structured Query Language
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.
Which of the following processing skills of SQL provides commands for defining relation schemes?
MySQL
DDL
DML
DCL
2.
Which of the following is a collection of data entries?
Database
Table
Dbase
SQL
3.
Which of the following is a standard programming language to access and manipulate database?
MySQL
SQL
PHP
Python
4.
The command to delete a table including the structure is
DROP
DELETE
DELETE ALL
ALTER TABLE
5.
Which command lets to change the structure of the table?
SELECT
ORDER BY
MODIFY
ALTER
6.
Define TCL.
7.
Define Data Manipulation Language.
8.
What is the use of WAMP?
9.
What is the difference between SQL and MYSQL?
10.
Write the difference between table constraint and column constraint?
11.
Write the different categories of SQL commands.
12.
How will you generate queries and retrieve data from the table? Explain?
13.
How will set a primary key for more than one field? Explain with example.
14.
Write any three DDL commands.
15.
Write a SQL statement to modify the student table structure by adding a new field.
16.
Explain ALTER command in detail.
17.
What are the components of SQL? Write the commands in each.
1.
(b)
DDL
2.
(b)
Table
3.
(b)
SQL
4.
(a)
DROP
5.
(d)
ALTER
6.
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.
7.
(i) A Data Manipulation Language (DML) is a computer programming language used for adding (inserting), removing (deleting), and modifying (updating) data in a database. In SQL, the data manipulation language comprises the SQL-data change statements, which modify stored data but not the schema of the database table.
(ii) After the database schema has been specified and the database has been created, the data can be manipulated using a set of procedures which are expressed by DML.
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.
| 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 |
10.
| 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. |
11.
(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
12.
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.
13.
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.
14.
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;
15.
ALTER TABLE <table-name> ADD <column- name><data type><size>;
Example: ALTER TABLE Student MODIFY Address char (25)
16.
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;
17.
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