PHP Interview Questions
There is given PHP interview questions and answers that have been asked in many companies. Let's see the list of top PHP interview questions.
How can we repair a MySQL table?
We can use REPAIR command to repair a table. The REPAIR command will repair the table specified.
The syntex for repairing a mysql table is:REPAIR TABLE tablename REPAIR TABLE tablename QUICK REPAIR TABLE tablename EXTENDED
If QUICK is given, MySQL will do a repair of only the index tree.
If EXTENDED is given, it will create index row by row.
.What are the types of TEXT in MySQL?
- TEXT
- TINY TEXT
- MEDIUM TEXT
- LONGTEXT
What are the types of Blob?
- BLOB
- TINYBLOB
- LONGBLOB
- MEDIUMBLOB
What is a TEXT and Blob in MySQL?
Blob: It is the acronym of the large binary object. It is used in holding the amount of variable data.
Text: It is the case-sensitive Blob. Text values are not binary strings. It has a character set, values stored and compared to based on the relation of a character set.
.What are the various types of triggers that are possible in MySQL?
- Before Insert
- After Insert
- Before Delete
- After Delete
- Before Update
- After Update
Mention technical specifications of MySQL?
- Drivers
- JSON Support
- Graphical Tools
- Flexible structure
- High performance
- Geo-Spatial Support
- OLTP and Transactions
- MySQL Enterprise Monitor
- MySQL Enterprise Security
- Manageable and easy to use
- Replication & High-Availability
- Manageability and Ease of Use
- Replication and high availability
- Security and storage management
What is the Language MySQL is been written with?
- MySQL – C, C++
- SQL parser – Yacc.
What is the default port number of MySQL?
The default port number of MySQL is 3306.
.What are the tables in MySQL? Explain the types.
This is a must-know MySQL interview question. Let’s see the answer-
MySQL stores everything in logical tables. Tables can be thought of as the core storage structure of MySQL. And hence tables are also known as storage engines. Here are the storage engines provided by MySQL:
- MyISAM – MyISAM is the default storage engine for MySQL. It extends the former ISAM storage engine. MyISAM offers big storage, up to 256TB! The tables can also be compressed to get extra storage. MyISAM tables are not transaction-safe.
- MERGE – A MERGE table is a virtual table that consolidates different MyISAM tables that have a comparable structure to one table. MERGE tables use the indexes of the base tables, as they do not have indexes of their own.
- ARCHIVE – As the name suggests, Archive helps in archiving the tables by compressing them, in-turn reducing the storage space. Hence, you can store a lot of records with the Archive. It uses the compression-decompression procedure while writing and reading the table records. It is done using the Zlib library.
- CSV – This is more like a storage format. CSV engine stores the values in the Comma-separated values (CSV) format. This engine makes it easier to migrate the tables into a non-SQL pipeline.
- InnoDB – InnoDB is the most optimal while choosing an engine to drive performance. InnoDB is a transaction-safe engine. Hence it is ACID-compliant and can efficiently restore your database to the most stable state in case of a crash.
- Memory – Memory tables were formerly known as HEAP. With memory tables, there can be a performance boost as the tables are stored in the memory. But it does not work with large data tables due to the same reason.
- Federated – Federated tables allow accessing remote MySQL server tables. It can be done without any third-party integration or cluster technology.
Why MySQL is used?
MySQL database server is reliable, fast and very easy to use. This software can be downloaded as freeware and can be downloaded from the internet..