0% found this document useful (0 votes)
37 views20 pages

Database Administration Q and A

The document discusses the different types of database administrators and their roles. It also provides details about SQL, including what it is, the different types of SQL commands, and examples of commands from each type like SELECT, INSERT, UPDATE etc. It focuses on DDL commands for creating, modifying and deleting database structure and objects.

Uploaded by

Maurice Adibaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views20 pages

Database Administration Q and A

The document discusses the different types of database administrators and their roles. It also provides details about SQL, including what it is, the different types of SQL commands, and examples of commands from each type like SELECT, INSERT, UPDATE etc. It focuses on DDL commands for creating, modifying and deleting database structure and objects.

Uploaded by

Maurice Adibaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

What are the types of database administrators?

System database administrator: This role focuses on system administration and doesn’t typically handle
database applications. They often install, configure, upgrade and patch database software to keep the
overall system running well.

Application database administrator: This person focuses on integrating databases into applications,
often using SQL in the process.

Performance database administrator: This type of database administrator optimizes various databases,
using physical and virtual hardware in the best way possible to make data access easier.

Task-oriented database administrator: Some database administrators focus on one very specific
database-related task. Examples include backups for data recovery, compliance and security.

What is SQL?

Structured Query Language is a domain-specific language used in programming and designed for
managing data held in a relational database management system, or for stream processing in a
relational data stream.

It is used in programming and managing data held in relational database management systems such as
MySql, MS SQL Server, oracle Sybase, etc as a medium (instructions) for accessing and interacting with
data.

It enables performing several operations such as creating, deleting, modifying, and fetching entries in
the database and some other advanced statistical, arithmetic, and mathematical operations. Let us try
understanding the basics of SQL now.

Types of SQL Commands

DDL(Data Definition Language): To make/perform changes to the physical structure of any table residing
inside a database, DDL is used. These commands when executed are auto-commit in nature and all the
changes in the table are reflected and saved immediately.

DML(Data Manipulation Language): Once the tables are created and the database is generated using
DDL commands, manipulation inside those tables and databases is done using DML commands. The
advantage of using DML commands is, that if in case any wrong changes or values are made, they can be
changed and rolled back easily.

DQL(Data Query Language): Data query language consists of only one command upon which data
selection in SQL relies. The SELECT command in combination with other SQL clauses is used to retrieve
and fetch data from databases/tables based on certain conditions applied by the user.

DCL(Data Control Language): DCL commands as the name suggests manage the matters and issues
related to the data controller in any database. DCL includes commands such as GRANT and REVOKE
which mainly deal with the rights, permissions, and other controls of the database system.

TCL(Transaction Control Language): Transaction Control Language as the name suggests manages the
issues and matters related to the transactions in any database. They are used to roll back or commit the
changes in the database.
Data Definition Language
In SQL DDL commands are used to create and modify the structure of a database and database
objects. These commands are CREATE, DROP, ALTER, TRUNCATE, and RENAME. Let
us discuss these commands one at a time.

CREATE

The syntax for create command is:

For creating a database:

CREATE DATABASE database_name;

Creates a database named 'database_name'. Let us create our own database and table which we
will use as a reference throughout this article:

CREATE DATABASE testdb;

For creating a table:

CREATE TABLE table_name(


column1 datatype,
column2 datatype,
.....
columnN datatype
);

This creates a new table with the name 'table_name' in our database. It will have N columns for
each of the same datatypes as mentioned adjacent to it in the create syntax.

For instance:

CREATE TABLE my_table(


first_name varchar(20),
age INT
);

This creates an empty table. For clarity suppose we add an entry (row) in the column (as in the
image) the result will be:

first_name age
myFirstName 20

DROP

To drop a table:
DROP TABLE table_name;

deletes the table named 'table_name' if present.

Suppose if we drop our my_table, the result is as:

drop table my_table;

Output:

Query OK, 0 rows affected (0.01 sec)

To drop a database:

