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
Data Manipulation Through 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.
Which SQlite keyword is used to extract only those records that fulfill a specified condition?
WHERE
EXTRACT
CONNECT
CURSOR
2.
Which sqlite method is used to fetch all rows from the database table?
fetch ( )
fetchrowsAll ( )
fectchmany ( )
fetchall ( )
3.
The SQlite command opens the already created database is
Cursor
Sql-comm
Connect
Connection
4.
Which of the following is a control structure used to traverse and fetch the records of the database?
Pointer
Key
Cursor
Insertion point
5.
SQLite falls under which database system?
Flat file database system
Relational Database system
Hierarchical database system
Object oriented Database system
6.
How the cursor object is created?
7.
Write a note or cursor. description.
8.
What is master table?
9.
What is the advantage of declaring a column as “INTEGER PRIMARY KEY”
10.
Which method is used to connect a database? Give an example.
11.
Write a note on SELECT statement in SQL.
12.
What is the use of aggregate functions used along with SELECT statement? What are they?
13.
Write the sqlite steps to connect the database.
14.
What is the use of Where Clause.Give a python statement Using the where clause.
15.
16.
Write a Python script to create a table called ITEM with following specification.
Add one record to the table.
Name of the database :- ABC
Name of the table :- Item
Column name and specification :-
| I code | :- | Integer and act as primary key |
| Item Name | :- | Character with length 25 |
| Rate | :- | Integer |
| Record to be added | :- | 1008, Monitor, 15000 |
17.
hat is the use of HAVING clause. Give an example python script
1.
(a)
WHERE
2.
(d)
fetchall ( )
3.
(c)
Connect
4.
(c)
Cursor
5.
(b)
Relational Database system
6.
The cursor object is created by calling the cursor ( ) method of connection. The cursor is used to traverse the records from the result set.
7.
cursor. description contains the details of each column headings. It will be stored as a tuple and the first one that is 0(zero) index refers to the column name. Using this command you can display the table's Field names.
8.
SQlite_master is the master table which holds the key information about your database tables.
9.
If a column of a table is declared to be an INTEGER PRIMARY KEY, then whenever a NULL is used as an input for this column, the NULL will be automatically converted into an integer which will be one larger than the highest value so far used in that column.
10.
Create a connection using connect() method and pass the nanie of the database file.
Example:
#connecting to the database
connection = sqlite3.connect ("Academy.db")
#cursor
cursor = connection.cursor()
11.
(i) "SELECT" is the most commonly used statement in SQL.
(ii) The SELECT Statement in SQL is used to retrieve or fetch data from a table in a database.
(iii) The syntax for using this statement is "Select * from table_name" and all the table data can be fetched in an object in the form of list of lists. List the classes used in
12.
Aggregate functions are used to do operations from the values of the column and a single value is returned.
(i) COUNT ( )
(ii) AVG ( )
(iii) SUM ( )
(iv) MAX ( )
(v) MIN ( )
13.
Step 1: Import sqlite3
Step 2: Create a connection using connect o method and pass the name of the database File
Step 3: Set the cursor object cursor = connection. cursor ( )
14.
The WHERE clause is used to extract only those records that fulfill a specified condition. In this example we are going to display the different grades scored by male students from "student table.
import sqlite3
connection = sqlite3.connect ("Academy.db")
cursor = connection.cursor()
cursor.execute ("SELECT DISTINCT (Grade) FROM student where gender = "M")
result = cursor.fetchall()
print(* result, sep ="\n")
Output:
('B,')
('A,')
('C,')
('D,')
15.
16.
Program:
import mysql db
db = mysqldb.connect ("local host", "user", "123", "organization'")
cursor = db.cursor()
item table creation
database: ABC, table: Item, lcode: int, ItemName: Char
Rate: int. Record: 1008, Monitor: 15000
cursor.execute ("Create table item(icode int, item Name char (25), Rate int"));
db.close
cursor. execute ("insert into item values ("1008", 'Monitor', '15000" ));
db.commit()
17.
HAVING clause is used to filter data based on7the group functions. This is similar to WHERE condition but can be used , only with group functions. Group functions cannot be used in WHERE Clause but can be used in HAVING clause.
Example:
import sqlite3
connection = sqlite3.connect("Academy.db")
cursor = connection.cursorO
cursor.execute("SELECT GENDER,COUNT(GENDER) FROM Student GROUP BY GENDER HAVING COUNT( GENDER> 3")
result = cursor.fetchall( )
co = [i[o] for i in cursor. description]
print(co)
print(result)
Output:
['gender', 'COUNT(GENDER)']
[('M', 5)]
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