Professional Documents
Culture Documents
Pratical File CS
Pratical File CS
[083]
P a g e 1 | 14
INDEX.
SNO PRACTICAL PAGE NO SIGN
Write a Python program 3-4
1. to implement a stack
using list.
student table.
P a g e 2 | 14
QUES 1-
Write a Python program to implement a stack using list.
OUTPUT:
P a g e 3 | 14
Output:
P a g e 4 | 14
QUES 2-
.Create a student table having
1. Roll no
2. Name
3. Class
4. DOB
5. Gender
6. City
7. Marks insert 10 values.
Implement the following SQL commands on the student table:
i. ALTER table to add new attributes / modify data type / drop attribute
ii. UPDATE table to modify data
iii. ORDER By to display data in ascending / descending order
iv. Find the min, max, sum, count and average
v. To display the class, DOB and city whose marks is between 450 and
551.
vi. To display Name, Class and total number of student who have
secured more than 450 marks, class wise.
vii. To increase marks of all students by 20 whose class is “XII”
MYSQL-
P a g e 5 | 14
P a g e 6 | 14
P a g e 7 | 14
P a g e 8 | 14
3. Create a Table employee with following structure.
ID Number(4)
First_Name Varchar(30)
Last_Name Varchar(30)
User_id Varchar(10)
Salary Number(9,2)
P a g e 9 | 14
i. ID should be Primary key .
ii. User_Id should be Unique.
iii. Salary must be greater than 5000.
iv. First_Name and Last_Name must not remain blank.
P a g e 10 | 14
i. Job_id is Primary key
ii. Job_desc ,Alloc_on, Due_on cannot be left blank.
iii. Emp_id is foreign key that is related to ID column created in
Employee Table Q3
P a g e 11 | 14
CODE:
P a g e 12 | 14
OUTPUT:
MYSQL:
P a g e 13 | 14
P a g e 14 | 14