Oracle Database Interview Questions & Answers Set-16

«« Previous
Next »»

1. What is MySQL?
Ans: MySQL is a multithreaded, multi-user SQL database management system which has more than 11 million installations. This is the world's second most popular and widely used open source database.

2. In which language MySQL is written?
Ans: MySQL is written in C and C++ and its SQL parser is written in yacc.

3. What are the technical specification of MySQL?
Ans: MySQL has the following technical specifications -
  • Flexible structure
  • High performance
  • Manageable and easy to use
  • Replication and high availability
  • Security and storage management

4. How many Triggers are possible in MySQL?
Ans: There are only six Triggers allowed to use in MySQL database.
  1. Before Insert
  2. After Insert
  3. Before Update
  4. After Update
  5. Before Delete
  6. After Delete

5. What is heap table?
Ans: Tables that are present in memory is known as HEAP tables. When you create a heap table in MySQL, you should need to specify the TYPE as HEAP. These tables are commonly known as memory tables. They are used for high speed storage on temporary basis. They do not allow BLOB or TEXT fields.

6. What is BLOB and TEXT in MySQL?
Ans: BLOB is an acronym stands for binary large object. It is used to hold a variable amount of data.

There are four types of BLOB.
  2. BLOB

The differences among all these are the maximum length of values they can hold.

TEXT is case-insensitive BLOB. TEXT values are non-binary strings (character string). They have a character set and values are stored and compared based on the collation of the character set.

There are four types of TEXT.
  2. TEXT

7. What is a trigger in MySQL?
Ans: A trigger is a set of codes that executes in response to some events.

8. What is the difference between heap table and temporary table?
Heap tables:

Heap tables are found in memory. They are used for high speed storage on temporary basis. They do not allow BLOB or TEXT fields.
Heap tables do not support AUTO_INCREMENT.
Indexes should be NOT NULL.

Temporary tables:

The temporary tables are used to keep the temporary data. Sometimes it is very useful in cases to keep temporary data. Temporary table is deleted after current client session terminates.

Main differences:

The heap tables are shared among clients while temporary tables are not shared.
Heap tables are just another storage engine, while for temporary tables you need a special privilege (create temporary table).

9. What is the difference between FLOAT and DOUBLE?
Ans: FLOAT stores floating point numbers with accuracy up to 8 places and allocates 4 bytes, on the other hand DOUBLE stores floating point numbers with accuracy up to 18 places and allocates 8 bytes.

10. What are the advantages of MySQL in comparison to Oracle?
  1. MySQL is a free, fast, reliable, open source relational database while Oracle is expensive, although they have provided Oracle free edition to attract MySQL users.
  2. MySQL uses only just under 1 MB of RAM on your laptop while Oracle 9i installation uses 128 MB.
  3. MySQL is great for database enabled websites while Oracle is made for enterprises.
  4. MySQL is portable.

11. What are the disadvantages of MySQL?
  1. MySQL is not so efficient for large scale databases.
  2. It does not support COMMIT and STORED PROCEDURES functions version less than 5.0.
  3. Transactions are not handled very efficiently.

12. What is the difference between CHAR and VARCHAR?
1) CHAR and VARCHAR are differ in storage and retrieval.
2) CHAR column length is fixed while VARCHAR length is variable.
3) The maximum no. of character CHAR data type can hold is 255 character while VARCHAR can hold up to 4000 character.
4) CHAR is 50% faster than VARCHAR.
5) CHAR uses static memory allocation while VARCHAR uses dynamic memory allocation.

13. What is the difference between MySQL_connect and MySQL_pconnect?
  1. It opens a new connection to the database.
  2. Every time you need to open and close database connection, depending on the request.
  3. Opens page every time when it loaded.

  1. In Mysql_pconnect, "p" stands for persistent connection so it opens the persistent connection.
  2. the database connection can not be closed.
  3. it is more useful if your site has more traffic because there is no need to open and close connection frequently and every time when page is loaded.

14. What does " i_am_a_dummy flag" do in MySQL?
Ans: The " i_am_a_dummy flag" enables MySQL engine to refuse any UPDATE or DELETE statement to execute if the WHERE clause is not present.

15. How to get the current date in MySQL?
Ans: To get current date, use the following syntax:


«« Previous
Next »»