Sei sulla pagina 1di 4

6.

DATABASES DESCRIPTION
1. EMPLOYEE

Description:
This table stores employee details. It has attributes such as calc_date and DOC(date of
commission to store leave dates. From these attributes we can calculate reduced salary for
employee. The attribute Desig_ID tells us about the employees department, job type and
designation.
Primary key: EMP_ID.
Foreign key: DESIG_ID.

Attribute Name Null? Type


--------------------------- --------------- -------------
EMP_ID NOT NULL NUMBER(4)
TITLE CHAR(10)
F_NAME CHAR(10)
M_NAME CHAR(10)
L_NAME CHAR(10)
SEX CHAR(2)
DOB DATE
MARRIED CHAR(2)
BLOOD_GRP CHAR(4)
H_NO NUMBER(4)
STREET CHAR(25)
CITY CHAR(15)
PIN_CODE NUMBER(8)
PHONE NUMBER(10)
FAX NUMBER(10)
DESIG_ID NUMBER(4) Foreign Key
SALARY NUMBER(10)
REDUCED_SAL NUMBER(10)
DOC DATE
CALC_DATE DATE
PERMISSION NUMBER(2)
STATUS NUMBER(2)
PWD NUMBER(15)

2. DEPARTMENT

Description:
This table stores the department names. This table makes the program dynamic as at any
time a new department can be added.
Primary key: NAME

Attribute Name Null? Type


------------------------ -------------- ---------
NAME NOT NULL CHAR (15)

3. JOB_TYPE

Description:
This table stores the job type names such as Doctor, Reception staff etc. This table makes
the program dynamic as at any time a new job type can be added.
Primary key: NAME

Attribute Name Null? Type


------------------------ -------------- ---------
NAME NOT NULL CHAR(15)

4. DESIGNATION

Description:
This table stores the designation names. This table makes the program dynamic as at any
time a new designation can be added.
Primary key: ID,JOB_NAME,DEPT_NAME
Foreign key: JOB_NAME, DEPT_NAME.

Attribute Name Null? Type


--------------------------- ---------------- ----------
ID NOT NULL NUMBER(4)
NAME NOT NULL CHAR(15)
JOB_NAME NOT NULL CHAR(15) Foreign Key
DEPT_NAME NOT NULL CHAR(15) Foreign Key

5. PATIENT

Description:
This table stores patient details. It has attributes such as blood group etc which are very
important from the treatment point of view.
Primary key: PAT_ID.

Attribute Name Null? Type


--------------------------- ---------------- ----------
PAT_ID NOT NULL NUMBER(4)
TITLE CHAR(10)
F_NAME CHAR(10)
M_NAME CHAR(10)
L_NAME CHAR(10)
SEX CHAR(2)
DOB DATE
MARRIED CHAR(2)
BLOOD_GRP CHAR(4)
H_NO NUMBER(4)
STREET CHAR(25)
CITY CHAR(15)
PIN_CODE NUMBER(8)
PHONE NUMBER(10)
MOBILE NUMBER(11)
E_MAIL CHAR(30)
FAX NUMBER(10)
NAME_KIN CHAR(25)
RELATION_KIN CHAR(15)
PHONE_KIN NUMBER(10)
E_MAIL_KIN CHAR(30)

6. APPOINTMENT

Description:
This table stores the appointment dates, description and prescription of a patient with
doctors.
Primary key: EMP_ID, PAT_ID, APPT_DATE.
Foreign key: EMP_ID, PAT_ID.

Attribute Name Null? Type


--------------------------- ---------------- ----------
EMP_ID NOT NULL NUMBER(4)
PAT_ID NOT NULL NUMBER(4)
APPT_DATE NOT NULL DATE
DESCRIPTION CHAR(30)
PRESCRIPTION CHAR(40)

7. BILLS

Description:
This table stores all the paid and unpaid bills of a patient.
Primary key: PAT_ID,ITEM_ID,ITEM_TYPE,DT.
Foreign key: PAT_ID,ITEM_ID.
Attribute Name Null? Type
--------------------------- ---------------- ----------
PAT_ID NOT NULL NUMBER(4)
ITEM_ID NOT NULL NUMBER(4)
ITEM_TYPE NOT NULL CHAR(20)
DT NOT NULL DATE
DESCRIPTION CHAR(25)
CHARGES NUMBER(8)
PAID CHAR(2)

8. ROOMS

Description:
This table stores the details of all the rooms of hospital. The attribute PAT_ID tells about
which patient is in which room and also about the empty rooms.
Primary key: ID.
Foreign key: PAT_ID.

Attribute Name Null? Type


--------------------------- ---------------- ----------
ID NOT NULL NUMBER(4)
R_NO NUMBER(6)
TYPE CHAR(15)
CHARGES NUMBER(6)
PAT_ID NUMBER(4)
ALLOC_DATE DATE

9. ITEMS

Description:
This table stores the details of the items such as Therapies, Medicines etc.
Primary key: ID.

Attribute Name Null? Type


--------------------------- ---------------- ----------
ID NOT NULL NUMBER(4)
NAME CHAR(15)
TYPE CHAR(15)
DESCRIPTION CHAR(25)
COST NUMBER(6)
TOT_QTY NUMBER(4)

Potrebbero piacerti anche