Sie sind auf Seite 1von 39

AutoES

Project report on AUTOMATION of

Establishment Section

Department of Computer Science and Engineering, National Institute of Technology, Warangal

By Amit Kumar (03705) Trilok Jain (03765) IIIrd Year B.Tech. C.S.E., NITW
1

AutoES

CONTENTS
1. 2. 3. 4. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. ACKNOWLEDGEMENT ABSTRACT SOLUTION DESCRIPTION INTRODUCTION INFORMATION MAINTENANCE BASIC FORMS BASIC ASSUMPTIONS DATA DICTIONARY CROSS REFERENCE TABLE ENTITY RELATIONSHIP DIAGRAMS ENTITY & RELATIONSHIP TABLES NORMAL FORMS FUNCTIONAL DEPENDENCIES & DECOMPOSITIONS SQL STATEMENTS FOR TABLE CREATION UNIVERSAL RELATIONSHIP DESCRIPTION OF FRONT END TOOLS 3 4 5 6 7 8 15 17 19 21 25 26 27 31 37 38

AutoES
ACKNOWLEDGEMENT
We are deeply indebted to Dr. D.V.L.N. Somyajulu, Department of Computer Science and Engineering, National Institute of Technology, Warangal, for his guidance, encouragement and suggestions throughout our project work. It was a great opportunity for us to work on the project Automation of Establishment Section under his able guidance.

AutoES
ABSTRACT
Establishment Section is the backbone of any organization whether it is educational or non-educational. In universities, establishment section plays a major role by its functionality. The main deal of the establishment section in our collage is to keep track of an employee and his services throughout his service period more over in some cases it deals with student. They maintain each and every detail of an employee in a register called a Service Register. Further, activities like loans and advances, leave sanctioning, increment/promotion are sanctioned and forwarded to appropriate departments. It is a tough task and requires a large database needs to be maintained which will obviously overhead if done manually subsequently there is a special requirement for automation of these activities in establishment section. Our project as automation software for establishment section of National Institute of Technology, Warangal presents a plethora of choices for end-user as well as it tackles all problems regarding to maintaining huge database of employee and students. There are six type of roles, having different function interleaved with each other and with other departments. Our project fully identifies these roles and their function and with all possible requirement automate them.

AutoES
SOLUTION DESCRIPTION
AutoES is an automation software designed with a goal of automating and
computerizing the activities of the Establishment Section of NIT Warangal. The Establishment Section is the hub of all activities of the institute, so it is an essentially needed to automate the activities for reducing the load on the staff working over there and to hasten up the services provided by it. So, a solid DBMS has to be incorporated in the system to achieve the desired efficiency of work.

AutoES
INTRODUCTION
This project achieves the goal of automating the activities of the Establishment Section of the Institute, hence, providing a user friendly and simple methodology to carry on the jobs of Establishment Section. Computerized processes guarantee better performance and consistency at work. Thus this project simplifies the work of the Establishment Section staff and enhances the performance of the Establishment Section. The Establishment section is basically divided into six sections which work as interrelated entities with specific tasks assigned to each of them. None of the section interferes with the activities of the other, although the data fed by a section into the database affects the read for the other departments So, as a broad classification, their jobs can be classified as follows: Section 1 : Deals with Pension, Quarter Allotment, etc. Section 2 : Miscellaneous activities dealing with Non Teaching Staff. Section 3 : Miscellaneous activities dealing with Teaching and Administrative Staff. Section 4 : Leave sanctioning and recording for each employee of the Institute. Section 5 : Bills, Letter Dispatches, creating student and employee information database. Section 6 : Related to Hostel Staff, Institute BOG and miscellaneous services. In our project various database relations are maintained to keep this information in a secure and consistent fashion using Oracle 9i and the processing is done on this stored information using SQL *PLUS. The Front end for this is developed using C# .Net Technology.

AutoES
INFORMATION MAINTAINANCE
The Database maintained by us for this application based software consist of a large but essential NUMBER of relations which cover all the information required to be maintained by the Establishment section.

The following are some of the major ones: The Employee database The Student Database The Transactions Database Employee Leave Data base Residential Quarter Information Letters Information Misc. Information

A lot of other, small databases keep all the records for the section and maintain the completeness and integrity of the Establishment Section.

