0% found this document useful (0 votes)
63 views6 pages

LMS MySQL Database Schema Filtered

The document outlines the MySQL database schema for a Learning Management System (LMS), detailing various tables including course categories, courses, videos, chapters, contents, exams, and users such as students and instructors. Each table includes specific columns with data types and constraints, such as primary keys, unique constraints, and default values. The schema supports functionalities like course management, user enrollment, transactions, and notifications.

Uploaded by

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

LMS MySQL Database Schema Filtered

The document outlines the MySQL database schema for a Learning Management System (LMS), detailing various tables including course categories, courses, videos, chapters, contents, exams, and users such as students and instructors. Each table includes specific columns with data types and constraints, such as primary keys, unique constraints, and default values. The schema supports functionalities like course management, user enrollment, transactions, and notifications.

Uploaded by

Shiv Rami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LMS MySQL Database Schema

Table: course_category
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

thumbnail VARCHAR(255)

title VARCHAR(100)

featured BOOLEAN

color VARCHAR(50)

status ENUM('Active', 'Inactive') DEFAULT 'Active'

Table: courses
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

course_id VARCHAR(100) UNIQUE

title VARCHAR(255)

free_publish BOOLEAN

price DECIMAL(10,2)

instructor_id INT

category_id INT

status ENUM('Published', 'Draft', 'Archived')


DEFAULT 'Draft'

Table: course_videos
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

course_id INT

file_type ENUM('Video', 'Audio', 'Document', 'Image')


category_name VARCHAR(100)

regular_price DECIMAL(10,2) DEFAULT 0

offer_price DECIMAL(10,2) DEFAULT 0

title VARCHAR(255)

description TEXT

Table: chapters
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

course_id INT

chapter_title VARCHAR(255)

sequence INT

content_count INT

Table: contents
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

chapter_id INT

title VARCHAR(255)

sequence INT

file_type ENUM('Video', 'Audio', 'Document', 'Image')

upload_option ENUM('Upload', 'Cloud Link')

is_free BOOLEAN

Table: exams
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

course_id INT
title VARCHAR(255)

duration_minutes INT

marks_per_question INT

pass_marks INT

Table: exam_questions
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

exam_id INT

question_type ENUM('MCQ', 'True/False')

question_title TEXT

correct_answer BOOLEAN

Table: exam_options
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

question_id INT

option_text VARCHAR(255)

is_correct BOOLEAN

Table: coupons
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

code VARCHAR(50) UNIQUE

discount DECIMAL(5,2)

expiry_date DATE

status ENUM('Active', 'Expired') DEFAULT 'Active'


Table: enrollments
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

student_id INT

course_id INT

enrollment_date DATETIME

status ENUM('Active', 'Completed', 'Cancelled')


DEFAULT 'Active'

Table: students
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

name VARCHAR(100)

email VARCHAR(100) UNIQUE

phone VARCHAR(20)

password VARCHAR(255)

status ENUM('Active', 'Inactive') DEFAULT 'Active'

Table: instructors
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

name VARCHAR(100)

email VARCHAR(100) UNIQUE

phone VARCHAR(20)

title VARCHAR(100)

profile_picture VARCHAR(255)

about TEXT

password VARCHAR(255)
is_featured BOOLEAN DEFAULT FALSE

status ENUM('Active', 'Inactive') DEFAULT 'Active'

Table: transactions
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

user_id INT

course_id INT

amount DECIMAL(10,2)

payment_method VARCHAR(50)

transaction_date DATETIME

Table: invoices
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

student_id INT

course_id INT

amount DECIMAL(10,2)

invoice_date DATE

status ENUM('Paid', 'Unpaid') DEFAULT 'Unpaid'

Table: notifications
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

message TEXT

target_role ENUM('Admin', 'Instructor', 'Student')

created_at TIMESTAMP DEFAULT


CURRENT_TIMESTAMP
Table: settings
Column Name Data Type

id INT AUTO_INCREMENT PRIMARY KEY

setting_name VARCHAR(100)

value TEXT

You might also like