Skip to main content

Posts

PYTHON - MYSQL CONNECTIVITY CODE

  #INSERTION OF DATA import mysql.connector mydb = mysql.connector.connect( host="localhost", user="root", passwd="root", database="school" ) print("Successfully Connected") #print(mydb) mycursor=mydb.cursor()   v1=int(input("enter ID:")) v2=input("enter name:") v3=input("enter Gender:") v4=int(input("enter age:")) sql='insert into TEACH values("%d","%s","%s","%s")'%(v1,v2,v3,v4) print(sql) mycursor.execute(sql) mydb.commit() print("record added")
Recent posts

QUESTIONS BASED ON PANDAS SERIES | IP

 QUESTIONS BASED ON PANDAS SERIES GRADE XII 1.Given the following Series1 A   100 B   200 C   300 D   400 E   500 Write the command to create above Series and then double the value in series and store in another series named Series2 2. State whether True or False a. A series object is size mutable. b. A Dataframe object is value mutable 3. Consider a given Series , Series1: 200 700 201 700 202 700 203 700 204 700 Write a program in Python Pandas to create the series and display it. 4.Consider the following Series object, s IP          95 Physics     89 Chemistry   92 Math        95 i. Write the Python syntax which will display only Physics. ii. Write the Python syntax to increase marks of all subjects by 10. 5. Consider a given series : SQTR QTR1   50000 QTR2   65890 QTR3   56780 QTR4   89000 QTR5   77900 Write a p...

REFERENTIAL INTEGRITY & SQL CONSTRAINTS

  RDBMS CONCEPT REFERENTIAL INTEGRITY  Referential Integrity is a system of rules that a DBMS uses to ensure that relationships between records in related table are valid, and that users don't accidentally delete or change related data. Conditions to set Referential Integrity: ✓ The matching field from the primary table is a primary key or has a unique index ✓ The related fields have the same data type ✓ Both tables belong to the same database When referential integrity is enforced, given rules should be followed: ✓ One can't enter a value in the foreign key field of the related table that doesn't exist in the primary key of the primary table. ✓ One can't delete a record from a primary table, if matching records exist in related table. ✓ One can't change a primary key value in the primary table, if that record has related records. For example, suppose Table B has a foreign key that points to a field in Table A.  Referential integrity would prevent you from adding a ...

MySQL - ASSIGNMENT | 10th March 25

  MySQL DATABASE QUESTIONS GRADE XII 1.      What is a database? Name any two RDBMS softwares. 2.      Discuss features of SQL. 3.      Differentiate between ALTER and UPDATE statements. 4.      Elucidate the terms degree and cardinality of a relation. 5.      Answer the following questions on the basis of the given table: Admno             Name               Subject            Gender             Average 1001                 Amit                 Math         ...

GRADE XI CS - Society Law and Ethics

  Society Law and Ethics 1. Digital Footprints A digital footprint refers to the traces of online activity left by users when they browse, interact, and engage on the internet. Types of Digital Footprints Active Digital Footprint Information intentionally shared online, such as social media posts, comments, emails, and uploaded files. Passive Digital Footprint Data collected without the user's explicit knowledge, such as browsing history, cookies, IP addresses, and location tracking. Importance of Managing Digital Footprints Protects personal privacy and security. Affects online reputation and digital identity. Employers, universities, and organizations often check digital footprints before hiring or admissions. Cybercriminals can misuse digital footprints for identity theft and fraud. Ways to Manage Digital Footprints Regularly review and update privacy settings on social med...

GRADE XII CS - REVISION

  VIVA QUESTIONS GRADE XII CS Dear All Be thorough with your project and practical files, as the viva can be asked from anywhere. Stay calm, don’t get nervous, and be confident in front of the examiner. 1. Tell me about your project. 2. Which concepts you have used for your project? 3. What do you mean by front end and back end? How they are important in developing any such projects? 4  Mention the modules and built-in functions you have used in your project. 5. Which real world problems are solved by your project? 6. Explain the most important feature of your project. 7. Name a few mutable data types of python. Lists, Sets, and Dictionaries 8. Name a few immutable data types of python. Strings, Tuples, Numeric 9. Name ordered and unordered data type of python. Ordered – String, List, Tuples Unordred – Set, Dictionaries 10. What is the significance of a pass statement in python? pass is no operation python statement. This is used where python requires syntax but logic requires...