AutoES
BASIC FORMS
1. SECTION C1:
Section C1 mainly deals with quarter allotment and calculation of various funds for employees. It also does rotation of heads of department. Main forms for this seat are as follows. Allotment Form: This form is for allotting quarter to employee whoever is eligible Input: Employee ID, Quarter type Output: Quarter is allotted to employee. Occupancy Form: This form is used whenever employee is not willing to take his quarter which is allotted to him. Input: Employee ID, Quarter type Output: If quarter is not accepted by employee then fine of 50 RS is taken from employee Vacate Form: Vacating of quarter is done by using this form. Input: Emp ID, Quarter type Output: quarter is vacated from employee Headship Form: Rotation of head ship is done by using this form Input: Emp ID , Departments Output: Head of department is changed. Retires Form: This form is used for retiring an employee who is indicated during update check. Input: Emp Id, Output: Employee is being retired. Quarter Allotted Report: This report shows which quarter is occupied by which employee Output: Qno 11 12 Type a c EmpID 123 221 Date 12/12/2003 21/1/2002

Pension Details Report: This report shows who is getting how much pension and who is getting on behalf of him/her. Output: 8

AutoES
EmpID 123 Reciever W Amount 3000

2. SECTION C2:
This seat mainly deals with Non-Teaching staff; at present 58 categories of employees are there up to superintendent cadre. Staff Details Form: This from is used for inserting data regarding to non-teaching staff whenever a recruitment is done. Input: Staff ID , name ,DOB, status, salary , designation , sex Output: Data is inserted into employee table

Staff Certificates Form: This form is used for keeping record of certificates of employee. Input: emp ID, mark sheet, service certificate, punishment Output: certificate record is saved. Promotion Form: This form is used for promoting an employee Input: emp ID, current post, future post Output: employee is promoted. Pension Form: Pension regarding to non-teaching staff is saved with using this form. Input: empID, receiver, amount Output: pension details are saved. Appointment Notice Report: This report is for publishing appointment of new employee Input: notice Date, For post Output: Appointment is published Issue of NO OBJECTION certificate: This report generates NOC certificate for employee Output: This is certified that we have no objection for employee XXX having employee id YYY Staff Details: This report gives details of non-teaching staff employee. Output: Emp no Emp name Salary Designation 121 Ram 32322 Asst.

Did 11

AutoES
211 Shyam 3223 Padd. 14 Leave Status report: This report shows status of employee leaves as how much leaves are remaining. Emp ID Remaining Leave 43432 4 Staff Certificate Report: Input: staff Id. Output: Emp ID Mark sheet 3243 y

Service certificate y

Punishment n

3. SECTION C3:
More or less activities of c3 are same as c2 and but difference is that this seat deals with teaching staff. All form structure is also same. Staff Details Form: This from is used for inserting data regarding teaching staff whenever a recruitment is done. Input: Staff ID , name ,DOB, status, salary , designation , sex Output: Data is inserted into employee table

Staff Certificates Form: This form is used for keeping record of certificates of employee. Input: emp ID, mark sheet, service certificate, punishment Output: certificate record is saved. Promotion Form: This form is used for promoting an employee Input: emp ID, current post, future post Output: employee is promoted. Pension Form: Pension regarding non-teaching staff is saved using this form. Input: empID, receiver, amount Output: pension details are saved. Appointment Notice Report: This report is for publishing appointment notice of new employee Input: notice Date, For post Output: Appointment is published

10

AutoES
Issue of NOC Certificate: This report generate NOC certificate for employee Output: This is certified that we have no objection for employee XXX having employee id YYY Staff Details: This report gives detail of non-teaching staff employee. Output: Emp no Emp name Salary Designation 11132 eds 32322 Asst. 4322 redss 3223 Padd.

Did 11 14

Leave Status Report: This report shows status of employee leaves as how much leaves are remaining. Emp ID Remaining Leave 312 2 Staff Certificate Report: Input: staff Id. Output: Emp ID Mark sheet 4232 y

Service certificate y

Punishment n

4. SECTION C4:
This seat mainly deals with Teaching and Non-Teaching staff & Leave Related Work. Open/Maintain Service Certificate Form: This from is used for storing the information about service book of employee. Input: Emp ID, increment , promotion Output: Service book is updated. Stop/Release Salary Form: Stop/Release of salary of employee is done by this form if employee is absent without Prior permission. Input: Emp ID , stop/release option Output: salary of employee is released/stop.

