Monday, February 6, 2012

Some PHP MYSQL QuestionAnswer


Chapter 36:

1. Q. What is full-text index? Why it is used?
Answer: Full text indexes offer an efficient means for searching text stored in CHAR, VARCHAR, or TEXT data type.

Q. Why it is used?
Answer:  It is used to provide a mechanism for retrieving data that produces results that best fit the user’s desired result.

2. Q. What is the difference between primary and unique key?
 Answer: The primary key index is the most common type of index found in relational databases. A primary key value cannot be NULL.
A unique index prevents duplicate values from being created. So NULL can be a unique key.

3.  Q. What are the advantages of database indexing?
Answer:  There are three advantages of database indexing.
a.       Query optimization:
b.      Uniqueness:
c.       Text searching:


Chapter 30:
1.  Q. What is the difference between fetch_row () and fetch_array()?

Answer:  The fetch_row () fetches one row of data from the result associated with the specified result identifier.

The fetch_array() method is actually capable of retrieve  each row of the result set as an associative array, numerically indexed or both.

2.  Q. What is prepared statement?
Answer:  Repeatedly execute a query,  with each iteration using different parameters.  

No comments:

Post a Comment