DROP DATABASE database_name;

This removes the database named 'database_name' if present. Suppose we try this with our
database, the result looks like this:

drop database testdb;

Output:

Query OK, 0 rows affected (0.01 sec)

ALTER

Following is the syntax to alter the contents of a table:

ALTER TABLE table_name


ADD column_name column_definition;

Let's try performing this operation on our table my_table:

alter table my_table


add column employed boolean;

Output:

| first_name | age |
|:-----------:|:---:|
| myFirstName | 20 |

In the above example, we are adding a column to our table. Apart from that, we can perform
other operations such as dropping a column, modifying it, etc.

To change the properties of a column such as its type, type capacity, add constraints, etc:
ALTER TABLE table_name
ALTER COLUMN column_name column_type;

Lets try using it in our database:

alter my_table modify column


first_name varchar(25);

Output:

Query OK, 0 rows affected (0.01 sec)

We changed the column first_name from data type varchar(20) to varchar(25).

Similarly, we can drop a column using alter with the following syntax:

ALTER TABLE table_name


DROP COLUMN column_name;

We can remove our column 'employed' as:

alter table my_table


drop column employed;

Output:

Query OK, 0 rows affected (0.01 sec)

TRUNCATE

This command is similar to the drop table command. The only difference is that while the drop
command removes the table as well as its contents, the truncate command only erases the
contents of the table's contents and not the table itself. Let us take an example to be clearer:

truncate table my_table;


select * from my_table;

Output:

Query OK, 0 rows affected (0.01 sec)


Empty set (0.00 sec)

As shown in the image above, truncate has removed the contents of the table. The table, though
now empty, still exists. Think of truncating a table as emptying it rather than deleting it.

RENAME

This command is used to change the name of an existing table. The syntax is
RENAME TABLE table_name TO table_name_new;

The following image shows how to rename our table from 'my_table' to 'some_table':

rename table my_table to some_table;

Output:

Query OK, 0 rows affected (0.01 sec)

Data Manipulation Language


DML is used for inserting, deleting, and updating data in a database. It is used to retrieve and
manipulate data in a relational database. It includes INSERT, UPDATE, and DELETE. Let's
discuss these commands one at a time.

INSERT

Insert statement is used to insert data in a SQL table. Using the Insert query, we can add one or
more rows to the table. Following is the syntax of the MySQL INSERT Statement.

INSERT INTO table_name


(attribute1, attribute2, ...)
VALUES(val1, val2, ...)

Let's take a quick instance for understanding this better. Suppose that we need to insert 2
rows {"myName3", 2, true} and {"myName4", 28, false}. This is how we would accomplish
that:

insert into my_table


values("myName3", 5, false),
("myName4", 51, true);

Output:

Query OK, 2 rows affected (0.01 sec)

We don't necessarily have to include all column values. We can for example omit the age column
as shown below:

insert into my_table


(first_name, employed)
values("myName4", true);

Output:

Query OK, 1 rows affected (0.01 sec)


This is also a fine example of how we insert just one row.

UPDATE

This command is used to make changes to the data in the table. Its syntax is:

UPDATE table_name
SET column1 = val1,
column2 = val2,
...
WHERE CLAUSE;

How about we update the employment status of myName of age 12 which has it as NULL? This
is how we achieve it:

update my_table
set employed=true
where age=12;

Output:

Query OK, 1 rows affected (0.01 sec)

Let's batch-update all our rows without filtering them on any condition. Suppose we want to
increment the value of every row in the age column. The following query is what we need:

update my_table
set age = age + 1;

Output:

Query OK, 5 rows affected (0.01 sec)

DELETE

This command is used to remove a row from a table. the syntax for delete is

DELETE FROM table_name


WHERE CLAUSE;

The where clause is optional. To delete the row with first_name "myName5 run this query:

delete from my_table


where first_name = "myName5";

Output:

Query OK, 0 rows affected (0.01 sec)