Maintain LTC Form: This form is used to maintain leave travel concession for employee and record is saved. Input: emp ID, from , to , amout Output: LTC is given for employee.

11

AutoES
Leave Form: This from is required for granting leave , and maintaining record for that. Input: empID, emp name, type of leave, from, upto, totol Output: leave is granted if employee account has that one. Issue Memo Report: This report is for issuing memo for concerned department if an employee on leave Without permission. Output: memo from concerning department is sent.

5. SECTION C5:
This seat belongs to inward and outward dispatch of letters, maintaining record for students and dealing with telephone bills. Dispatch Form: This from is used to maintain record of inward dispatch and outward dispatch for the Institute. Input: letter no, dated, type, remark Output: record is saved. Student Form: It registers details of student for their own purpose. Input: roll no, name, DOB, category, address, department Output: Saves student record in database. Issue ID Card Form: This form issues id card for students. Input: IDcard no. issue date, renew date, rollno Output: id card is issued in database Railway Concession Form: Railway concession is issued by using this form. Input: form no, roll no, winter/summer, from , upto Output: concession form is issued and record is saved. Telephone Bills Form: This from maintain information about telephone bills of different department Input: bill no, did, due date, Output: bill is sent to concerned department and record is saved. Letter Report: This report shows the detail of all letter received by c5. Output: Lett no Receive date Department remark 12

AutoES
23 22 12/21/2002 11/1/2003 Civil Chem. 400000 399.98

Report of Telephone Bill Paid: This report show telephone bills paid by departments Tbill no Month Amout Department 31232121 Jun 332423 Civil 32343243 March 3332 CHEM

Date 1/1/2002 2/3/2005

Railway Concession Report: This report shows who ever has taken railway concession From_no Roll no From Upto

Summer/winter

6. SECTION C6:
This Seat mainly deals with the Hostel Staff (Vacation and non-vacation Staff), Board, Advances, Reimbursements, etc Expected Form: This form maintains the expected expenditure received from account department for meeting of board of governor. Input: meeting date, expected expenditure Output: expenditure is saved.

Actual Form: This form maintains the actual expenditure done for meeting of board of governor. Input: meeting date, expected expenditure Output: expenditure is saved. Appointment Form: This form appoints hostel employee and their record is saved. Input: emp ID, emp name , DOB, salary , designation , section Output: record is saved. Staff Certificates Form: This form is used for keeping record of certificate of employee. Input: emp ID, mark sheet, service certificate, punishment Output: certificate record is saved.

13

AutoES
Retires Form: This form is used for retiring a employee whoever is indicated in during update. Input: Emp Id, Output: Employee is being retired. Meeting Expenses Report: This report shows various expenditure on board of governors meeting. Output: Expenditure name Bill no amount 223 23 234 Tea 32 3423 Appointment Report: This report summarizes the appointment of employee help by c6. Output: Eid Name Sex dob 32 Sudd M 12/1/2000 21 Erea F 12/2/2005

14

AutoES
BASIC ASSUMPTIONS
(Basic Assumptions, Classified according to the Seats)

C1
Employees are interviewed and after selection, their details are registered in the Employee Database only if they consent to join the Institute. Students are assigned a branch and roll NUMBER upon their admission in the Institute. ID Cards are issued to the students only if they are registered in the Institute for some course.

C2
If a quarter is vacant and it can be allotted to an employee upon request, provided that, he is eligible for quarter of that type. Head of the department are appointed according to directors will and their term can be repeated if required. Pension can be availed by any dependent member of the concerned persons family.

C3
Employees are called, interviewed and after selection, their details are registered in the Employee Database only if they consent to join the Institute. Increments are given to the employee after one service year. No employee can remain in service after an age of 60 years. Extraordinary leave can be given to an employee once for five years, and after a period of five years of his service.

C4
Promotions are given to Teaching Staff based upon their seniority and Qualifications.

15

AutoES
No teaching staff can be on rolls after the age of 62 years. Increments can be given to the staff based on their request and reasons.

C5
Absconding and Missing employees are removed from the employee list of the Institute. An employee can take up to 60 days of paid vacation leaves in a year otherwise these leaves get accumulated with three hundred as the saturation level of this NUMBER. Special Leaves can also be assigned to employees based on special needs.

C6
Student ID cards are renewed once every year. Railway Concessions may be availed by a student once in every vacation.

