How can one design a relational database structure in PHP to efficiently store survey participation data for multiple surveys without creating multiple columns for each survey?

To efficiently store survey participation data for multiple surveys without creating multiple columns for each survey, you can create a separate table to store the survey responses with a foreign key referencing the survey ID. This way, you can store responses for different surveys in a single table without the need for additional columns.

CREATE TABLE surveys (
    id INT PRIMARY KEY,
    name VARCHAR(255)
);

CREATE TABLE survey_responses (
    id INT PRIMARY KEY,
    survey_id INT,
    participant_id INT,
    response TEXT,
    FOREIGN KEY (survey_id) REFERENCES surveys(id)
);