What are the potential pitfalls of storing rental information directly in the 'instrumente' table in MySQL when using PHP?

Storing rental information directly in the 'instrumente' table in MySQL can lead to data redundancy and make queries more complex. It is better to create a separate table specifically for rental information and establish a relationship between the two tables using foreign keys.

// Create a separate table for rental information
CREATE TABLE rental (
    rental_id INT PRIMARY KEY,
    instrument_id INT,
    rental_date DATE,
    return_date DATE,
    rental_price DECIMAL(10,2),
    FOREIGN KEY (instrument_id) REFERENCES instrumente(instrument_id)
);

// Query to insert rental information into the 'rental' table
INSERT INTO rental (rental_id, instrument_id, rental_date, return_date, rental_price)
VALUES (1, 123, '2022-01-01', '2022-01-10', 50.00);