16

AutoES
DATA DICTIONARY
Actual Address Amount Bill No Board Category CL dated Dept_Name Designation DId DOB DOF DOJ DOP DOR DOT Emark Ename EOL Exp_Name Expected FName Form_No From1 Head_Id Headship Id_No IdCard_No In_dispatch Incre Issue Letter_no LTC M_Date MarkSheet Month Name No_Times NOC Actual expenditure in board of governor s meeting Address of employee or student Amount to be paid in bills or LTC Number that uniquely identifies a bill . This is board of governors of collage Category of student to be retained in student database Casual leave for employee. It can be maximum up to 8 days In a year. Date on bill on which it was issued Name of concerned department Occupation of different type of employees Department ID. Unique identification number for department. Date of birth for student or employee Date on which teaching employee starts his/her summer/winter vacation. Date on which railways concession for student starts Date of payment for bill of telephone by department Date up to railways concession for student is given. Date on which teaching employee ends his/her summer/winter vacation Remark for employee performance Ename is another name for employee name Extra ordinary leave which are granted for five years in a life of an employee Name of expenditure in which money was consumed during board s meeting Expected expenditure in board of governor s meeting Fathers name for student Form number for railways concession for student Starting station for employee those who are taking LTC Unique no that identifies a head of a department from head of another department Headship is authority to head of department Unique id number on an employee ID card no for student . Inward dispatch letter which are sent from establishment section Annual increment for employee Issue date for id card of employee Letter number which identifies a letter Leave Travel Concession Date of meeting of board of governors Mark sheet of student or employee Month for telephone bill for concerned department Name of employee or student Total count of outside appointment for employee No Objection certificate to be issued to employee

17

AutoES
Out_dispatch PassCerti Pension Phone No Promotion Punishments QNo Receiver Remain Renew Rent Roll no Salary Seat ServiceCerti Sex Since Status, To1 Total Type Wsp Year Out ward dispatched letter which are to be distributed to different departments Pass certificate for student or employee Pension given to retired personal Phone number of student Promotion for employee Punishment given to employee in his service Unique number of a quarter. Receiver if pension on behalf of employee Leaves remaining in a year for employee Renew date for id card of student Rent of a quarter allotted to employee Roll no of student Salary of employee Seat are different section of establishment section Service certificate that is issued on request of employee Sex of employee This is time since than a quarter is occupied by concerned employee Status of quarter whether it is empty or not Station at which employee will journey while applying for LTC Total leaves which can be granted for employee in a year Type of quarter allotted to employee Work place for non-teaching staff Year of renewing a id card of student

18

AutoES
CROSS REFERENCE

Staff certificate

Expected form

Student form

Appointment

Service book

Open/release salary

Retires form

Actual form

Leave form

Retire form

Occupancy

Staff detail

Actual Address Amount Bill No Board Category CL Dated Dept_Name Designation DId DOB DOF DOJ DOP DOR DOT Emark Ename EOL Exp_Name Expected FName Form_No From1 Head_Id Headship Id_No IdCard_No In_dispatch Incre Issue Letter_No LTC M_Date MarkSheet Month Name No_Times NOC Out_dispatch PassCerti Pension Phone No Promotion Punishments QNo Receiver Remain Renew

19

Railways concession

promotion

Tbill form

LTC form

Allotment

Head ship

dispatch

pension

vacate

AutoES
Rent Roll no Salary ServiceCerti Sex Since Status, To1, Total, Type, Wsp, Year

20

AutoES

Entity Relationship Diagrams

Roll No.

Card No.

Issue Date

Name Mark Sheet

Fathers Name

CERTIFICATE

Submits

STUDENT

Gets

ID Card

Pass Certificate

Receives

Has to Renew

CONCESSION

RENEWED CARD
Id No. Date

Form No.

Starting Date

Return date

The Student Entity

21

Date

Type

AutoES
Remarks

Letter No.

INWARD DISPATCH

The Inward Dispatch Entity

Dep. ID

Dep. Name Letter No.

Status

Type

Remarks

DEPARTMENT

Dispatched

OUTWARD DISPATCH

The OutWard Dispatch Entity

Amount Dep. ID Dep. Name Bill No. Month

DEPARTMENT

Pay

TELEPHONE BILLS

The Telephone Bills Entity

22

C AutoES
Name Emp. ID Date of Birth Designation Designation Salary

EMPLOYEE

GETS

SALARY

CName

IS A Subject

Work Place

TEACHING

NON TEACHING

HeadS

Since IS A

DEPARTMENT

Hostel Office Emp

Administrative

Dep ID

DName

Type

Seat

EMPLOYEE AGGREGATE

23

AutoES THE EMPLOYEE ENTITY


Qr. Type Rent

Qr No.

Status

Accomodates

QUARTERS

Service Certi. MarkSheet Punishment

EMPLOYEE

Submits

CERTIFICATES

Age

Retires

Salary_Status

Total Allowed

LEAVES
Has Leaves HPL EOL

IS A

MISC.
RETIRED CL Id No Last pay HL From

VACATION
To

Remaining 24

AutoES
ENTITY & RELATIONAL TABLES
EMPLOYEE( Id_No, Name, DOB, Status, Salary, Designation, Sex ) TEACHING_STAFF( Id_No, DId ) NONTEACH_STAFF( Id_No, Wsp ) EMP_CERTI( Id_No, MarkSheet, ServiceCerti, Punishments ) EMP_TOT_LEAVE( Id_No, Total ) EMP_VACATION( Id_No, DOF, DOT, Remain) OUT_APPOINT( Id_No, No_Times) PENSION( Id_No, Receiver, Amount) SBOOK( Id_No, EName, Incre, Promotion ) LTC( Id_No, From1, To1, Amount ) Q_RENT( Type, Rent ) Q_ALLOTED( QNo, Type, Status, Id, Since)

DEPARTMENT( Dept_Name, DId ) DEPHEAD( Head_Id, Since, DId, Now )

T_BILLS( DId, Month, Amount, DOP, Bill No )

STUDENT( Roll No, Name, DId, FName, Category, DOB, Address, Phone No ) S_CERTI( Roll No, MarkSheet, PassCerti ) ID_ISSUE_INFO( IdCard_No, Issue, Roll No ) ID_RENEW_INFO( IdCard_No, Renew ) RAIL_CONSSN( Form_No, DOJ, DOR, Type, Year, Roll No )

B_MEETING_EXP( M_Date, Expected, Actual ) GEN_EXPN( M_Date, Exp_Name, Bill No, Amount )

IN_DISPATCH( Letter_No, Dated, Emark, Type ) OUT_DISPATCH( Letter_No, Dated, DId, Remark, Type )

25

AutoES
NORMAL FORMS
RELATION ATTRIBUTES HIGHEST NORMAL FORM
EMPLOYEE Id_No, , Name, DOB, Sex Status, Salary, 1NF Designation, No_Times TEACHING_STAFF NONTEACH_STAFF DEPHEAD Q_ALLOTED PENSION EMP_CERTI EMP_LEAVES STUDENT Id_No, DId Id_No, Wsp Head_Id, Since, DId, Now QNo, Type, Rent, Status, Id_No Id_No, Receiver, Amount Id_No, MarkSheet, PassCerti Id_No, DOF, Total,DOT, Remain BCNF BCNF 3NF 1NF BCNF BCNF 2NF

Roll No, Name, DId, FName, Category, BCNF DOB, Address, Phone No

IDCARD RAIL_CONSSN S_CERTI DEPARTMENT BOARD_MEETING

IdCard_No, Renew, Roll, Issue Form_No, DOJ, DOR, Type, Year, Roll No Roll No, MarkSheet, PassCerti DId, Dept_Name

1NF BCNF BCNF BCNF

M_Date, Expected, Actual, Exp_Name, Bill 1NF No, Amount

IN_DISPATCH OUT_DISPATCH

Letter_No, Dated, Emark, Type Letter_No, Dated, DId, Remark, Type

BCNF BCNF

26

AutoES
FUNCTIONAL DEPENDENCIES and DECOMPOSITIONS
EMPLOYEE :Id_No Designation All Other Attributes Salary

No two employees can have same Id_No. Also, Id_No is the Primary KEY of the Relation. As the Salary depends on the Designation but neither Salary nor the Designation are a part of KEY or superKEY, the mployee relation is in 1NF (due to atomic FDs). So, EMPLOYEE can be decomposed into:

EMPLOYEE ( Id_No, , Name, DOB, Sex Status, Designation, No_Times ) DESIG ( Designation, Salary )
Both of these relations are BCNF relations.

