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

The Way To UPSC

Uploaded by

apophysis6
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)
8 views6 pages

The Way To UPSC

Uploaded by

apophysis6
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
You are on page 1/ 6

‭Stupoid‬

‭ reating a database for‬‭UPSC preparation‬‭management‬‭can involve‬‭organizing tables to track‬


C
‭various aspects such as subjects, topics, notes, test schedules, and progress. Here's an‬
‭example of how you can structure a relational database for this purpose, designed using SQL.‬

‭1. Database Schema‬

‭CREATE DATABASE UPSC_Preparation;‬

‭USE UPSC_Preparation;‬

‭-- Table for Subjects‬

‭CREATE TABLE Subjects (‬

‭SubjectID INT AUTO_INCREMENT PRIMARY KEY,‬

‭SubjectName VARCHAR(255) NOT NULL,‬

‭Description TEXT‬

‭);‬

‭-- Table for Topics‬

‭CREATE TABLE Topics (‬

‭TopicID INT AUTO_INCREMENT PRIMARY KEY,‬

‭SubjectID INT,‬

‭TopicName VARCHAR(255) NOT NULL,‬

‭ImportanceLevel ENUM('Low', 'Medium', 'High') DEFAULT 'Medium',‬

‭Notes TEXT,‬

‭FOREIGN KEY (SubjectID) REFERENCES Subjects(SubjectID)‬

‭);‬
‭-- Table for Study Schedule‬

‭CREATE TABLE StudySchedule (‬

‭ScheduleID INT AUTO_INCREMENT PRIMARY KEY,‬

‭TopicID INT,‬

‭ScheduledDate DATE NOT NULL,‬

‭Status ENUM('Pending', 'Completed', 'In Progress') DEFAULT 'Pending',‬

‭FOREIGN KEY (TopicID) REFERENCES Topics(TopicID)‬

‭);‬

‭-- Table for Test Schedule‬

‭CREATE TABLE TestSchedule (‬

‭TestID INT AUTO_INCREMENT PRIMARY KEY,‬

‭TestName VARCHAR(255) NOT NULL,‬

‭ScheduledDate DATE NOT NULL,‬

‭Duration INT, -- Duration in minutes‬

‭TopicsCovered TEXT,‬

‭Status ENUM('Pending', 'Completed') DEFAULT 'Pending'‬

‭);‬

‭-- Table for Notes‬

‭CREATE TABLE Notes (‬

‭NoteID INT AUTO_INCREMENT PRIMARY KEY,‬

‭TopicID INT,‬
‭NoteContent TEXT,‬

‭CreatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,‬

‭FOREIGN KEY (TopicID) REFERENCES Topics(TopicID)‬

‭);‬

‭-- Table for Reminders‬

‭CREATE TABLE Reminders (‬

‭ReminderID INT AUTO_INCREMENT PRIMARY KEY,‬

‭ReminderText VARCHAR(255) NOT NULL,‬

‭ReminderDate DATE NOT NULL,‬

‭Status ENUM('Pending', 'Done') DEFAULT 'Pending'‬

‭);‬

‭2. Explanation of Tables‬

‭1.‬ ‭Subjects‬‭: Contains the list of subjects like History,‬‭Geography, Polity, etc.‬

1, 'History', 'Covers ancient, medieval,‬‭


‭○‬ ‭Example:‬‭ and modern‬
history.'‬

Subjects‬
‭2.‬ ‭Topics‬‭: Linked to‬‭ ‭, this table tracks specific‬‭topics under each subject.‬

1, 1, 'Indus Valley Civilization', 'High',‬‭


‭○‬ ‭Example:‬‭ 'Read‬
‭CERT.'‬
N
‭3.‬ ‭StudySchedule‬‭: Tracks the planned schedule for studying‬‭topics, with their current‬
‭status.‬

1, 2, '2024-12-01', 'Pending'‬
‭ ‬ ‭Example:‬‭

‭4.‬ ‭TestSchedule‬‭: Tracks test dates, topics covered in‬‭tests, and completion status.‬

