You are on page 1of 2

Q1) What is a database?

Ans: A database is a collection of data/information that is organized so that it is easily accessed, managed, and
updated.
In a database, data is organized into rows, columns, and tables and it is indexed to make it easy to access
relevant information. It works like a container that contains various objects like tables, queries, reports, etc., in an
organized way.

Q2) Differentiate between DBMS and RDBMS.


Ans:
DBMS RDBMS
The data stored is in file format. The data stored is in table format.
DBMS supports a single user. RDBMS supports multiple users.
No connection between data. Data in the form of a table are linked together.
Data redundancy is common. Here, data redundancy is reduced with the help of keys
and indexes in RDBMS.
Data is stored in small quantities. Data is stored in large quantities.
Example: XML, Microsoft Access. Example: Oracle, SQL servers.

Q3) Differentiate between primary and unique keys.


Ans:
Primary Key Unique Key
The primary key is accepted as a unique or sole When the primary key is not presented in the table,
identifier for every record in a table then the unique key is also used as a unique identifier
for records.
In the case of the primary key, we cannot save NULL In the case of a unique key, we can save NULL values.
values However, only one NULL value is supported.
It supports entity integrity. It supports unique data
Each table holds just one primary key. A table can have more than one unique key.
With the primary key, we cannot modify or delete the With the unique key, we can modify column values.
values.

Q4) Differentiate between primary and foreign keys.


Ans:
Primary Key Foreign Key
A primary key focuses on the uniqueness of a table. It A foreign key is used to build a relationship between
assures the value in a specific column is unique. two tables.
A table allows only one primary key. A table allows more than one foreign key.
The primary key doesn’t allow NULL values. The foreign key allows multiple NULL values.

Q5) Define integrity constraint.


Ans: Integrity constraints are a set of rules. It is used to maintain the quality of information. Ensure that the data
insertion, updating, and other processes have to be performed in such a manner that the data integrity is
unaffected.

Q6) Write the uses of not null constraints.


Ans: The NOT NULL constraint is used to ensure that a given column in a table is never assigned a null value. Once a
NOT NULL constraint is defined to a particular column, any insert or update operation that attempts to place a null
value in that column will fail.

07) Differentiate between cardinality and degree.


Ans: Cardinality refers to the number of tuples/rows in a table. Whereas, degree refers to the number of
attributes/columns in a table.

Q8) Define database schema.


Ans: A database schema is a sketch/skeleton/blueprint of planned data. It represents the design of tables, columns,
relations, constraints, and relationships that make up a logically distinct section of a database.
Q9) Differentiate between DDL and DML commands.
Ans:
DDL Commands DML Commands
DDL stands for Data Definition Language. DML stands for Data Manipulation Language.
It is used to create databases, schema, constraints, It is used to update, insert or delete records.
users, tables, etc.
Example: CREATE, DROP, RENAME, and ALTER Example: UPDATE, INSERT and DELETE

Q10) What is MySQL? What are the different categories of commands available in MySQL?
Ans: MySQL is a free, open-source Relational Database Management System. A MySQL database system consists of
a MySQL server instance and a MySQL database.
The different categories of commands available in MySQL are:-
a) DDL Commands
b) DML Commands
c) DCL Commands
d) TCL Commands

You might also like