Test Index

CBSE Class 12 Computer Science 2024 Paper Compartment Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 35 of 35
Marks: +1, -0
(a) (i) Define the term foreign key with respect to RDBMS.
(ii) Sangeeta wants to write a program in Python to delete the record of a candidate “Raman” from the table named Placement in MySQL database, Agency:
The table Placement in MySQL contains the following attributes :
CName - String
Dept - String
Place - String
Salary - integer
Note the following to establish connectivity between Python and MySQL :
• Username – root
• Password – job
• Host – localhost
Help Sangeeta to write the program in Python for the above mentioned task.
OR
(b) (i) Give one difference between CHAR and VARCHAR datatype in MySQL.
(ii) Rahim wants to write a program in Python to insert the following record in the table named Bank_Account in MySQL database, Bank :
• Accno – integer
• Cname – string
• Atype – string
• Amount – float
Note the following to establish connectivity between Python and MySQL :
• Username – admin
• Password – root
• Host – localhost
The values of fields Accno, Cname, Atype and Amount have to be accepted from the user. Help Rahim to write the program in Python.
Advertisements
Go to Question: