Professional Documents
Culture Documents
Neelam Mehla
Part-B Unit-4
Relational Database Management System
Exercise
1. Write a short note on MySQL.
Ans. Introduction to MySQL: MySQL is a relational database management system
(RDBMS). It is pronounced as "My Sequel". MySQL was originally founded and
developed in Sweden by David Axmark, Allan Larsson and Michael Widenius, who
had worked together since the 1980s.
DBMS RDBMS
vi)It stores data in either a navigational or the column names, and the rows contain
vii)It deals with small quantity of data. vii)It deals with large amount of data.
security levels with regards to data xii)There exists multiple levels of data security in a
manipulation. RDBMS.
xiii)Low software and hardware necessities. xiii)Higher software and hardware necessities.
7.State the similarity and difference between the Primary Key, Candidate
Key, Alternate Key and Foreign Key.
Ans.
i. Primary Key: The group of one or more columns used to uniquely identify each row of a
relation is called its Primary Key.
ii. Candidate Key: A column or a group of columns which can be used as the primary key
of a relation is called a Candidate key because it is one of the candidates available to be
the primary key of the relation.
iii. Alternate Key: A candidate key of a table which is not selected as the primary key is
called its Alternate Key.
iv. Foreign Key: A primary key of a base table when used in some other table is called as
Foreign Key.
10. Write SQL statement to view names of all the tables contained in the
current database.
Ans. Viewing the tables in the database To see a list of tables present in the current
database we will use SHOW TABLES.
Learner
+-------------------------+
1 row in set (0.00 sec)
11.In a database there is a table Cabinet. The data entry operator is not
able to put NULL in a column of Cabinet? What may be the possible
reason(s)?
Ans. Many times there are some columns of a table in which NULL values should not
be accepted. We always want some known valid data values in these columns. So we
can set NOT NULL constraint in that column.
12. In a database there is a table Cabinet. The data entry operator is not
able to put duplicate values in a column of Cabinet? What may be the
possible reason(s)?
Ans. Because of UNIQUE key constraint.
13. Do Primary Key column(s) of a table accept NULL values?
Ans. No, Primary key column of a table not accept NULL values.
14. What are the differences between DELETE and DROP commands of
SQL?
Ans. DELETE is a Data Manipulation Language command, DML command and is used
to remove tuples/records from a relation/table. Whereas DROP is a Data Definition
Language, DDL command and is used to remove named elements of schema like
relations/table, constraints or entire schema.