It is to be noted that omitting the use where clause results in the emptying of the table just as
truncating does.

Data Query Language


DQL commands are used for fetching data from a relational database. They perform read-only
queries of data. The only command, 'SELECT' is equivalent to the projection operation in
relational algebra. It command selects the attribute based on the condition described by
the WHERE clause and returns them.

Select is one of the most important SQL commands. It is used to retrieve data from a database.
One can fetch either the entire table or some data according to specified rules.

The data returned is stored in a result table. With the SELECT clause of a SELECT command
statement, we specify the columns that we want to be displayed in the query result and,
optionally, which column headings we prefer to see above the result table.

The select clause is the first clause and is one of the last clauses of the select statement that the
database server evaluates. The reason for this is that before we can determine what to include in
the final result set, we need to know all of the possible columns that could be included in the
final result set.

The syntax for the SELECT statement is:

SELECT column1 as c1
column2 as c2
...
from table_name;

'as c1' implies that the result table column that holds the data from column1 of the original table,
will be identified as 'c1' and its usage is optional.

To get the age of all our rows, we would run the first of the following query:

select age as myAge


from my_table;

select * from my_table;

Output:

| myAge |
| ----- |
| 47 |

| first_name | age | employed |


| -------- | -------- | -------- |
| myName | 47 | 1 |
Notice something weird in the second query?

Firstly there's an asterisk in place of specifying a column. What it does is signal to the DBMS
that the user has requested all the data in the table, i.e. entry of every column for every row.
Therefore the entire table is returned as it is.

Secondly, we haven't used the operator here. thus the returned table columns have retained their
original labels.

We can select data as per our requirements by filtering. We have an array of methods, operators,
functions, etc for this purpose. Suppose we need to fetch only those rows which qualify a certain
criterion. We use a 'where' clause to fulfill this.

Assume the present state of our table is as shown in the image below.

select * from my_table;

Output:

| first_name | age | employed |


| -------- | -------- | -------- |
| myName | 47 | 1 |
| maName1 | 10 | 0 |
| myName2 | 20 | 0 |
| myName3 | 32 | 1 |

Let's say that we need to fetch all rows where the age is strictly greater than 20. The query that
we need is as follows:

select * from
my_table where age>20;

Output:

| first_name | age | employed |


| -------- | -------- | -------- |
| myName | 47 | 1 |
| myName2 | 32 | 1 |

yes; it works!

To extract all the rows where the name matches a certain pattern we use the 'like' operator. The
following snippet shows its action:
select * from my_table
where first_name like "myName_";

Output:

| first_name | age | employed |


| -------- | -------- | -------- |
| myName0 | 10 | 1 |
| maName1 | 10 | 0 |
| myName2 | 20 | 0 |

'like' is an operator used for pattern matching. It uses two special characters embedded in the
string to be matched; The percent sign '%' represents zero, one, or any number of characters,
while the underscore sign '_' represents a single character.

In the previous example, we used underscore, and therefore all rows except the first were
returned because 'myName_' implies a matching string of the form 'myName' + an additional
character. The last 3 strings are of this form and hence are matched, unlike the first one which
does not have any additional character present at last.

Similarly, we can obtain all the rows in the first_name field which ends with zero ('0').

select * from my_table


where first_name like "%0";

Output:

| first_name | age | employed |


| -------- | -------- | -------- |
| myName0 | 10 | 0 |

Data Control Language


DCL is used to access the stored data. It is used to revoke and grant the user the required access
to a database. In the database, this language does not have the feature of rollback. It is a part of
the structured query language (SQL).

It helps in controlling access to information stored in a database. It complements the data


manipulation language and the data definition language. It is the simplest of three commands.

It provides the administrators, to remove and set database permissions to desired users as needed.

These commands are employed to grant, remove and deny permissions to users for retrieving and
manipulating a database. There are two relevant commands under this category: grant and
revoke.
GRANT

