10 MySQL Database Interview Questions for Beginners and Intermediates

In our last article, we’ve covered 15 Basic MySQL Questions, again we are here with another set interview questions for intermediate users. As we said earlier these questions can be asked in Job Interviews. But some of our critics on the last article said, that I don’t give response to my critics and the questions are very basic and will never be asked in any Database Administrator Interview.

Mysql Job Interview Questions
10 Mysql Job Interview Questions

To them we must admit all the articles and question can not be composed keeping all the flock in mind. We are coming from basic to expert level step by step. Please Co­operate with us.

1. Define SQL?
Answer : SQL stands for Structured Query Language. SQL is a programming Language designed specially for managing data in Relational Database Management System (RDBMS).
2. What is RDBMS? Explain its features?

Answer : A Relational Database Management System (RDBMS) is the most widely used database Management System based on the Relational Database model.

Features of RDBMS
  1. Stores data in tables.
  2. Tables have rows and column.
  3. Creation and Retrieval of Table is allowed through SQL.
3. What is Data Mining?
Answer : Data Mining is a subcategory of Computer Science which aims at extraction of information from set of data and transform it into Human Readable structure, to be used later.
4. What is an ERD?
Answer : ERD stands for Entity Relationship Diagram. Entity Relationship Diagram is the graphical representation of tables, with the relationship between them.
5. What is the difference between Primary Key and Unique Key?
Answer : Both Primary and Unique Key is implemented for Uniqueness of the column. Primary Key creates a clustered index of column where as an Unique creates unclustered index of column. Moreover, Primary Key doesn’t allow NULL value, however Unique Key does allows one NULL value.
6. How to store picture file in the database. What Object type is used?
Answer : Storing Pictures in a database is a bad idea. To store picture in a database Object Type ‘Blob’ is recommended.
7. What is Data Warehousing?
Answer : A Data Warehousing generally refereed as Enterprise Data Warehousing is a central Data repository, created using different Data Sources.
8. What are indexes in a Database. What are the types of indexes?

Answer : Indexes are the quick references for fast data retrieval of data from a database. There are two different kinds of indexes.

Clustered Index
  1. Only one per table.
  2. Faster to read than non clustered as data is physically stored in index order.
Non­clustered Index
  1. Can be used many times per table.
  2. Quicker for insert and update operations than a clustered index.

 

9. How many TRIGGERS are possible in MySql?

Answer : There are only six triggers are allowed to use in MySQL database and they are.

  1. Before Insert
  2. After Insert
  3. Before Update
  4. After Update
  5. Before Delete
  6. After Delete
10. What is Heap table?
Answer : Tables that are present in the memory are called as HEAP tables. These tables are commonly known as memory tables. These memory tables never have values with data type like “BLOB” or “TEXT”. They use indexes which make them faster.

That’s all for now on MySQL questions, I will be coming up with another set of questions soon. Don’t forget to provide your valuable feedback in comment section.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Ronav Saive
A Passionate GNU/Linux Enthusiast and Software Developer with over a decade in the field of Linux and Open Source technologies.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

33 thoughts on “10 MySQL Database Interview Questions for Beginners and Intermediates”

  1. This is one of the best books in coding, by Matthew Urban: Top 30 JAVA Interview Coding Tasks (https://www.net-boss.org/shop/top-30-java-interview-coding-tasks-by-matthew-urban) and Top 30 SQL Interview Coding Tasks (https://www.net-boss.org/shop/top-30-sql-interview-coding-tasks-by-matthew-urban).

    Easy read, great tips, well explained.

    Reply
  2. My advice is also recommending Matthew Urban’s book “Top 30 JAVA Interview Coding Tasks” (https://www.net-boss.org/shop/top-30-java-interview-coding-tasks-by-matthew-urban) and “Top 30 SQL Interview Coding Tasks” (https://www.net-boss.org/shop/top-30-sql-interview-coding-tasks-by-matthew-urban). Enjoy!

    Reply
  3. The most common SQL coding interview questions are listed in Matthew Urban’s book ” TOP 30 SQL Interview Coding Tasks”. Less than 100 pages include deeply-explained, most commonly used data manipulation queries, relationships modeling, aggregation, sorting, table joins, index and other top topics to discuss during the job interview. Very well written book.

    Reply
  4. OK… a few extra questions to ask/include on MySQL interview: (especially notable for DBA/admin)

    (1) Show the total amount of storage being used by each database under MySQL… organized by owner.
    (2) List the indexes for all tables in database “Sales”… and show me any tables which do not have indexes.
    (3) If MySQL database service is Not running, where do you look for problems/errors to correct.
    (4) If MySQL is not running, how do you find disk storage used by MySQL …storage FREE/avail for MySQL?
    (5) List all active connections to running MySQL DB… and what can you know about activity…
    (6) Discuss steps to move/copy a MySQL database from ServerA to ServerB ?
    (7) Comment on setup of ServerJ and ServerK for load balancing & fail-over operation, so BOTH stay updated?
    (8) Describe steps to backup or restore data/tables/index for database “blue” with other databases still running?

    Reply
    • Every MySql interview will have certain set of tough interview questions related to select and other queries. Also they will concentrate on few important topics.

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.