ATTENDANCE MANAGEMENT SYSTEM 1| Page ATTENDANCE MANAGEMENT SYSTEM The mini project report submitted in partial fulfillment Of the requirements for the award of B.Tech Degree IN COMPUTER SCIENCE AND ENGINEERING By S.M.N.PRANATHI 690752090 SHAIK ABDUL SHAJAHAN BASHA 690752093 P.JANAKI RAMI REDDY 690752082 T.SANKAR 690752102 Under the esteemed guidance of Ms.A.Kavitha Asst.Professor Department of C.S.E DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING ANIL NEERUKONDA INSTITUTE OF TECHNOLOGY & SCIENCES SANGIVASALA, VISAKHAPATNAM – 530003 2010-2011
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ATTENDANCE MANAGEMENT SYSTEM
1 | P a g e
ATTENDANCE MANAGEMENT SYSTEMThe mini project report submitted in partial fulfillment Of the requirements for the award of B.Tech Degree
3.1 ENTITY RELATIONSHIP MODEL 103.2 IDENTIFICATION OF ENTITIES 143.3 IDENTIFICATION OF RELATIONS 173.4 COMPLETE E-R DIAGRAM 20
4. LOGICAL SCHEMA GENERATION 21
4.1 REPRESENTATION OF ENTITIES INTO TABLES 22
5. RELATIONAL SCHEMA DESIGN 24
5.1 ORACLE 255.2 CODE GENERATED FOR THE PROPOSED PROJECT USING SQL 265.3 TABLES CREATED 29
6. SCHEMA REFINEMENT 30
6.1 NORMALIZATION 35
7. SNAPSHOTS OF TABLES WITH VALID DATA ENTRIES 45
8. QUERIES 49
9. CONCLUSION 54
10. BIBILOGRAPHY 55
ATTENDANCE MANAGEMENT SYSTEM
5 | P a g e
ABSTRACT
Attendance Management System is software developed for daily student attendance in schools, colleges
and institutes. If facilitates to access the attendance information of a particular student in a particular
class. The information is sorted by the operators, which will be provided by the teacher for a particular
class. This system will also help in evaluating attendance eligibility criteria of a student.
In the present system all work is done on paper. The whole session attendance is stored in register and at
the end of the session the reports are generated and the students who don’t have 75% attendance get a
notice.
The existing system is not user friendly because the retrieval of data is very slow and data is not
maintained efficiently. We require more calculations to generate the report so it is generated at the end of
the session. And the students not get a single chance to improve their attendance. All calculations to
generate report are done manually so there is greater chance of errors. Existing system requires lot of
paper work. Loss of even a single register/record led to difficult situation because all the papers are
needed to generate the reports. Every work is done manually so we cannot generate report in the middle
of the session or as per the requirement because it is very time consuming.
The proposed system is user friendly because the retrieval and storing of data is fast and data is
maintained efficiently. Moreover the graphical user interface is provided in the proposed system, which
provides user to deal with the system very easily. Reports can be easily generated in the proposed system
so user can generate there port as per the requirement (monthly) or in the middle of the session. User can
give the notice to the students so he/she become regular.
ATTENDANCE MANAGEMENT SYSTEM
6 | P a g e
SYSTEM
REQUIREMENT
SPECIFICATION
ATTENDANCE MANAGEMENT SYSTEM
7 | P a g e
2.1 INTRODUCTION:
2.1.1 PURPOSE:
Attendance Management System is softwaredeveloped for daily student attendance in schools,
collegesand institutes. If facilitates to access the attendanceinformation of a particular student in a
particular class. Theinformation is sorted by the operators, which will be providedby the teacher for a
particular class. This system will alsohelp in evaluating attendance eligibility criteria of a student.The
purpose of developing attendancemanagement system is to computerized the tradition way oftaking
attendance. Another purpose for developing thissoftware is to generate the report automatically at the end
ofthe session or in the between of the session.
2.1.2 SCOPE:
The scope of the project is the system on whichthe software is installed, i.e. the project is developed as a
database design from which we can retrieve information about attendance, and it will work for a
particular institute.But later on the project can be modified to operate it online.
2.1.3 LIFE TIME:
This product works until the software used is in existence.
2.1.4 SUCCESS CRITERIA:
As we are using current trends of software, the product runs successfully.
2.2 FUNCTIONAL REQUIREMENTS:
Attendance management system requires the following information to maintain attendance of
each student.
1. First the respective students from each class of particular department are identified.
2. Each faculty member is assigned a single subject for particular batch.
3. Each student is enrolled for a particular course and the subjects of that course are identified.
4. Whenever student attends class of particular subject, the corresponding faculty member
should allot him attendance and update his status in attendance table.
ATTENDANCE MANAGEMENT SYSTEM
8 | P a g e
5. The attendance of each student is calculated as ratio of number of classes attended to total
number of classes.
2.3 NON-FUNCTIONAL REQUIREMENTS:
2.3.1 USABILITY:
The product could be used by two categories of people: faculty members and students. Apart from them administrator also could use it.
2.3.2 RELIABILITY:
Users can perform the operations without any constraints regarding the outcome of operation. The product as a whole is highly reliable.
2.3.3 PERFORMANCE:
It provides users with access to information based on the type of users i.e. , student, faculty and to which department they belong. It provides fast access to all the data and transactions requested thereby providing a high degree of performance and throughput.
2.3.4 SUPPORTABILITY:
All kinds of information which can be supported in the database are supported by the system and the application supports the utilities of the system over which it is deployed.
2.4 HARDWARE REQUIREMENT SPECIFICATION:
Processor: Intel Pentium III or aboveHard Disk: 30GB or aboveRAM: 256MB or above
2.5 SOFTWARE REQUIREMENT SPECIFICATION:
Database support (for back end): oracle 8i or 9i or 10g
ATTENDANCE MANAGEMENT SYSTEM
9 | P a g e
CONCEPTUAL
SCHEMA DESIGN
ATTENDANCE MANAGEMENT SYSTEM
10 | P a g e
3.1 ENTITY RELATIONSHIP MODEL:
An entity-relationship model (ERM) is an abstract and conceptual representation of data. Entity-
relationship modeling is a database modeling method, used to produce a type of conceptual
schema or semantic data model of a system, often a relational database, and its requirements in a down
fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams,
or ERDs.
COMPONENTS:
ENTITY:
An entity may be defined as a thing which is recognized as being capable of an independent
existence and which can be uniquely identified. An entity is an abstraction from the complexities of some
domain. When we speak of an entity we normally speak of some aspect of the real world which can be
distinguished from other aspects of the real world.
An entity may be a physical object such as a house or a car, an event such as a house sale or
a car service, or a concept such as a customer transaction or order. Although the term entity is the one
most commonly used, following Chen we should really distinguish between an entity and an entity-type.
An entity-type is a category. An entity, strictly speaking, is an instance of a given entity-type. There are
usually many instances of an entity-type. Because the term entity-type is somewhat cumbersome, most
people tend to use the term entity as a synonym for this term.
Entities can be thought of as nouns. Examples: a computer, an employee, a song, a
mathematical theorem.
REPRESENTATION:
Entities are drawn as rectangles
EXAMPLE:
Or
ATTRIBUTES:
An entity is described using a set of attributes. All entities in a given entity set have the same attributes; this is known as similar type. Our choice of attributes reflects the level of detail at which we wish to represent information about entities. For example, company entity set could use company_id, company_name for each company.
JOB COMPANY
ATTENDANCE MANAGEMENT SYSTEM
11 | P a g e
For each attribute associated with an entity set, we must identify a domain of possible values. For example domain associated with attribute company_name of company might be a set of 20-character strings similarly company_id might be integer.
Further, for each entity set , we choose a key. A key is a minimal set of attributes whose values uniquely identify an entity in the set, generally called as candidate key, there could be more than one candidate key, if so we designate one of them as primary key. A primary key is key with which we can identify a tuple uniquely.
TYPES:
Simple Attribute:
A normal attribute defining a entity
Representation:
Multivalued attribute:
Attribute consisting of multiple values.
Example:
Derived attribute:
An attribute which is derived from other attribute.
RELATIONS:
A relationship captures how two or more entities are related to one another. Relationships can be thought of as verbs, linking two or more nouns. Examples: an owns relationship between a company and a computer, a supervises relationship between an employee and a department, a performs relationship between an artist and a song, a proved relationship between a mathematician and a theorem.
Entity-relationship diagrams don't show single entities or single instances of relations. Rather, they show entity sets and relationship sets. Example: a particular song is an entity. The collection of all songs in a database is an entity set. The eaten relationship between a child and her lunch is a single relationship. The set of all such child-lunch relationships in a database is a relationship set. In other words, a relationship set corresponds to a relation in mathematics, while a relationship corresponds to a member of the relation.
Name
Address
ATTENDANCE MANAGEMENT SYSTEM
12 | P a g e
EXAMPLE:
CARDINALITY:
In the relational model, tables can be related as any of:many), or one-to-one. This is said to be the
For example, considering a database designed to keep track of hospital records. Such a database could have many tables like:
a Doctor table full of doctor information
a Patient table with patient information
And a Department table with an entry for each department of the hospital.
In that model:
There is a many-to-many relationship between the records in the doctor table and records in the patient table (Doctors have many patients, and a patient could have several doctors);
A one-to-many relation between the department table and the doctor table (each doctor works for one department, but one department could have many doctors).
One-to-one relationship is mostly used to svisibility of some information. In the hospital example, such a relationship could be used to keep apart doctor's personal or administrative information.
EXAMPLE:
COMPANY
ATTENDANCE MANAGEMENT SYSTEM
In the relational model, tables can be related as any of: many-to-many, many-to. This is said to be the cardinality of a given table in relation to another.
For example, considering a database designed to keep track of hospital records. Such a database could
table full of doctor information
table with patient information
table with an entry for each department of the hospital.
relationship between the records in the doctor table and records in the ny patients, and a patient could have several doctors);
relation between the department table and the doctor table (each doctor works for one department, but one department could have many doctors).
relationship is mostly used to split a table in two in order to optimize access or limit the visibility of some information. In the hospital example, such a relationship could be used to keep apart doctor's personal or administrative information.
OFFERS JOB
to-one (rev. one-to-of a given table in relation to another.
For example, considering a database designed to keep track of hospital records. Such a database could
relationship between the records in the doctor table and records in the ny patients, and a patient could have several doctors);
relation between the department table and the doctor table (each doctor works for one
plit a table in two in order to optimize access or limit the visibility of some information. In the hospital example, such a relationship could be used to keep apart
ATTENDANCE MANAGEMENT SYSTEM
13 | P a g e
DIAGRAMATIC REPRESENTATION OF VARIOUS COMPONENTS AND THEIR TYPES IN ER_MODEL:
ATTENDANCE MANAGEMENT SYSTEM
14 | P a g e
3.2 IDENTIFICATION OF ENTITIES:
STUDENT ENTITY:
Student entity has total 4 attributes sid,semid,secid,sname sid represents student id,semid represents to which semester the student is currently belonging
to,secid represents the student’s section in a particular semester,sname represents student name. sid is the primary key.
for a particular semester). Subid is the primary key.
sid
semidsecid
sname
Student
subid subnm semid
Subjects
ATTENDANCE MANAGEMENT SYSTEM
15 | P a g e
TEACHER ENTITY:
Teacher is an entity which consists of attributes tid,tname,subnm,secid,semid. Where tid represents teachers id,tname represents teachers name,subid represents subject
id,sec id represents section id. Tid is used as a primary key.
SEMESTER ENTITY:
Semester is an entity which consists of attributes semid,semnm. Semid represents semester id and semnm represents semester name. Semid is used as a primary key.
SECTION ENTITY:
Tid
subidTname
Teacher
Semester
semid semnm
Section
secid secnm
secid
ATTENDANCE MANAGEMENT SYSTEM
16 | P a g e
Section entity consists of attributes secid and secnm. Sec id represents section id,secnm represents section name. Secid is the primary key.
MONTHS ENTITY:
Month is an entity which consists of attributes subid,month,sid,no_of_days,tot_days. Where subid represents subject identity,month represents particular month,sid represents student
id.
ATTENDANCE ENTITY:
Attendance is an entity consisting of sid,secid,subid,semid,from1,to1,tot no. of classes and no. of classes attended as attributes.
(Sid,subid) is the primary key.
Subid
No_of_days
Tot_days
Monthsid
Months
Sid
secid
subidfrom1
Attendance
Tot no. of classes
No. of classes
to1
semid
ATTENDANCE MANAGEMENT SYSTEM
17 | P a g e
3.3 IDENTIFICATION OF RELATIONSHIPS:
SEMESTER-SUBJECT RELATIONSHIP:
STUDENT-SEMESTER RELATIONSHIP:
STUDENT-SECTION RELATIONSHIP:
Subject
consists
Student
DEPbelongs to
Section
Semester
Semester
belongs to Student
DEP
ATTENDANCE MANAGEMENT SYSTEM
18 | P a g e
STUDENT-ATTENDANCE RELATIONSHIP:
TEACHER-SUBJECT RELATIONSHIP:
TEACHER-ATTENDANCE RELATIONSHIP:
TEACHER-SECTION RELATIONSHIP:
Attendance
has
Teacher teaches
Teacher gives
Section
handles
Student
DEP
Subject
Attendance
Teacher
ATTENDANCE MANAGEMENT SYSTEM
19 | P a g e
SUBJECT-ATTENDANCE RELATIONSHIP:
SUBJECT-MONTH RELATIONSHIP:
MONTH-ATTENDANCE RELATIONSHIP:
Month
based on
Attendance
has Subject
Attendance
Subject has
Month
ATTENDANCE MANAGEMENT SYSTEM
20 | P a g e
3.4 COMPLETE ER DIAGRAM:
Semester
semidsemnm
Student
Si
secid semidSname
Belongs to
Subject
Subidsubnm
consists
Teacher
tid
secid
tname
gives
Attendance
Subid
sid
secid
From1
to1
has
teaches
has
Month
No_of_day
subidTot_days
monthsid
Based on
has
secnm secid
Belongs to
handles
semid
secid
Tot no. of classes
No. of classes
semid
Section
ATTENDANCE MANAGEMENT SYSTEM
21 | P a g e
LOGICAL
SCHEMA DESIGN
ATTENDANCE MANAGEMENT SYSTEM
22 | P a g e
4.1 REPRESENTATION OF ENTITIES INTO TABLES:
The different entities identified in our project are as follows:
STUDENT
SUBJECT
TEACHER
SEMESTER
SECTION
ATTENDANCE
MONTHS
Above listed entities can be converted into tables as shown below with their corresponding attributes as
fields.
STUDENT TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SID NUMBER 102 SNAME VARCHAR 203 SEMID NUMBER 104 SECID NUMBER 10
SUBJECT TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SUBID NUMBER 102 SUBNM VARCHAR 203 SEMID NUMBER 10
TEACHER TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 TID NUMBER 102 TNAME VARCHAR 203 SUBID NUMBER 104 SECID NUMBER 10
ATTENDANCE MANAGEMENT SYSTEM
23 | P a g e
SEMESTER TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SEMID NUMBER 102 SEMNM VARCHAR 10
SECTION TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SECID NUMBER 102 SECNM VARCHAR 10
ATTENDANCE TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SID NUMBER 102 SECID NUMBER 103 SEMID NUMBER 104 FROM1 DATE -5 TO1 DATE -6 SUBID NUMBER 107 TOT NO. OF
CLASSESNUMBER 10
8 NO. OF CLASSES ATTENDED
NUMBER 10
MONTHS TABLE:
S.NO FIELD NAME FIELD TYPE FIELD RANGE
1 SID NUMBER 102 MONTH VARCHAR 203 SUBID NUMBER 104 NO_OF_DAYS NUMBER 105 TOTAL_DAYS NUMBER 10
ATTENDANCE MANAGEMENT SYSTEM
24 | P a g e
RELATIONAL
SCHEMA DESIGN
ATTENDANCE MANAGEMENT SYSTEM
25 | P a g e
5.1 ORACLE :
The Oracle Database (commonly referred to as Oracle RDBMS or simply as Oracle) is a relational
database management system(RDBMS) produced and marketed by Oracle Corporation. As of 2009,
Oracle remains a major presence in database computing.Larry Ellison and his friends and former co-
workers Bob Miner and Ed Oates started the consultancy Software Development Laboratories (SDL) in
1977. SDL developed the original version of the Oracle software. The name Oracle comes from the code-
name of a CIA-funded project Ellison had worked on while previously employed by Ampex.
DATABASE SCHEMA:
Oracle database conventions refer to defined groups of object ownership (generally associated
with a "username") as schemas.
After the Oracle database installation process has set up the sample tables, the user can log into
the database with the username scott and the password tiger. The name of the SCOTT schema originated
with Bruce Scott, one of the first employees at Oracle (then Software Development Laboratories), who
had a cat named Tiger.
Oracle Corporation has de-emphasized the use of the SCOTT schema, as it uses few of the
features of the more recent releases of Oracle. Most recent examples supplied by Oracle Corporation
reference the default HR or OE schemas.
ATTENDANCE MANAGEMENT SYSTEM
26 | P a g e
5.2 CODE GENERATED FOR THE PROPOSED PROJECT USING SQL:
CREATE TABLE Student
(
sid NUMBER(10) NOT NULL ,
sname VARCHAR2(20) NULL ,
semid NUMBER(10) NOT NULL ,
secid NUMBER(10) NOT NULL ,
primary key(sid),
foreign key(semid) references semester(semid),
foreign key(secid) references section(secid)
);
CREATE TABLE Subject
(
subid NUMBER(10) NOT NULL ,
subnm VARCHAR2(20) NULL ,
semid NUMBER(10) NOT NULL ,
primary key(subid),
foreign key(semid) references semester(semid);
);
CREATE TABLE Teacher
(
tid NUMBER(10) NOT NULL ,
tname VARCHAR2(20) NULL ,
subid NUMBER(10) NOT NULL,
secid NUMBER(10) NOT NULL,
primary key(tid),
foreign key(subid) references subject(subid),
foreign key(secid) references section(secid)
);
CREATE TABLE Semester
(
ATTENDANCE MANAGEMENT SYSTEM
27 | P a g e
semid NUMBER(10) NOT NULL ,
semnm VARCHAR2(20) NOT NULL ,
primary key(semid)
);
CREATE TABLE Section
(
secid NUMBER(10) NOT NULL ,
secnm VARCHAR2(20) NOT NULL ,
primary key(secid)
);
CREATE TABLE Attendance
(
sid NUMBER(10) NOT NULL ,
secid NUMBER(10) NOT NULL ,
subid NUMBER(10) NOT NULL ,
semid NUMBER(10) NOT NULL ,
from1 DATE NULL ,
to1 DATE NULL ,
tot no. of classes NUMBER(10) NOT NULL,
No. of classes attended NUMBER(10) NULL,
primary key(sid,subid),
foreign key(sid) references student(sid),
foreign key(subid) references subject(subid),
foreign key(semid) references semester(semid),
foreign key(secid) references section(secid)
);
CREATE TABLE Months
(
MONTH VARCHAR2(20) NULL,
no_of_days NUMBER(10) NULL ,
total_days NUMBER(10) NULL ,
sid NUMBER(10) NOT NULL ,
ATTENDANCE MANAGEMENT SYSTEM
28 | P a g e
subid NUMBER(10) NOT NULL ,
foreign key(subid) references subject(subid),
foreign key(sid) references student(sid)
);
INSERT INTO Student values(71,’sowmya’,5,1);
INSERT INTO Student values(72,’pranathi’,5,1);
INSERT INTO Student values(73,’madhu’,7,2);
INSERT INTO Student values(74,’sruthi’,3,2);
INSERT INTO Student values(75,’sowmya’,7,3)
INSERT INTO Student values(75,’ramya’,3,3);
INSERT INTO Subject values(1,’ca’,5);
INSERT INTO Subject values(2,’daa’,5);
INSERT INTO Subject values(3,’dc’,5);
INSERT INTO Subject values(4,’dbms’,5);
INSERT INTO Subject values(5,’edc’,2);
INSERT INTO Subject values(6,’et’,2);
INSERT INTO Subject values(7,’dms-1’,2);
INSERT INTO Subject values(8,’ds’,4);
INSERT INTO Teacher values(1,’kavitha’,4,1);
INSERT INTO Teacher values(2,’gayathri’,1,2);
INSERT INTO Teacher values(3,’jaya’,4,3);
INSERT INTO Teacher values(4,’ujwala’,8,2);
INSERT INTO Teacher values(5,’kavitha’,7,3);
INSERT INTO Semester values(1,’1’);
INSERT INTO Semester values(2,’2-1’);
INSERT INTO Semester values(3,’2-2’);
INSERT INTO Semester values(4,’3-1’);
INSERT INTO Semester values(5,’3-2’);
INSERT INTO Semester values(6,’4-1’);
INSERT INTO Semester values(7,’4-2’);
ATTENDANCE MANAGEMENT SYSTEM
29 | P a g e
INSERT INTO Section values(1,’A’);
INSERT INTO Section values(1,’B’);
INSERT INTO Section values(1,’C’);
INSERT INTO Attendance values(71,1,4,5,’25-JAN-11’,’25-FEB-11’,80,60);
INSERT INTO Attendance values(72,1,3,5,’25-JAN-11’,’25-FEB-11’,65,60);
INSERT INTO Attendance values(73,2,6,7,’25-SEP-11’,’26-NOV-11’,78,78);
INSERT INTO Attendance values(74,2,7,3,’20-APR-10’,’25-MAY-10’,75,72);
INSERT INTO Attendance values(75,3,4,7,’25-SEP-11’,’26-OCT-11’,60,55);
INSERT INTO Attendance values(76,3,8,3,’20-APR-10’,’24-MAY-10’,80,70);
6.1 NORMALIZATION:Normalization of data can be looked upon as a process of analyzing the given relation schemas based on their functional dependencies and primary keys to achieve the desirable properties of1. Minimizing redundancy and2. Minimizing the insertion, deletion and update anomalies.The normalization procedure provides database designers with following:
1. A formal framework for analyzing relation schemas based on their keys and on the functional dependencies among their attributes.
2. A series of normal form tests that can be carried out on individual relation schemas so that the relational database can be normalized to any desired degree.
The process of normalization through decomposition must also confirm the existence of additional properties that the relation schemas, taken together, should process. This would include two properties:
1. The lossless join or non additive join property, which guarantees that the spurious tuple generation problem does not occur with respect to the relation schemas created after decomposition.
2. The dependency preservation property, which ensures that each functional dependency is represented in some individual relation resulting after decomposition.
NORMAL FORMS:
FIRST NORMAL FORM:First normal form (1NF) is considered to be part of the formal definition of a relation in the basic relational model; historically, it was defined to disallow multi valued attributes, composite attributes and their combinations. It states that the domain of an attribute must include only atomic values and that the
value of any attribute in a tuple must be a single value from the domain of that attribute.
SECOND NORMAL FORM:Second normal form (2NF) is based on the concept of fully functional dependency. A functional dependency X→Y is a full functional dependency if removal of any attribute A from X means that the dependency does not hold any more; that is, for any attribute AєX, (X-{A}) does not functionally determine Y. Functional dependency X→Y is a partial dependency if some attribute AєX can be removed from X and the dependency still holds; that is, for some AєX, (X-{A})→Y.
THIRD NORMAL FORM:Third normal form (3NF) is based on the concept of transitive dependency. A functional dependency X→Y in a relation schema R is a transitive dependency if there is a set of attributes Z that is a candidate key nor a subset of any key of R, and both X→Z and Z→Y hold.Let us consider tables from our scenario:
ATTENDANCE MANAGEMENT SYSTEM
36 | P a g e
STUDENT:
FIRST NORMAL FORM(1NF):The student table is in first normal form because
1. Each row is identified uniquely.2. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The student table is in second normal form because
1. It is in first normal form.2. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The student table is in third normal form because
1. It is in second normal form.2. No non key attribute is is identified by another non key attribute.
TEACHER:
Tid Tname Subid Secid
1 kavitha 4 1
2 gayathri 1 2
3 jaya 4 3
4 ujwala 8 2
5 kavitha 7 3
FIRST NORMAL FORM(1NF):The teacher table is in first normal form because
3. Each row is identified uniquely.4. Each column is not having more than a single value.
Sid Sname Semid Secid
1 sowmya 5 1
2 pranathi 5 1
3 madhu 7 2
4 sruthi 3 2
5 sowmya 7 3
6 ramya 3 3
ATTENDANCE MANAGEMENT SYSTEM
37 | P a g e
SECOND NORMAL FORM(2NF):The teacher table is in second normal form because
3. It is in first normal form.4. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The teacher table is in third normal form because
3. It is in second normal form.4. No non key attribute is is identified by another non key attribute.
SEMESTER:
Semid Semnm
1 1
2 2-1
3 2-2
4 3-1
5 3-2
6 4-1
7 4-2
FIRST NORMAL FORM(1NF):The semester table is in first normal form because
5. Each row is identified uniquely.6. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The semester table is in second normal form because
5. It is in first normal form.6. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The semester table is in third normal form because
5. It is in second normal form.6. No non key attribute is is identified by another non key attribute.
ATTENDANCE MANAGEMENT SYSTEM
38 | P a g e
SECTION:
Secid Secnm
1 A
2 B
3 C
FIRST NORMAL FORM(1NF):The section table is in first normal form because
7. Each row is identified uniquely.8. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The section table is in second normal form because
7. It is in first normal form.8. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The section table is in third normal form because
7. It is in second normal form.8. No non key attribute is is identified by another non key attribute.
SUBJECT:
In the subject table semid(non key attribute) can be identified by subnm(non key attribute).It is violating 3NF.So we divide it into two tables ‘SUB1’ and ‘SUB2’.
SUB1:
Subid Subnm
1 ca
2 daa
3 dc
4 dbms
5 edc
6 et
7 dms-1
8 ds
ATTENDANCE MANAGEMENT SYSTEM
39 | P a g e
SUB2:
Subid Semid
1 5
2 5
3 5
4 5
5 2
6 2
7 2
8 4
FIRST NORMAL FORM(1NF):The sub1 and sub2 tables are in first normal form because
9. Each row is identified uniquely.10. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The sub1 and sub2 tables are in second normal form because
9. It is in first normal form.10. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The sub1 and sub2 tables are in third normal form because
9. It is in second normal form.10. No non key attribute is is identified by another non key attribute.
ATTENDANCE:In this table the primary key is (sid,subid).Here ‘secid’ can be identified from ‘sid’ alone which is a part
of primary key. Also ‘semid’, ‘tot no. of classes’ and ‘no. of classes attended’ can be identified from
‘subid’(part of primary key).These are violating 2NF.Hence we divide this into two tables ‘ATT1’ and
‘ATT2’.
ATTENDANCE MANAGEMENT SYSTEM
40 | P a g e
ATT1:
Sid Tot no. of classes
No. of classes attended
Secid Semid
71 80 60 1 5
72 65 60 1 5
73 78 78 2 7
74 75 72 2 3
75 60 55 3 7
76 80 70 3 3
ATT2:
Sid Subid From1 To1
71 4 25-JAN-11 25-FEB-11
72 3 25-JAN-11 25-FEB-11
73 6 25-SEP-11 26-NOV-11
74 7 20-APR-10 25-MAY-10
75 4 25-SEP-11 26-OCT-11
76 8 20-APR-10 24-MAY-10
FIRST NORMAL FORM(1NF):The att1 and att2 tables are in first normal form because
11. Each row is identified uniquely.12. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The att1 and att2 tables are in second normal form because
11. It is in first normal form.12. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The att1 and att2 tables are in third normal form because
11. It is in second normal form.12. No non key attribute is is identified by another non key attribute.
ATTENDANCE MANAGEMENT SYSTEM
41 | P a g e
MONTHS:
In this table,the non key attributes ‘month’ and ‘ tot_days’ are dependent on each other violating 3NF.so
we divide this table into ‘months1’ and ‘months2’.
MONTHS1:
MONTHS2:
FIRST NORMAL FORM(1NF):The months1 and months2 tables are in first normal form because
13. Each row is identified uniquely.
Month No_of_days Sid Subid
APR 27 71 1
JAN 25 76 1
SEP 28 72 2
JUL 26 73 4
NOV 27 75 5
APR 29 72 8
Tot_days No_of_days Sid Subid
30 27 71 1
31 25 76 1
30 28 72 2
31 26 73 4
30 27 75 5
30 29 72 8
ATTENDANCE MANAGEMENT SYSTEM
42 | P a g e
14. Each column is not having more than a single value.
SECOND NORMAL FORM(2NF):The months1 and months2 tables are in second normal form because
13. It is in first normal form.14. Every non key attribute is fully functionally dependent on key attributes.
THIRD NORMAL FORM(3NF):The months1 and months2 tables are in third normal form because
13. It is in second normal form.14. No non key attribute is is identified by another non key attribute.
AFTER NORMALIZATION:
We got six new tables ‘sub1’,’sub2’,’att1’,‘att2’ and ‘months1’,’months2’ in the place of
‘subject’,’attendance’ and ‘months’ table respectively.So we delete these old tables and create the six
new tables.
Following is the code for -
deletion of old tables:
Alter table subject drop column subid;
Alter table subject drop column subnm;
Alter table subject drop column semid;
Alter table attendance drop column sid;
Alter table attendance drop column secid;
Alter table attendance drop column subid;
Alter table attendance drop column from1;
Alter table attendance drop column to1;
Alter table attendance drop column tot no. of classes;
Alter table attendance drop column no. of classes attended;