GRANT is a command used to provide access or privileges on the database objects to the users.

SYNTAX

GRANT PRIVILEGES
ON OBJECT
TO USER;

1. SELECT:

To grant Select Privilege to a table named “tableName", the user name is "userName",
and the following GRANT statement should be executed.

GRANT SELECT
ON tableName
TO 'userName'@'localhost';

2. Granting multiple privileges to a user:

To grant multiple Privileges to a user named “username" in table “tableName”, the


following GRANT statement should be executed:

GRANT SELECT, INSERT, DELETE, UPDATE


ON tableName
TO 'userName'@'localhost';

3. Granting all the privileges to a user:

To Grant all the privileges to a user named “userName” in a table “tableName”, the
following Grant statement should be executed.

GRANT ALL
ON tableName
TO 'userName'@'localhost';

4. Granting a privilege to all users:


To Grant a specific privilege to all the users in a table “tableName" this Grant statement
should be executed.

GRANT SELECT
ON tableName
TO '*'@'localhost';

REVOKE

Once you have granted privileges, you may need to revoke some or all of these privileges. To do
this, you can run a revoke command. You can revoke any combination of SELECT, INSERT,
UPDATE, DELETE, REFERENCES, ALTER, or ALL.

REVOKE privileges
ON object
FROM user;

Object is the name of the database object that you are revoking privileges for. In the case of
revoking privileges on a table, this would be the table name. Username of the user that will have
these privileges revoked.

Suppose we need to revoke delete permission for the 'tableName' table' from a user named
'userNamed', the following would be the query.

REVOKE DELETE
ON tableName
FROM userName;

To remove every permission use 'ALL'.

REVOKE ALL
ON tableName
FROM userName;

Transaction Control Language


TCL includes statements that are used to manage the changes that are made from DML
statements. It enhances the transactional nature of SQL. The TCL commands in SQL are:

 COMMIT: It's a SQL command used in the transaction tables or database to make the
current transaction or database statement permanent. It shows the successful completion
of a transaction. If we have successfully executed the transaction statement or a simple
database query, we want to make the changes permanent. We need to perform the commit
command to save the changes, and these changes become permanent for all users.
Furthermore, once the commit command is executed in the database, we cannot regain its
previous states in which it was earlier before the execution of the first statement.

SYNTAX
commit;

 ROLLBACK: Undoes any changes made to the database. ROLLBACK is the SQL
command that is used for reverting changes performed by a transaction. When a
ROLLBACK command is issued it reverts all the changes since the last COMMIT or
ROLLBACK.

SYNTAX

ROLLBACK;

 SAVEPOINT: This command creates a point in your transaction to which you can roll
back. It is a command in SQL that is used with the rollback command. It is a command in
Transaction Control Language that is used to mark the transaction in a table.

SYNTAX

SAVEPOINT some_name;

Conclusion
 SQL is used in programming and designed for managing data held in a relational
database management system, or for stream processing in a relational data stream.
 The various database management systems that use SQL as a medium are MySql,
MariaDB, PostgreSQL, etc.
 Based on functionalities performed by them, there are five types of SQL
Commands- DDL(Data Definition Language), DML(Data Manipulation
Language), DQL(Data Query Language), TCL(Transaction Control
Language), DCL(Data Control Language).
 In SQL DDL commands are used to create and modify the structure of a database and
database objects. These commands are CREATE, DROP, ALTER, TRUNCATE,
and RENAME. Let's discuss these commands one at a time.
 DML is used for inserting, deleting, and updating data in a database. It is used to retrieve
and manipulate data in a relational database. It includes INSERT, UPDATE,
and DELETE. Let's discuss these commands one at a time.
 DQL commands are used for fetching data from a relational database. The only one
command, ‘SELECT’ is equivalent to the projection operation in relational algebra. This
command selects the attribute based on the condition described by the WHERE clause
and returns them.
 DCL is used to access the stored data. It is used to revoke and grant the user the required
