| Back to Questions Page |
| |
| Question |
Which storage engines support transactions in MySQL? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Berkeley DB and InnoDB.
 |
| Amith |
| |
| |
| Question |
What is ACID? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Automicity transactions are atomic and should be treated
as one in case of rollback. Consistency - the database
should be in consistent state between multiple states in
transaction.
Isolation no other queries can access the data modified by
a running transaction. Durability system crashes should not
lose the data.
 |
| Amith |
| |
| |
| Question |
What are MySQL transactions? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A set of instructions/queries that should be executed or
rolled back as a single atomic unit.
 |
| Amith |
| |
| |
|
|
| |
| Question |
Explain multi-version concurrency control in MySQL? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Each row has two additional columns associated with it -
creation time and deletion time, but instead of storing
timestamps, MySQL stores version numbers  |
| Amith |
| |
| |
| Answer | Multiversion concurrency control (abbreviated MCC or MVCC),
in the database field of computer science, is a concurrency
control method commonly used by database management systems
to provide concurrent access to the database.
MVCC provides each user connected to the database with a
"snapshot" of the database for that person to work with. Any
changes made will not be seen by other users of the database
until the transaction has been committed.  |
| Cp |
| |
| |
| Question |
Explain MySQL locks? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Table-level locks allow the user to lock the entire table,
page-level locks allow locking of certain portions of the
tables row-level locks are the most granular and allow
locking of specific rows.
 |
| Amith |
| |
| |
| Question |
Explain MySQL architecture? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The front layer takes care of network connections and
security authentications, the middle layer does the SQL
query parsing, and then the query is handled off to the
storage engine.
A storage engine could be either a default one supplied
with MySQL (MyISAM) or a commercial one supplied by a third-
party vendor (ScaleDB, InnoDB, etc.)
 |
| Amith |
| |
| |
| Question |
Explain the difference between BOOL, TINYINT and BIT? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Prior to MySQL 5.0.3: those are all synonyms. After MySQL
5.0.3: BIT data type can store 8 bytes of data and should
be used for binary data.
 |
| Amith |
| |
| |
| Question |
Explain the difference between FLOAT, DOUBLE and REAL. |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | FLOATs store floating point numbers with 8 place accuracy
and take up 4 bytes.
DOUBLEs store floating point numbers with 16 place accuracy
and take up 8 bytes.
REAL is a synonym of FLOAT for now.  |
| Amith |
| |
| |
| Question |
If you specify the data type as DECIMAL (5,2), what?s the
range of values that can go in this table? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 999.99 to -99.99. Note that with the negative number the
minus sign is considered one of the digits.
 |
| Amith |
| |
| |
| Question |
What happens if a table has one column defined as TIMESTAMP? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | That field gets the current timestamp whenever the row gets
altered.  |
| Amith |
| |
| |
| Question |
what if you really want to store the timestamp data, such
as the publication date of the article? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Create two columns of type TIMESTAMP and use the second one
for your real data.
 |
| Amith |
| |
| |
| Question |
Explain data type TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON
UPDATE CURRENT_TIMESTAMP . |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
| This Interview Question Asked @ Zensar |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The column exhibits the same behavior as a single timestamp
column in a table with no other timestamp columns.
 |
| Amith |
| |
| |
| Answer | TIMESTAMP DEFAULT :- when new row get inserted or existing
row get updated that time current timestamp get inserted.
CURRENT_TIMESTAMP :- when row get inserted that time current
timestamp get inserted. No change on update.
ON UPDATE CURRENT_TIMESTAMP :- when row get updated that
time current timestamp get inserted. On inserted default
value get inserted  |
| Prasanna Shejwal |
| |
| |
| Question |
What does TIMESTAMP ON UPDATE CURRENT_TIMESTAMP data type
do? |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | On initialization places a zero in that column, on future
updates puts the current value of the timestamp in.
 |
| Amith |
| |
| |
| Question |
Explain TIMESTAMP DEFAULT ?2006:09:02 17:38:44′ ON UPDATE
CURRENT_TIMESTAMP. |
Rank |
Answer Posted By |
|
Question Submitted By :: Amith |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A default value is used on initialization, a current
timestamp is inserted on update of the row.
 |
| Amith |
| |
| |
|
| |
|
Back to Questions Page |