What are the best practices for naming database columns and designing tables to adhere to normalization rules in PHP?

When naming database columns and designing tables in PHP, it is important to follow normalization rules to ensure data integrity and reduce redundancy. To adhere to normalization rules, column names should be descriptive and follow a consistent naming convention such as snake_case or camelCase. Tables should be designed in such a way that each column represents a single piece of data, and relationships between tables should be established using foreign keys.

CREATE TABLE users (
    user_id INT PRIMARY KEY,
    username VARCHAR(50) NOT NULL,
    email VARCHAR(100) NOT NULL,
    password VARCHAR(255) NOT NULL
);

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