How can the current data structure be modified to handle multiple ratings for each comment?

The current data structure can be modified by changing the 'rating' field in the comments table to a separate ratings table that stores each rating along with the comment ID. This way, multiple ratings can be associated with each comment. The ratings table would have columns for comment_id and rating_value.

// Comments table structure
CREATE TABLE comments (
    id INT PRIMARY KEY,
    comment TEXT
);

// Ratings table structure
CREATE TABLE ratings (
    id INT PRIMARY KEY,
    comment_id INT,
    rating_value INT,
    FOREIGN KEY (comment_id) REFERENCES comments(id)
);