TEACHING_STAFF :Id_No DId

No two employees can have same Id_No. Id_No is the Primary KEY of the Relation. No other Functional Dependency exists between the attributes of the relation. So, the TEACHING_STAFF relation is in BCNF.

NONTEACH_STAFF :Id_No Wsp

No two employees can have same Id_No. Id_No is the Primary KEY of the Relation. No other Functional Dependency exists between the attributes of the relation. So, the TEACHING_STAFF relation is in BCNF.

27

AutoES
DEPHEAD :Head_Id, Since, DId Head_Id DId All Attributes

Head_Id can be same in the relation as a person can be the Head of the department for more than once. No two tuples of the relation can have same values of Head_Id,Since,DId triplet. If Head_Id is same, DId will be same. Now, as the Head_Id is a part of the KEY of the relation, it is in 3NF and it is the best normal form and the relation cannot be further reduced.

Q_ALLOTED :Q_No Type Other Attributes Rent

Q_No is the Primary KEY of the relation. Also, Type is neither a SuperKEY nor Rent is part of a KEY. So, the relation is neither BCNF, nor 3NF nor 2NF. As the FD is atomic, the best normal form of the relation is 1NF. We decompose the relation by the given FD because of which it retains its BCNF property. The relations are decomposed into Q_ALLOTED and Q_RENT as follows:

Q_ALLOTED( QNo, Type, Status, Id, Since) Q_RENT( Type, Rent )

PENSION :Id_No All Other Attributes

No two pension takers can have same Id_No. Id_No is the Primary KEY of the Relation. No other Functional Dependency exists between the attributes of the relation. So, the PENSION relation is in BCNF.

28

AutoES
EMP_CERTI :Id_No MarkSheet, PassCerti

No two pension takers can have same Id_No. Id_No is the Primary KEY of the Relation. No other Functional Dependency exists between the attributes of the relation. So, the EMP_CERTI relation is in BCNF.

EMP_LEAVES :Q_No Type Other Attributes Rent

Q_No is the Primary KEY of the relation. Also, Type is neither a SuperKEY nor Rent is part of a KEY. So, the relation is neither BCNF, nor 3NF nor 2NF. As the FD is atomic, the best normal form of the relation is 1NF. We decompose the relation by the given FD because of which it retains its BCNF property. The relations are decomposed into EMP_TOT_LEAVE and EMP_VACATION as follows:

Q_ALLOTED( QNo, Type, Status, Id, Since) Q_RENT( Type, Rent )


Both of these relations are in BCNF.

STUDENT :Roll No All Other Attributes

No two students have the same Roll No. Roll No is the Primary KEY of the Relation. No other Functional Dependency exists between the attributes of the relation. So, the STUDENT relation is in BCNF.

IDCARD :IdCard_No,Renew Roll No, Renew All Other Attributes All Other Attributes

29

AutoES
Roll No Roll No Issue IdCard_No

Due to the last two FDs, we observe that the Relation IDCARD is in 1NF and in no other higher normal form. So, we decompose the relation taking into care the 3rd FD which violates the 3NF character. So, we get two relations :

ID_ISSUE_INFO( IdCard_No, Issue, Roll No ) ID_RENEW_INFO( IdCard_No, Renew )


While the first relation is now in 3NF, the second relation thus obtained is in BCNF.

BOARD_MEETING :M_Date M_Date Bill_No Expected Actual Other Attributes

Due to the first two FDs, that it is, the condition that, on a particular DATE, the meeting of the board will have only on entry for Actual and Expected Expenses while the actual Bill Details can be many. So, the first two FDs reduce the behaviour of the relation to 1NF and hence we decompose the relation into two relations which are both in BCNF.

B_MEETING_EXP( M_Date, Expected, Actual ) GEN_EXPN( M_Date, Exp_Name, Bill No, Amount )

30

AutoES
SQL STATEMENTS FOR TABLE CREATION
SQL statements for creating all tables needed to implement the design in Oracle 9i :

1.
CREATE TABLE EMPLOYEE ( id_no NUMBER, name VARCHAR2(30), dob DATE, status CHAR, salary NUMBER, designation CHAR, sex CHAR, CONSTRAINT id_pk PRIMARY KEY(id_no), CONSTRAINT ck_stat CHECK(status in('r','a')) )