access to a database. In the database, this language does not have the feature of rollback.
It is a part of the structured query language (SQL).
 TCL includes statements that are used to manage the changes that are made from DML
statements. It enhances the transactional nature of SQL. The TCL commands in SQL
are COMMIT and ROLLBACK.
Integrity Constraints in Database Management Systems are the set of pre-defined rules responsible for
maintaining the quality and consistency of data in the database.

Integrity Constraints in DBMS are of 4 types:

Domain Constraint

Domain integrity constraint contains a certain set of rules or conditions to restrict the kind of
attributes or values a column can hold in the database table. The data type of a domain can be string,
integer, character, DateTime, currency, etc.

Example:

Consider a Student's table having Roll No, Name, Age, Class of students.

Roll No Name Age Class

101 Adam 14 6

102 Steve 16 8

103 David 8 4

104 Bruce 18 12

105 Tim 6 A

In the above student's table, the value A in the last row last column violates the domain integrity
constraint because the Class attribute contains only integer values while A is a character.

Domain Constraint

Domain integrity constraint contains a certain set of rules or conditions to restrict the kind of
attributes or values a column can hold in the database table. The data type of a domain can be string,
integer, character, DateTime, currency, etc.

Example:

Consider a Student's table having Roll No, Name, Age, Class of students.

Roll No Name Age Class

101 Adam 14 6

102 Steve 16 8

103 David 8 4

104 Bruce 18 12

105 Tim 6 A
In the above student's table, the value A in the last row last column violates the domain integrity
constraint because the Class attribute contains only integer values while A is a character.

Q:

What types of databases do you work with?

A:

Many types of database infrastructure exist, so you want to confirm that the applicant has the
background that you’re looking for. Look for people who mention the specific database versions
they’re familiar with, as well as a brief explanation of their experience level with each.
What to look for:

 Detailed information

 Years of experience

 Brief overview of duties

Example:

“I’m most familiar with Microsoft SQL Server. I started with the 2012 version and worked with that for
five years. I’ve also supported SQL Server 2014 and 2016 environments, as well as MongoDB.

Q:

Do you have experience with on-premises databases, cloud databases or both?

A:

Many organizations are moving from a fully on-premises infrastructure to the cloud. You can discover
which environment your candidate works the best in. If your organization intends on changing away
from your current configuration, you can find out whether your interviewee can support your long-
term goals.
What to look for:

 Strong understanding of infrastructure differences

 Flexibility

 Willingness to learn

Example:

“I have ten years of experience with on-premises databases, and I’m currently working on
certifications for hybrid and cloud-based infrastructure. I do my best to keep on top of the latest
trends in database administration and educate myself appropriately.

Q:

Can you explain what ODBC is?

A:
This question tests the technical knowledge of your applicant and is directed at people you’re hiring
for mid-level positions. Look for an answer that covers the basic concept and goes into some detail
about its role in a database environment.
What to look for:

 Thorough understanding of this acronym

 Good communication

 Use case examples

Example:

“Open Database Connectivity is a method used by application front ends when they’re communicating
with a database backend. I’ve helped software developers implement ODBC so they can pull the right
data sources into custom enterprise apps.

Q:

What is the highest number of database servers you have worked with?

A:

You get an idea of how large of a data center the database administrator has worked with. If you’re a
large organization looking for a DBA for critical systems, the applicant with small business experience
may not work out well.

What to look for:

 Size of company

 Number of servers

 Type of server environment

Example:

“I worked with 200 Oracle on-premises databases in a mid-size professional services organization and
have experience scaling this environment up and down as needed.”

Q:

How would you handle data loss during a database migration?

A:

Data loss is a high-pressure situation for a database administrator, especially if a migration project
falls behind schedule. You get to see their thought process, how they handle stress and the strategies
they use for disaster recovery.
What to look for:

 Level-headed reactions

 Detailed technical answer


 Examples of how they handle pressure

Example:

“I would step in and identify whether the problem that causes the data loss was a one-time
occurrence or an issue with the entire migration. Once I addressed that, I would locate the backup
containing those databases and begin the restoration process.”

Q:

Do you have experience working with Hadoop?

A:

Big data technology is another rapidly growing area. Hadoop helps organizations work with massive
data sets by splitting them into smaller sets and then consolidating the results. A willingness to learn
Hadoop or existing experience may help your company use your data more efficiently.
What to look for:

 Subject matter knowledge

 Overall experience

 Desire to learn about trends and new solutions

Example:

“I have experience implementing and optimizing Hadoop solutions for enterprises. I also stay on top
of new ways to use Hadoop by participating in technical forums and a Hadoop Slack channel.

Q:

What’s your process for troubleshooting database problems?

A:

A database administrator needs a strong process for identifying and addressing issues. While
automated tools help lighten their load, you get to see their overall thought process and
troubleshooting strategy with this answer.
What to look for:

 Solid process

 Willingness to use available resources

 Experience with addressing common issues

Example:

“I use a combination of manual and proactive monitoring to keep an eye on the database servers. I
regularly check tickets to see if anyone is reporting performance issues or other concerns. When I
identify something that requires troubleshooting, I begin by diagnosing the symptoms and probable
causes. I will delegate the hands-on repair to a lower-level tech if needed, depending on my task list
and the complexity of the repair.”

Q:

Have you ever lost significant amounts of data while on the job? What was your process for handling
this?

A:

Losing company data is typically an unfortunate, but common occurrence that can happen to
database administrators. This answer should help interviewers understand how the candidate
handles this situation and if they have a process in place to successfully recover this data. Database
administrators are expected to act quickly and logically in this high-pressure situation to ensure
significant pieces of data are recovered and secured.

The candidate's answer should emphasize:

 Ability to think quickly in high-pressure situations

 A process for backing up and recovering data

 Critical thinking and problem solving skills

An answer to this question could look like this:

Example:

"I was once working on a data migration project and was in charge of conducting a test migration.
When I conducted the test, I realized that several pieces of our data were either lost or corrupted. I
decided to troubleshoot the issue to find more specific reasons this problem was occurring. I realized
that there were several outdated systems that were getting lost in the file updates. Luckily, I had
downloaded a high-quality backup program to recover these lost files and took note of this issue to
ensure the corruption and loss of these data files wouldn't take place again."

1. How would you transfer data from MySQL to Microsoft SQL Server?

This question assesses the candidate’s experience and knowledge in data migration between different
database systems.

Sample answer:

“I would use a combination of tools like SSIS (SQL Server Integration Services) and scripts to transfer
data. First, I’d analyze the schema in both databases to identify any compatibility issues. Then, I’d
proceed with the data transfer, ensuring data integrity is maintained.”

2. Would you run a test on a live database? Why or why not?

This question gauges the candidate’s understanding of best practices in database management.

Sample answer:
“No, running tests on a live database is risky and not recommended. I would use a staging
environment that mimics the live database for all testing purposes.”

3. What measurements would you take to protect our databases from external threats?

This question evaluates the candidate’s expertise in database security.

Sample answer:

“I would implement multiple layers of security such as firewalls, encryption, and regular audits. I’d
also restrict user permissions to limit data exposure.”

4. We are building a new database for our employee records. How do you define system storage
requirements?

This question tests the candidate’s ability to plan and implement new databases.

Sample answer:

“I would start by estimating the volume of data, considering growth over time. Then, I’d look into the
types of queries and transactions to determine the required performance. Based on these factors, I’d
define the storage requirements.”

5. How regularly would you perform tests to ensure data privacy?

This question assesses the candidate’s commitment to maintaining data privacy.

Sample answer:

“I would perform regular audits and tests, at least quarterly, to ensure that all security measures are
effective and up-to-date.”

6. Are you familiar with SQL? Name the most useful SQL queries and their roles.