1, 'Mock Test 1', '2024-12-10', 120, 'History,‬


‭○‬ ‭Example:‬‭
Polity', 'Pending'‬

Topics‬
‭5.‬ ‭Notes‬‭: Stores notes for specific topics, linked to‬‭ ‭.‬

1, 2, 'Indus Valley Civilization was urban‬‭


‭○‬ ‭Example:‬‭ with‬
‭dvanced drainage systems.'‬
a
‭6.‬ ‭Reminders‬‭: Stores reminders for deadlines, test dates,‬‭or tasks.‬

1, 'Complete History Revision', '2024-11-30',‬


‭○‬ ‭Example:‬‭
'Pending'‬

‭3. Sample Data Population‬

‭-- Insert Subjects‬

‭INSERT INTO Subjects (SubjectName, Description)‬

‭VALUES‬

‭('History', 'Covers ancient, medieval, and modern history.'),‬

‭('Geography', 'Includes physical, human, and economic geography.');‬

‭-- Insert Topics‬

‭INSERT INTO Topics (SubjectID, TopicName, ImportanceLevel, Notes)‬

‭VALUES‬

‭(1, 'Indus Valley Civilization', 'High', 'Read NCERT Ancient History.'),‬

‭(1, 'Mauryan Empire', 'Medium', 'Focus on Ashoka and administration.'),‬

‭(2, 'Monsoons in India', 'High', 'Understand mechanism and impacts.');‬

‭-- Insert Study Schedule‬

‭INSERT INTO StudySchedule (TopicID, ScheduledDate, Status)‬

‭VALUES‬

‭(1, '2024-11-28', 'Pending'),‬

‭(2, '2024-11-30', 'Pending');‬


‭-- Insert Test Schedule‬

‭INSERT INTO TestSchedule (TestName, ScheduledDate, Duration, TopicsCovered, Status)‬

‭VALUES‬

‭('History Mock Test 1', '2024-12-05', 120, 'Indus Valley, Mauryan Empire', 'Pending');‬

‭-- Insert Notes‬

‭INSERT INTO Notes (TopicID, NoteContent)‬

‭VALUES‬

‭(1, 'Harappan civilization had a planned grid system with advanced drainage.');‬

‭-- Insert Reminders‬

‭INSERT INTO Reminders (ReminderText, ReminderDate, Status)‬

‭VALUES‬

‭('Revise Indus Valley Civilization', '2024-11-27', 'Pending');‬

‭4. Usage‬

‭●‬ F Subjects‬‭and‬‭
‭ or Subject-wise Tracking‬‭: Use the‬‭ Topics‬‭tables to manage your‬
‭preparation material.‬
‭●‬ ‭For Scheduling‬‭: Use‬‭ StudySchedule‬‭and‬‭
TestSchedule‬‭for planning and tracking.‬
Notes‬‭to save important points related‬‭to topics.‬
‭●‬ ‭For Notes‬‭: Use‬‭
Reminders‬‭for setting up alerts.‬
‭●‬ ‭For Reminders‬‭: Use‬‭

‭5. Query Examples‬

‭Get all topics under History‬‭:‬

‭SELECT TopicName, ImportanceLevel FROM Topics‬


‭WHERE SubjectID = (SELECT SubjectID FROM Subjects WHERE SubjectName = 'History');‬

‭1.‬

‭View all pending reminders‬‭:‬

‭SELECT ReminderText, ReminderDate FROM Reminders WHERE Status = 'Pending';‬

‭2.‬

‭Check today's study schedule‬‭:‬

‭SELECT TopicName FROM Topics‬

‭JOIN StudySchedule ON Topics.TopicID = StudySchedule.TopicID‬

‭WHERE ScheduledDate = CURDATE();‬

‭3.‬

‭ ou can implement this database using MySQL or any other relational database. Expand it as‬
Y
‭needed for more functionalities like progress tracking or integration with a frontend for better‬
‭user interaction.‬

You might also like