2.
CREATE TABLE TEACHING_STAFF ( id_no NUMBER REFERENCES employee(id_no), did NUMBER REFERENCES department(did), CONSTRAINT ck_opkk PRIMARY KEY(id_no), CONSTRAINT ab_okk UNIQUE(id_no,did), CONSTRAINT limit1 CHECK(did between 1 and 10) )

3.
CREATE TABLE nonteach_staff ( id_no NUMBER REFERENCES employee(id_no), wsp NUMBER REFERENCES department(did), CONSTRAINT ck_pkn PRIMARY KEY(id_no)), CONSTRAINT limit1 CHECK(did between 11 and 16) )

4.
CREATE TABLE emp_certi ( id_no NUMBER, marksheet CHAR, service_certi CHAR,

31

AutoES
punishments CHAR CHECK punishments in('Y','N'), FOREIGN KEY(id_no) REFERENCES employee(id_no), CONSTRAINT c1 CHECK(service_certi in('y','n')), CONSTRAINT c2 CHECK(marksheet in('y','n')) )

5.
CREATE TABLE emp_tot_leave ( id_no NUMBER REFERENCES employee(id_no), total NUMBER, CHECK(total<=300) )

6.
CREATE TABLE emp_vactaion ( id_no NUMBER REFERENCES employee(id_no), dof DATE, dot DATE, remain NUMBER DEFAULT 60, PRIMARY KEY(id_no,dof,dot), CHECK(remain>=0) )

7.
CREATE TABLE out_appoint ( id_no NUMBER REFERENCES employee(id_no), no_times NUMBER DEFAULT 0 CHECK(no_times<=2), PRIMARY KEY(id_no) )

8.
CREATE TABLE pension ( id_no NUMBER REFERENCES employee(id_no), receiver CHAR, amount REAL, PRIMARY KEY(id_no) )

32

AutoES
9.
CREATE TABLE sbook ( id_no NUMBER, ename VARCHAR2(9), incre NUMBER, promotion VARCHAR2(9), PRIMARY KEY(id_no), FOREIGN KEY(id_no) REFERENCES employee(id_no) )

10.
CREATE TABLE LTC ( id_no NUMBER, from1 VARCHAR2(19), to1 VARCHAR2(19), amount REAL, FOREIGN KEY(id_no) REFERENCES employee(id_no) )

11.
CREATE TABLE q_rent ( type CHAR, rent REAL, PRIMARY KEY(type) )

12.
CREATE TABLE q_alloted ( qno VARCHAR2(4), type CHAR REFERENCES q_rent(type), status CHAR, idno NUMBER, since DATE, CONSTRAINT aa_kk PRIMARY KEY(qno), CONSTRAINT uniq_rl UNIQUE(idno), CONSTRAINT ck_st CHECK(status in('a','v','o')) )

33

AutoES
13.
CREATE TABLE department ( dept_name VARCHAR2(20), did NUMBER NOT NULL, CONSTRAINT emp_empno_pk PRIMARY KEY(did) )

14.
CREATE TABLE dephead ( head_id NUMBER, since DATE, did NUMBER, now CHAR CHECK(now in('Y','N')), PRIMARY KEY(head_id,since,did), CONSTRAINT dh_ck FOREIGN teaching_staff(id_no,did) )

KEY(head_id,did)

REFERENCES

15.
CREATE TABLE t_bills ( did NUMBER REFERENCES department(did), month NUMBER, amount REAL, dop DATE, bill_no NUMBER, CONSTRAINT bil_pk PRIMARY KEY(bill_no) )

16.
CREATE TABLE student ( roll NUMBER, name VARCHAR2(30), did NUMBER REFERENCES department(did), fname VARCHAR2(30), category VARCHAR2(2), dob DATE, address VARCHAR2(50), phone_no VARCHAR2(11), CONSTRAINT stu_pk PRIMARY KEY(roll) 34

AutoES
)

17.
CREATE TABLE s_certi ( marksheet CHAR, pass_certi CHAR, roll NUMBER REFERENCES student(roll), CONSTRAINT pk_rl PRIMARY KEY(roll), CONSTRAINT ck_ms CHECK(marksheet in('y','n')), CONSTRAINT ck_pc CHECK(pass_certi in('y','n')) )

18.
CREATE TABLE id_issue_info ( id_no NUMBER, issue DATE, roll NUMBER REFERENCES student(roll), CONSTRAINT is_cns_pk PRIMARY KEY(id_no) )