This question assesses the candidate’s familiarity with SQL, a fundamental skill for any DBA.

Sample answer:

“Yes, I am familiar with SQL. The most useful queries include SELECT for data retrieval, INSERT for
adding new records, UPDATE for modifying existing data, and DELETE for removing records. These are
the CRUD operations essential for database management.”

7. What is the difference between navigational and relational databases?

This question tests the candidate’s understanding of different types of database models.

Sample answer:

“Navigational databases use pointers to navigate through data, while relational databases use tables
to define relationships between data. Relational databases are more flexible and easier to query.”

8. Can you provide an example of where you can or should use a foreign key?

This question evaluates the candidate’s understanding of database relationships and integrity.
Sample answer:

“A foreign key is used to establish a relationship between two tables. For example, in a database
containing ‘Employees’ and ‘Departments’ tables, the ‘DepartmentID’ in the ‘Employees’ table could
be a foreign key referencing ‘Departments.'”

9. What is the difference between T-SQL and PL/SQL?

This question gauges the candidate’s familiarity with database-specific SQL extensions.

Sample answer:

“T-SQL is an extension of SQL for Microsoft SQL Server, while PL/SQL is for Oracle databases. Both
offer procedural programming features, but they have different syntax and capabilities.”

10. How can you identify if a database server is running properly?

This question assesses the candidate’s ability to monitor and maintain database health.

Sample answer:

“I would look at several factors like CPU usage, memory usage, and query performance. Regular logs
and alerts also provide valuable information. If all these are within optimal levels, the server is likely
running properly.”

What is a DBMS, and why is it important?


▪ Differentiate between a database and a DBMS.
▪ What are the ACID properties in DBMS?
▪ What is normalisation in DBMS?
▪ Explain the different types of database models.
▪ What is a primary key and a foreign key?
▪ What is indexing in DBMS?
▪ Describe the types of joins in SQL.
▪ What is a transaction in DBMS?
▪ What are the advantages and disadvantages of using a relational database?
▪ How does a DBMS ensure data consistency?
▪ What is the purpose of the COMMIT and ROLLBACK statements?
▪ Explain the concept of data integrity.
▪ Describe the process of database backup and recovery.
▪ What is the difference between clustered and non-clustered indexes?
▪ How does a DBMS handle concurrent transactions?
▪ Explain the concept of deadlock in DBMS.
▪ Describe the concept of data warehousing.
▪ What is the difference between OLTP and OLAP?
▪ How would you optimize a database query for better performance?
▪ What is a schema in DBMS?
▪ Explain the concept of data normalisation.
▪ What is a stored procedure?
▪ How does indexing affect database performance?
▪ Describe the concept of data mining.
▪ What is the difference between a view and a table?
▪ Explain the concept of referential integrity.
▪ Describe the concept of a trigger in DBMS.
▪ What are the different types of database constraints?
▪ How would you handle data replication in a distributed database system?
▪ Explain the concept of data warehouse architecture.
▪ What is the difference between a heap and a clustered table?
▪ How does a DBMS handle security and access control?
▪ What is a deadlock, and how can it be resolved?
▪ Describe the concept of data normalisation forms (1NF, 2NF, 3NF).
▪ What is a composite key?
▪ Explain the concept of a candidate key.
▪ What is the difference between a left join and an inner join?
▪ Describe the concept of data encapsulation.
▪ What is the purpose of a database index?
▪ Explain the concept of database transaction isolation levels.
▪ What is the role of a database administrator (DBA)?
▪ How does a DBMS handle data concurrency and locking?
▪ Describe the concept of database sharding.
▪ What is the difference between a unique key and a primary key?
▪ Explain the concept of data redundancy.
▪ What is the purpose of a data dictionary?
▪ Describe the concept of database normalisation forms (BCNF, 4NF, 5NF).
▪ What is the difference between a view and a materialised view?
▪ How does a DBMS handle query optimisation?

You might also like