What are some common pitfalls in designing database tables for PHP applications?

One common pitfall in designing database tables for PHP applications is not normalizing the data properly, leading to redundant information and potential data inconsistencies. To solve this, it's important to follow normalization principles and break down tables into smaller, more manageable entities.

CREATE TABLE users (
    id INT PRIMARY KEY,
    username VARCHAR(50) UNIQUE,
    email VARCHAR(100) UNIQUE
);

CREATE TABLE posts (
    id INT PRIMARY KEY,
    user_id INT,
    title VARCHAR(100),
    content TEXT,
    FOREIGN KEY (user_id) REFERENCES users(id)
);