19.
CREATE TABLE id_renew_info ( id_no NUMBER, renew DATE, CONSTRAINT id_fk FOREIGN KEY(id_no) REFERENCES id_issue_info(id_no) )

20.
CREATE TABLE rail_conssn ( form_no NUMBER, doj DATE not null, dor DATE not null, type CHAR not null, year NUMBER not null, roll NUMBER REFERENCES student(roll), CONSTRAINT fn_pk PRIMARY KEY(form_no), CONSTRAINT ck_typ CHECK(type in('s','w')) )

35

AutoES
21.
CREATE TABLE b_meeting_exp ( m_DATE DATE, expected NUMBER, actual NUMBER, PRIMARY KEY(m_DATE) )

22.
CREATE TABLE gen_expn ( m_DATE REFERENCES b_meeting_exp(m_DATE), exp_name VARCHAR2(20), bill_no NUMBER, amount REAL, UNIQUE(bill_no) )

23.
CREATE TABLE in_dispatch ( letter_no NUMBER, dated DATE, emark VARCHAR2(15), type CHAR, PRIMARY KEY(letter_no) )

24.
CREATE TABLE out_appoint ( id_no NUMBER REFERENCES employee(id_no), no_times NUMBER DEFAULT 0 CHECK(no_times<=2), PRIMARY KEY(id_no) )

36

AutoES
UNIVERSAL RELATION

(This consists of all the attributes of all the tables) U= {


Actual, Address, Amount, Bill No, Category, Dated, Dept_Name, Designation, DId, DOB, DOF, DOJ, DOP, DOR, DOT, Emark, Ename, Expected, Exp_Name, FName, Form_No, From1, Head_Id, Id, Id_No, IdCard_No, Incre, Issue, Letter_No, M_Date, MarkSheet, Month, Name, No_Times, Now, PassCerti, Phone No, Promotion, Punishments, QNo, Receiver, Remain, Remark, Renew, Rent, Roll No, Salary, ServiceCerti, Sex, Since, Status, To1, Total, Type, Wsp, Year

37

AutoES
DESCRIPTION OF FRONT END TOOL USED ( .NET and C# )
.NET is designed to provide a new environment within which we can develop almost any application to run on windows, and possibly in the future on other platforms, while C# is a new programming language that has been designed specifically to work with .NET. Using C# , we can write a dynamic web page, a component of a distributed application, a database access component or a classic windows desktop application.

Some of the improved features of .NET are:(1) Object Oriented Programming: Object Oriented Programming (OOP) is a style of programming in which the code is broken up into units known as objects or classes. Each object usually abstracts some real world object that the application is concerned with. An object carries some state information as well as making methods (functions) available. OOP also allows to base new objects on existing objects by a process known as inheritance. (2) Good Design: A base class library, which is designed from the ground up in a highly intuitive way . In the vast majority of cases, we only have to look at the definition of a method to be able to see what it does and how to use it. That was certainly not true of the windows API, for which functions are often not intuitive, and often require a number of parameters that have more to do with the intricacies of the internal operation of the API or backward compatibility than with the aim of that function. (3) Data Access: The .NET base class library is extremely extensive and includes virtually full support for windows base services as well as for a number of component libraries. In particular, data access something that was added to windows later on, is a fundamental part of the base class library from the start. A set of .NET components collectively known as OleDB, provide efficient access to relational databases and a variety of data sources. Components are also available to allow access to the file system and to directories. In particular, XML support is built in to .NET allows manipulating data, which may be imported from or to nonwindows platforms.

Features of C#
Some of the features of C# areFull support for classes and object oriented programming including interface and implementation inheritance, virtual functions and operator overloading.

38

AutoES
A consistent and well-defined set of basic types. Inbuilt support for automatic generation of XML documentation. Automatic cleanup of dynamically allocated memory. The facility to mark classes or methods with user defined attributes .This can be useful for documentation and can have some effects on compilation. Full access to the .NET base class library as well as easy access to the windows API. Pointers and direct memory access are available if required, but the language has been designed in such a way that we can work without them in almost all cases. Support for properties and events in the style of VB. Just by changing the compiler options, we can compile either to an executable or to a library of .NET components that can be called up by other code in the same way as Active X controls (COM components). C# can be used to write ASP.NET dynamic web pages.

39