0% found this document useful (0 votes)
12 views2 pages

Goal Study Database Schema

The document defines three SQL tables: GoalStudy, GoalStudyDaily, and ActualStudyDaily, each with various fields for tracking educational goals and daily study activities. The tables include primary keys, unique constraints, and fields for user and date tracking, along with flags for deletion. These structures are designed to facilitate the management of student learning progress and associated materials.

Uploaded by

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

Goal Study Database Schema

The document defines three SQL tables: GoalStudy, GoalStudyDaily, and ActualStudyDaily, each with various fields for tracking educational goals and daily study activities. The tables include primary keys, unique constraints, and fields for user and date tracking, along with flags for deletion. These structures are designed to facilitate the management of student learning progress and associated materials.

Uploaded by

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

CREATE TABLE GoalStudy (

Id NVARCHAR(50) PRIMARY KEY,


GoalStudyId NVARCHAR(50) NOT NULL UNIQUE,
TeacherId NVARCHAR(50) NOT NULL,
StudentId NVARCHAR(50) NOT NULL,
LessonId NVARCHAR(50) NOT NULL,
LessonTopicID NVARCHAR(50) NOT NULL,
GoalStudyStartDate DATE NOT NULL,
GoalStudyEndDate DATE NOT NULL,
GoalStudyDescription NVARCHAR(100),
CreatedUserId NVARCHAR(50),
CreatedDateUTC datetime2(7),
UpdatedUserId NVARCHAR(50),
UpdatedDateUTC datetime2(7),
DeletedUserId NVARCHAR(50),
DeletedDateUTC datetime2(7),
IsDeleted BIT DEFAULT 0,
CONSTRAINT UQ_GoalStudy_Composite UNIQUE
(StudentId, LessonId, LessonTopicID, GoalStudyStartDate, GoalStudyEndDate)
);

CREATE TABLE GoalStudyDaily (


Id NVARCHAR(50) PRIMARY KEY,
GoalStudyDailyId NVARCHAR(50) NOT NULL UNIQUE,
GoalStudyId NVARCHAR(50) NOT NULL,
StudyMaterialId NVARCHAR(50) NOT NULL,
GoalStudyDate DATE NOT NULL,
GoalStudyPlannedAmount int NOT NULL,
GoalStudyPlannedPages NVARCHAR(100) NOT NULL,
GoalStudyDailyDescription NVARCHAR(100),
CreatedUserId NVARCHAR(50),
CreatedDateUTC datetime2(7),
UpdatedUserId NVARCHAR(50),
UpdatedDateUTC datetime2(7),
DeletedUserId NVARCHAR(50),
DeletedDateUTC datetime2(7),
IsDeleted BIT DEFAULT 0
);

CREATE TABLE ActualStudyDaily (


Id NVARCHAR(50) PRIMARY KEY,
ActualStudyDailyId NVARCHAR(50) NOT NULL UNIQUE,
StudentId NVARCHAR(50) NOT NULL,
LessonId NVARCHAR(50) NOT NULL,
LessonTopicID NVARCHAR(50) NOT NULL,
StudyMaterialId NVARCHAR(50) NOT NULL,
GoalStudyId NVARCHAR(50) NULLABLE,
ActualStudyDate DATE NOT NULL,
ActualStudyCompletedAmount int NOT NULL,
ActualStudyCompletedPages NVARCHAR(100) NOT NULL,
ActualStudyErrorAmount int NOT NULL,
ActualStudyUnclearAmount int NOT NULL,
ActualStudyDailyDescription NVARCHAR(100),
CreatedUserId NVARCHAR(50),
CreatedDateUTC datetime2(7),
UpdatedUserId NVARCHAR(50),
UpdatedDateUTC datetime2(7),
DeletedUserId NVARCHAR(50),
DeletedDateUTC datetime2(7),
IsDeleted BIT DEFAULT 0
);

You might also like