0% found this document useful (0 votes)
29 views

DATABASE MANAGEMENT SYSTEM r4

The document discusses normalizing tables in an alumni information system database to third normal form. It shows the initial tables, explains the three forms of normalization, and provides the updated CREATE statements for the normalized tables, including adding primary and foreign keys.

Uploaded by

rahulsinghi063
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

DATABASE MANAGEMENT SYSTEM r4

The document discusses normalizing tables in an alumni information system database to third normal form. It shows the initial tables, explains the three forms of normalization, and provides the updated CREATE statements for the normalized tables, including adding primary and foreign keys.

Uploaded by

rahulsinghi063
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

DATABASE MANAGEMENT SYSTEM

NORMALIZATION
Alumni Information System
Pre-Existing Tables
Initial Tables
CREATE TABLE Login (

Login_ID INT NOT NULL,

Login_username VARCHAR(255),

Login_password VARCHAR(255),

PRIMARY KEY(Login_ID)

);

CREATE TABLE USER (

USER_ID INT NOT NULL,

USER_NAME VARCHAR(255),

USER_EMAIL VARCHAR(255),

USER_MOBILE INT,

USER_ADDRESS VARCHAR(255),

PRIMARY KEY(USER_ID)

);

CREATE TABLE Roles (

Role_id INT NOT NULL,

Role_Name VARCHAR(255),

Role_desc VARCHAR(255),

PRIMARY KEY(Role_id)

);

CREATE TABLE Permission (

PER_ID INT NOT NULL,

PER_NAME VARCHAR(255),

PER_MODULES VARCHAR(255),
PRIMARY KEY(PER_ID)

);

CREATE TABLE Alumni (

ALU_ID INT NOT NULL,

ALU_DESC VARCHAR(255),

ALU_TYPE VARCHAR(255),

PRIMARY KEY(ALU_ID)

);

CREATE TABLE Student (

STU_ID INT NOT NULL,

STU_NAME VARCHAR(255),

STU_EMAIL VARCHAR(255),

STU_MOBILE INT,

PRIMARY KEY(STU_ID)

);

CREATE TABLE College (

CO_ID INT NOT NULL,

CO_NAME VARCHAR(255),

CO_DESC VARCHAR(255),

PRIMARY KEY(CO_ID)

);
n
AFTER NORMALIZATION

1. First Normal Form (1NF): All tables have atomic values, meaning each
column contains only indivisible values.
2. Second Normal Form (2NF): All non-key attributes are fully functional
dependent on the primary key. In our schema, each table has a primary key,
and non-key attributes depend on it.
3. Third Normal Form (3NF): There are no transitive dependencies. Each non-
key attribute is directly dependent on the primary key. In our schema, we've
avoided transitive dependencies by splitting data into separate tables.

Here, We have introduced a new foreign key ALU_ID in the Student table to reference the
alumni to which the student belongs. This normalization ensures that the Student table is not
indirectly dependent on the Alumni table.

New CREATE Query for the Tables


CREATE TABLE Login (

Login_ID INT NOT NULL AUTO_INCREMENT,

Login_username VARCHAR(255) NOT NULL,

Login_password VARCHAR(255) NOT NULL,

PRIMARY KEY(Login_ID)

);

CREATE TABLE User (

USER_ID INT NOT NULL AUTO_INCREMENT,

Login_ID INT NOT NULL,

USER_NAME VARCHAR(255) NOT NULL,

USER_EMAIL VARCHAR(255) NOT NULL,

USER_MOBILE VARCHAR(20),

USER_ADDRESS VARCHAR(255),

PRIMARY KEY(USER_ID),

FOREIGN KEY (Login_ID) REFERENCES Login(Login_ID)

);

CREATE TABLE Roles (

Role_id INT NOT NULL AUTO_INCREMENT,

Role_Name VARCHAR(255) NOT NULL,

Role_desc VARCHAR(255),

PRIMARY KEY(Role_id)

);

CREATE TABLE Permission (

PER_ID INT NOT NULL AUTO_INCREMENT,

PER_NAME VARCHAR(255) NOT NULL,

PER_MODULES VARCHAR(255),

PRIMARY KEY(PER_ID)

);

CREATE TABLE Alumni (

ALU_ID INT NOT NULL AUTO_INCREMENT,


ALU_DESC VARCHAR(255),

ALU_TYPE VARCHAR(255),

PRIMARY KEY(ALU_ID)

);

CREATE TABLE Student (

STU_ID INT NOT NULL AUTO_INCREMENT,

USER_ID INT NOT NULL,

ALU_ID INT NOT NULL,

STU_NAME VARCHAR(255) NOT NULL,

STU_EMAIL VARCHAR(255) NOT NULL,

STU_MOBILE VARCHAR(20),

PRIMARY KEY(STU_ID),

FOREIGN KEY (USER_ID) REFERENCES User(USER_ID),

FOREIGN KEY (ALU_ID) REFERENCES Alumni(ALU_ID)

);

CREATE TABLE College (

CO_ID INT NOT NULL AUTO_INCREMENT,

CO_NAME VARCHAR(255) NOT NULL,

CO_DESC VARCHAR(255),

PRIMARY KEY(CO_ID)

);

You might also like