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: 13/09/2022
QB365 provides a detailed and simple solution for every Possible Book Back Questions in Class 12 Computer Science Subject - Data Manipulation Through SQL , English Medium. It will help Students to get more practice questions, Students can Practice these question papers in addition to score best marks.
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.
Consider the following table Supplier and item .Write a python script for (i) to (ii)
| SUPPLIER | ||||
| Suppno | Name | City | Icode | SuppQty |
| S001 | Prasad | Delhi | 1008 | 100 |
| S002 | Anu | Bangalore | 1010 | 200 |
| S003 | Shahid | Bangalore | 1008 | 175 |
| S004 | Akila | Hydrabad | 1005 | 195 |
| S005 | Girish | Hydrabad | 1003 | 25 |
| S006 | Shylaja | Chennai | 1008 | 180 |
| S007 | Lavanya | Mumbai | 1005 | 325 |
i) Display Name, City and Itemname of suppliers who do not reside in Delhi.
ii) Increment the SuppQty of Akila by 40
2.
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 |
3.
hat is the use of HAVING clause. Give an example python script
4.
Write the Python script to display all the records of the following table using fetchmany()
| Icode | ItemName | Rate |
| 1003 | Scanner | 10500 |
| 1004 | Speaker | 3000 |
| 1005 | Printer | 8000 |
| 1008 | Monitor | 15000 |
| 1010 | Mouse | 700 |
5.
Write in brief about SQLite and the steps used to use it.
1.
(i) Program to Display Name, city and Item Name of suppliers who do not reside in Delhi:
import mysqldb
db = mysqlkdb.Connect ("Supplier.db")
cursor = db.cursor()
cursor. execute ("'SELECT NAME, CITY, ICode FROM Supplier WHERE CITY <> "Delh")
db. commit()
result=cursor.fetchall()
print ("result, sep = "\n")
db. close()
(ii) Program to Increment the suppQty of Akila by 40:
import mysqldb
db = mysqldb.Connect ("ltem.db"')
cursor = db.cursor()
cursor. execute ("UPDATE Item SET Name = 'Akila' WHERE SuppQty = 235)
db. commit()
cursor. execute ("SELECT * FROM Item")
result = cursor.fetchall()
print ("result, sep ="\n")
db. close()
2.
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()
3.
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)]
4.
Creating database:
Sql_command = " "
CREATE TABLE Hardware (
lcode INTEGER PRIMARY KEY.
ltem_Name VARCHAR(20),
Rate DEClMAL(5,2));" "
Program: To display the records using fetchmany()
import sqlite3
connection = sqlite3.connect ("Material.db")
cursor = connection.cursor()
cursor. execute ("SELECT * FROM Hardware")
print("fetching first 5 records:")
result = cursor.fetchmany(5)
print(result)
Output:
fetching first 5 records:
[(1003, 'Scanner', "10500'), (1004, 'Speaker', '3000'), (1005, 'Printer', '8000'), (1008, 'Monitor', '15000'),
(1010, 'Mouse', '700')]
5.
(i) SQLite is a simple relational database system, which saves its data in regular data files or even in the internal memory of the computer.
(ii) It is designed to be embedded in applications, instead of using a separate
database server program such as MySQL or Oracle.
(iii) SQLite is fast, rigorously tested, and flexible, making it easier to work. Python
has a native library for SQLite.
To use SQLite,
Step 1: import sqlite3
Step 2: create a connection using connect() method and pass the name of the database file
Step 3: Set the cursor object cursor = connection. cursor()
(iv) Connecting to a database in step 2 means passing the name of the database to be accessed. If the database already exists the connection will open the same. Otherwise, Python will open a new database file with the specified name.
(v) Cursor in step 3 is a control structure used to traverse and fetch the records of the database.
(vi) Cursor has a major role in working with Python. All the commands will be executed using cursor object only.
(vii) To create a table in the database, create an object and write the SQL command in it.
Example: sql_comm = "SQL statement"
(viii) For executing the command use the cursor method and pass the required sql command as a parameter. Many number of commands can be stored in the sql comm and can be executed one after other.
(ix) Any changes made in the values of the record should be saved by the commend "Commit" before closing the "Table connection" .
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