Page 133 - PYTHON-12
P. 133
78. Differentiate between IP address and MAC address.
Ans. IP (Internet Protocol) address uniquely identifies the devices on a network while MAC (Media Access
Control) address is used to identify the physical address of the computer. IP address is assigned by
ISP (Internet Service Provider) while MAC address is assigned by manufacturer.
79. Name the device used to connect dissimilar networks.
Ans. Gateway.
80. What is Primary key?
Ans. Primary key is a column or a combination of columns that uniquely identify a row in a relational table.
81. What is Candidate key?
Ans. All possible combinations of columns that can possibly serve as the primary key are called candidate keys.
82. What is Foreign key?
Ans. A combination of columns where values are derived from primary key of some other table is called the foreign
key of the table in which it is contained.
83. What is Alternate key?
Ans. A candidate key that is not serving as a primary key is called an Alternate key.
84. What is MySQL?
Ans. MySQL is an open source RDBMS that relies on SQL for processing data in the database. The database is
available for free under the terms of General Public Licence (GPL).
85. What is RDBMS?
Ans. Relational Database Management System (RDBMS) facilitates access, security and integrity of data and
eliminates data redundancy, for example, MySQL, Oracle, Microsoft SQL Server, etc.
86. Differentiate between Drop and Delete command.
Ans. Drop command is used to delete tables, for example, Drop Table Orders; while Delete command is used to
delete rows of a table, for example, Delete from Student;
87. What do you understand by NOT NULL constraint?
Ans. This constraint ensures that the null values are not permitted on a specified column. This constraint can be
defined at the column level and not at the table level.
88. What is the significance of COUNT() function in MySQL?
Ans. It is used to count the number of non-null values in a given column or number of non-null rows in a table, for
example, Select Count (RollNo) from students;
If we use the asterisk, we get all rows, including nulls and duplicates, for example, Select Count(*) from
students;
89. How can we delete a table in MySQL?
Ans. We can delete a table in MySQL using the DROP TABLE command.
90. How can we delete a record in MySQL?
Ans. We can delete a record in MySQL using the DELETE command.
91. How can we add a record and add a column in a table?
Ans. We can add a record by using INSERT INTO command and a column through the ALTER table command.
92. Differentiate between DDL and DML commands.
Ans. DDL (Data Definition Language) is used to change the structure of the table while DML (Data Manipulation
Language) is used to retrieve records from the table.
Examples of DDL commands are – ALTER , CREATE, DROP.
Examples of DML commands are – SELECT, INSERT INTO, DELETE.
93. Give the necessary command to incorporate SQL interface within Python.
Ans. import MySQLdb.
A.28 Computer Science with Python–XII