0% found this document useful (0 votes)
3 views2 pages

SQL and Python Functions for Class 12

The document outlines an assessment for Class 12 students focusing on SQL and Python programming concepts. It includes questions on SQL relations, commands for managing databases, user-defined functions for handling sales records, and employee data management. Additionally, it covers definitions of key database terms and types of constraints with examples.

Uploaded by

jayabharani1983
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

SQL and Python Functions for Class 12

The document outlines an assessment for Class 12 students focusing on SQL and Python programming concepts. It includes questions on SQL relations, commands for managing databases, user-defined functions for handling sales records, and employee data management. Additionally, it covers definitions of key database terms and types of constraints with examples.

Uploaded by

jayabharani1983
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SHREE NIKETAN PATASALA (CBSE) SCHOOLS

CLASS 12 / CS(083) / 2024-25


Posting Date: 23/08/25 Submission Date:25/08/25
Time Allowed: 1 HR

[Link] SQL, a relation consists of 5 columns and 6 rows. If 2 columns and 3 rows are added to the existing
relation, what will be the updated degree of a relation?
Degree: 7 b) Degree: 8 c) Degree: 9 d) Degree: 6
2. Which SQL command is used to remove a column from a table in MySQL?
a) UPDATE b) ALTER c) DROP d) DELETE
3. Assertion (A): A primary key must be unique and cannot have NULL values.
Reasoning (R): The primary key uniquely identifies each row in the table.
4. A. Write suitable commands to do the following in MySQL.
I. View the table structure.
II. Create a database named SQP
5. Raj is the manager of a medical store. To keep track of sales records, he has created a
CSV file named [Link], which stores the details of each sale.
The columns of the CSV file are: Product_ID, Product_Name, Quantity_Sold and
Price_Per_Unit.
Help him to efficiently maintain the data by creating the following user-defined functions:
I. Accept() – to accept a sales record from the user and add it to the file [Link].
II. CalculateTotalSales() – to calculate and return the total sales based on the
Quantity_Sold and Price_Per_Unit.
6. Mr. Ravi, a manager at a tech company, needs to maintain records of employees. Each
record should include: Employee_ID, Employee_Name, Department and Salary.
Write the Python functions to:
I. Input employee data and append it to a binary file.
II. Update the salary of employees in the "IT" department to 200000.
[Link] the following term:
[Link]
[Link]
[Link]
[Link]
[Link] the different types of Constraint with an example.
9.
[Link] the above tabular column find the No of Degree and Cardinality.

You might also like