This document describes the structure of a "Student" database table, including column names, data types, constraints, and descriptions. It contains columns for the student's primary key ID, username, password, full name, email, phone number, address, date of birth, and role. Most columns are marked as "Not null" and the phone number column has a uniqueness constraint. It also describes the structure of a related "Teacher" table with parallel columns.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
28 views
ASM Table
This document describes the structure of a "Student" database table, including column names, data types, constraints, and descriptions. It contains columns for the student's primary key ID, username, password, full name, email, phone number, address, date of birth, and role. Most columns are marked as "Not null" and the phone number column has a uniqueness constraint. It also describes the structure of a related "Teacher" table with parallel columns.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11
Column Key/ Index/
Data Type Default Check Description
Name Constraint StudentID INT PK, Not null This column serves as the primary key (PK) for the "Student" table. It uniquely identifies each student within the system and is marked as "Not null." It is typically used as a reference for associating students with various records and activities. Username NVARCHAR(30) Not null The "Username" column stores the username of the student, represented as an NVARCHAR(30) data type. Usernames are typically used for login and user identification purposes. It's marked as "Not null," ensuring that each student has a unique username. Password NVARCHAR(30) Not null The "Password" column stores the password of the student, represented as an NVARCHAR(30) data type. Passwords are used for secure access to the system, and they should be securely hashed and stored. This column is marked as "Not null" to ensure that each student has a password. Full Name NVARCHAR(80) Not null The "Full Name" column stores the full name of the student, represented as an NVARCHAR(80) data type. It's typically used for personal identification and display purposes. It's marked as "Not null" to ensure that each student has a full name associated with their account. Email NVARCHAR(50) Not null The "Email" column stores the email address of the student, represented as an NVARCHAR(50) data type. Email addresses are used for communication and contact purposes. It's marked as "Not null" to ensure that each student has an associated email address. Phone CHAR(11) 0 to 9 Unique The "Phone Number" column stores the number phone number of the student, represented as CHAR(11). It has a check constraint to ensure that the phone number contains only digits (0 to 9). It's also marked as "Unique," meaning that each phone number must be unique within the "Student" table. This uniqueness constraint prevents multiple students from having the same phone number. Address NVARCHAR(50) Ha Noi Not null The "Address" column stores the address of the student, represented as an NVARCHAR(50) data type. It has a default value of 'Ha Noi,' which might be a default location or city. It's marked as "Not null" to ensure that each student has an associated address. DOB DATE Not null The "Address" column stores the address of the student, represented as an NVARCHAR(50) data type. It has a default value of 'Ha Noi,' which might be a default location or city. It's marked as "Not null" to ensure that each student has an associated address. Role NVARCHAR(20) Not null The "Role" column stores the role or status of the student within the educational system, represented as an NVARCHAR(20) data type. It's marked as "Not null" and is used to define the specific role or classification of the student within the institution or system. Column Key/Index/ Data Type Default Check Description Name Constraint TeacherID INT PK, Not This column serves as the primary key null (PK) for the "Teacher" table. It uniquely identifies each teacher within the system and is marked as "Not null." It is typically used as a reference for associating teachers with various records and activities. Username NVARCHAR(30) Not null The "Username" column stores the username of the teacher, represented as an NVARCHAR(30) data type. Usernames are typically used for login and user identification purposes. It's marked as "Not null," ensuring that each teacher has a unique username. Password NVARCHAR(30) Not null The "Username" column stores the username of the teacher, represented as an NVARCHAR(30) data type. Usernames are typically used for login and user identification purposes. It's marked as "Not null," ensuring that each teacher has a unique username. Full Name NVARCHAR(80) Not null The "Full Name" column stores the full name of the teacher, represented as an NVARCHAR(80) data type. It's typically used for personal identification and display purposes. It's marked as "Not null" to ensure that each teacher has a full name associated with their account. Email NVARCHAR(50) Not null The "Email" column stores the email address of the teacher, represented as an NVARCHAR(50) data type. Email addresses are used for communication and contact purposes. It's marked as "Not null" to ensure that each teacher has an associated email address. Phone CHAR(11) 0 to 9 Unique The "Phone Number" column stores number the phone number of the teacher, represented as CHAR(11). It has a check constraint to ensure that the phone number contains only digits (0 to 9). It's marked as "Unique," meaning that each phone number must be unique within the "Teacher" table. This uniqueness constraint prevents multiple teachers from having the same phone number. Address NVARCHAR(50) Ha Noi Not null The "Address" column stores the address of the teacher, represented as an NVARCHAR(50) data type. It has a default value of 'Ha Noi,' which might be a default location or city. It's marked as "Not null" to ensure that each teacher has an associated address. DOB DATE Not null The "DOB" column stores the date of birth of the teacher, represented as a Date data type. It's marked as "Not null," ensuring that each teacher has a birthdate recorded. This information can be used for various administrative and identification purposes. Role NVARCHAR(20) Not null "Role" column stores the role or position of the teacher, represented as an NVARCHAR(20) data type. It's marked as "Not null" and is used to define the specific role or responsibilities of the teacher within the educational system. Column Defaul Key/Index/ Data Type Check Description Name t Constraint Course ID INT PK This column serves as the primary key (PK) for the "Course" table, providing a unique identifier for each course within the educational system. It's marked as "Not null." Course NVARCHAR(30 Not null The "Course Name" column stores the Name ) name of the course, represented as an NVARCHAR(30) data type. It's marked as "Not null," ensuring that every course has a name. Start Date DATE Not null The "Start Date" column stores the date when the course begins, represented as a Date data type. It's marked as "Not null," ensuring that each course has a specified start date. End Date DATE Not null The "End Date" column stores the date when the course ends, represented as a Date data type. Similar to the start date, it's marked as "Not null" to ensure that every course has an end date. Course NVARCHAR(50 Not null The "Course Description" column Description ) stores a description of the course, represented as an NVARCHAR(50) data type. It's marked as "Not null," guaranteeing that each course has a description. Column Defaul Key/ Index/ Data Type Check Description Name t Constraint MaterialID INT PK, Not null This column serves as the primary key (PK) for the "Material" table, uniquely identifying each piece of educational material within the system. It's marked as "Not null." Materal NVARCHAR(30) Not null The "Material Name" column stores Name the name or title of the educational material, represented as an NVARCHAR(30) data type. It's marked as "Not null," ensuring that every piece of material has a name. Material NVARCHAR(30) Not null The "Material Description" column Description stores a description of the educational material, represented as an NVARCHAR(30) data type. It's marked as "Not null," ensuring that a description is associated with each piece of material. File Path NVARCHAR(MAX Not null The "File Path" column stores the file ) path of the material, represented as NVARCHAR(MAX). This column is used to store the location or reference to the actual file, such as a document or multimedia resource. It's marked as "Not null" to ensure that every material has an associated file path. Column Defaul Key/ Index/ Data Type Check Description Name t Constraint LessonID INT PK,Not null This column serves as the primary key (PK) for the "Lesson" table, uniquely identifying each lesson within the system. It's marked as "Not null." Lesson Title NVARCHAR(30) Not null The " Lesson Title" column stores the title or name of a lesson, represented as an NVARCHAR(30) data type. It's marked as "Not null," ensuring that every lesson has a title. Lesson NVARCHAR(50) Not null The " Lesson Content" column stores Content the content or description of the lesson, represented as an NVARCHAR(50) data type. It's marked as "Not null," guaranteeing that each lesson has content associated with it. Column Defaul Key/ Index/ Data Type Check Description Name t Constraint ExamID INT PK,Not null This column serves as the primary key (PK) for the "Exam" table, providing a unique identifier for each exam within the system. It's marked as "Not null." Exam Title NVARCHAR(30) Not null The "Exam Title" column stores the title or name of an exam, represented as an NVARCHAR(30) data type. It's marked as "Not null," ensuring that every exam has a title. Exam NVARCHAR(50) Not null The "Exam Description" column stores Description a description of the exam, represented as an NVARCHAR(50) data type. It's also marked as "Not null," guaranteeing that an exam description is associated with each exam.
Column Defaul Key/ Index/
Data Type Check Description Name t Constraint QuestionID INT PK, Not null This column serves as the primary key (PK) for the "Question" table, uniquely identifying each question within the system. It's marked as "Not null." Question NVARCHAR(50) Not null This column serves as the primary Content key (PK) for the "Question" table, uniquely identifying each question within the system. It's marked as "Not null." Answer NVARCHAR(50) A A||B||C|| Not null The "Answer" column stores the D possible answer choices for the question, with a default value of 'A'. It also has a check constraint (A|| B||C||D) to ensure that answers are 'A', 'B', 'C', or 'D'. This column is marked as "Not null." Correct Boolean A||B||C|| Not null The "Correct Answer" column stores Answer D a Boolean value indicating whether the answer is correct or not. It's marked as "Not null."
Column Key/ Index/
Data Type Default Check Description Name Constraint ExamResultI INT PK,Not null This column serves as the primary D key (PK) for the "ExamResult" table, uniquely identifying each exam result. It's marked as "Not null." Score INT 0 0-100 Not null The "Score" column stores the score achieved in an exam, with a default value of 0 so if the student did not take exam, they will mark as 0. It also has a check constraint (0-100) to ensure that scores fall within the range of 0 to 100. This column is marked as "Not null," ensuring that every exam result has a score. StudentID INT Unique The "StudentID" column stores the unique identifier of the student associated with the exam result. It's marked as "Unique," ensuring that each student's exam result is distinct. Key/ Index/ Column Name Data Type Default Check Description Constraint AssignmentID INT PK,Not null This column serves as the primary key (PK) for the "Assignment" table, uniquely identifying each assignment within the system. It's marked as "Not null," ensuring that every assignment has a unique identifier. Assignment Title NVARCHAR(30) Not null The "Assignment Title" column stores the title or name of an assignment, represented as an NVARCHAR(30) data type. It's marked as "Not null," which means that every assignment must have a title. Assignment NVARCHAR(50) Not null The "Assignment Description" Description column stores a description of the assignment, represented as an NVARCHAR(50) data type. It's also marked as "Not null," ensuring that a description is associated with each assignment. Due Date Date Not null The "Due Date" column stores the due date for the assignment and is represented as a Date data type. It's marked as "Not null," ensuring that every assignment has a specified due date. Data Defaul Key/ Index/ Column Name Check Description Type t Constraint AssignmentResultID INT PK,Not null serves as the primary key (PK) for the table, ensuring that each row has a unique identifier. It is also marked as "Not null," meaning it must always have a value and cannot be left empty. This ID is typically used to uniquely identify each assignment result within the table, allowing for efficient data retrieval and management.
Score INT 0 0-100 Not null epresents the numeric value
associated with an assignment result. It has a default value of 0, which means that if no score is explicitly provided, it is assumed to be 0. The "0- 100" check constraint ensures that scores fall within this range, which is common for grading systems. Like the AssignmentResultID, it is also marked as "Not null," meaning a score must always be assigned to an assignment result. StudentID INT Unique Store the unique identifier of the student associated with a particular assignment result. It is marked as "Unique," which enforces that each student ID must be distinct within the table. This uniqueness constraint prevents multiple assignment results from being associated with the same student. This column is essential for linking assignment results to specific students.