TUTORIAL VIDEO


INTERVIEW QUESTIONS

MySQL is an open-source relational database management system (RDBMS) that uses Structured Query Language (SQL) for managing and manipulating databases. It is widely used for web applications and supports cross-platform operations.

Advantages of MySQL include:
  • Open-source and free to use
  • High performance and scalability
  • Cross-platform support
  • Data security and support for multi-user access
  • Strong community support

A Primary Key is a unique identifier for each record in a MySQL table. It ensures that no two rows have the same value in the specified column(s), and it cannot be NULL.

Joins in MySQL are used to retrieve data from multiple tables based on a related column. Common types include:
  • INNER JOIN
  • LEFT JOIN
  • RIGHT JOIN
  • FULL JOIN

CHAR is a fixed-length data type, meaning it always reserves the specified length. VARCHAR is a variable-length data type that only uses the space needed to store the value.

A Foreign Key in MySQL is a field or set of fields in one table that uniquely identifies a row in another table. It is used to establish a relationship between two tables.

Normalization is the process of organizing a database to reduce redundancy and improve data integrity. It divides large tables into smaller ones and establishes relationships between them.

A stored procedure in MySQL is created using the CREATE PROCEDURE statement. Example:
                    DELIMITER //
                    CREATE PROCEDURE procedure_name()
                    BEGIN
                      -- SQL statements
                    END //
                    DELIMITER ;
                  

A View is a virtual table in MySQL that is based on the result of a SELECT query. It does not store data itself but provides a way to simplify complex queries.

  • DELETE: Removes rows from a table one at a time and logs each deletion. Can include a WHERE clause.
  • TRUNCATE: Removes all rows from a table without logging individual row deletions. It is faster but cannot be used with a WHERE clause.

QUIZ

1. What does SQL stand for?

Structured Query Logic
Structured Query Language
Standard Query Language

2. Which command is used to create a new table in MySQL?

INSERT
CREATE TABLE
ALTER TABLE

3. What does the WHERE clause do in a SQL query?

Sorts the data
Filters records
Groups data

4. Which MySQL data type is used to store large text?

TEXT
VARCHAR
CHAR

5. What does the PRIMARY KEY constraint do?

Uniquely identifies each row
Links two tables
Ensures a column is not NULL