Word Dbms

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Combination of more than one column can be as a primary.

there is
no requirement that a primary key have only one primary key
Database Management System
CASE STUDY
ONLINE EDUCATION SYSTEM
This ER (Entity Relationship) Diagram represents the model of Online Education System
Entity. The entity-relationship diagram of Online Education Management System shows all
the visual instrument of data base tables and the relations between Students, Fees, Course,
and Training etc. It used structure data and to define the relationships between structured
data groups of Online Education System functionalities. The main entities of the Online
Education System are Course, Students, Schedules, Fees, Durations and Training.

Online Education System entities and their attributes:

• Course Entity: Attributes of Course are course_id, course student id, course registration,
course_name, course_type, course_year, course_ description

• Students Entity: Attributes of Students are student_id, student_college_id, student_name,


student_ mobile, student_ email, student_ username, student_ password, student_address

• Schedules Entity: Attributes of Schedules are schedule_id, schedule_name,


schedule_type, schedule_ description

• Fees Entity: Attributes of Fees are course_fee_id, course_fee_course_id,


course_fee_amount, course_fee_total, course_fee_payment, course_fee_type,
course_fee_description

Durations Entity: Attributes of Durations are duration_id, duration course_id,


duration_time, duration_date, duration_type, duration_description
Training Entity: Attributes of Training are training_aid, training_student_id, training
_registration, training_name, training_type, training_year, training_description

Description of Online Education System Database:

 The details of Course is store into the Course tables respective with all tables

 Each entity (Training, Schedules, Durations, Students, Course) contains primary key
and unique keys.

 The entity Schedules, Durations has binded with Course, Students entities with
foreign key

 There are one-to-one and one-to-many relationships available between Durations,


Fees, Training, and Course

 All the entities Course, Durations, Schedules, Training are normalized and reduce
duplicacy of records

 We have implemented indexing on each table of Online Education System tables for
fast query execution.

++++++++++++++++=====================
The CREATE DATABASE statement is used to create a new SQL database.

The CREATE TABLE statement is used to create a new table in a database.

The column parameters specify the names of the columns of the table.
The datatype parameter specifies the type of data the column can hold (e.g. varchar,
integer, date, etc.).

The ALTER TABLE statement is used to add, delete, or modify columns in an existing table
The ALTER TABLE statement is also used to add and drop various constraints on an
existing table.

DESCRIBE  statement is used more to obtain information about a table structure 

The PRIMARY KEY constraint uniquely identifies each record in a table.


Primary keys must contain UNIQUE values, and cannot contain NULL values.
A table can have only ONE primary key; and in the table, this primary key can consist of
single or multiple columns (fields).

SQL NOT NULL Constraint


By default, a column can hold NULL values.
The NOT NULL constraint enforces a column to NOT accept NULL values.
This enforces a field to always contain a value, which means that you cannot insert a new
record, or update a record without adding a value to this field

MySQL uses the AUTO_INCREMENT keyword to perform an auto-increment feature.


By default, the starting value for AUTO_INCREMENT is 1, and it will increment by 1 for
each new record.
Show all data in a table. SELECT * FROM [table name];

To insert a new record into the "Student" table, we will NOT have to specify a value for
the "Studentid" column (a unique value will be added automatically):

You might also like