0% found this document useful (0 votes)
137 views3 pages

Blog Management System

This document outlines a blog management system that will involve managing blog posts, categories, authors, and user comments. It defines tables for users, roles, authors, categories, posts, and comments and describes the one-to-many relationships between them, such as a user having one role but a role being associated with multiple users.

Uploaded by

shahzenk771
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views3 pages

Blog Management System

This document outlines a blog management system that will involve managing blog posts, categories, authors, and user comments. It defines tables for users, roles, authors, categories, posts, and comments and describes the one-to-many relationships between them, such as a user having one role but a role being associated with multiple users.

Uploaded by

shahzenk771
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Blog Management System

Blog Management System. This system will involve managing


blog posts, categories, authors, and user comments.

User Table:
 user_id (Primary Key)
 username
 password (hashed and salted)
 email
 role_id (Foreign Key referencing Role Table)

Role Table:
 role_id (Primary Key)
 role_name (e.g., Admin, Author, Reader)

Author Table:
 author_id (Primary Key)
 user_id (Foreign Key referencing User Table)
 bio
Category Table:
 category_id (Primary Key)
 category_name

Post Table:
 post_id (Primary Key)
 title
 content
 author_id (Foreign Key referencing Author Table)
 category_id (Foreign Key referencing Category Table)
 publish_date
 status (e.g., draft, published)

Comment Table:
 comment_id (Primary Key)
 user_id (Foreign Key referencing User Table)
 post_id (Foreign Key referencing Post Table)
 comment_date
 comment_text

Relationships to be defined as:

 A User can have one Role, but a Role can be associated


with multiple Users. (One-to-Many relationship between
Role and User)
 An Author is associated with one User, but a User can be
associated with multiple Authors (e.g., if a user writes
under different pen names). (One-to-Many relationship
between User and Author)

 An Author can have multiple Posts, but each Post is


written by one Author. (One-to-Many relationship
between Author and Post)

 A Category can have multiple Posts, and a Post can


belong to one Category. (One-to-Many relationship
between Category and Post)

 A Post can have multiple Comments, and a Comment is


associated with one Post. (One-to-Many relationship
between Post and Comment)

You might also like