Database Design              (back)          (Home)    (next)
 
Under this section we will be looking at the various diagrams used to design our database and finally come up with the tables used for the system.
 
                             
                                                                          Entity Relationship diagram   

    The above diagram describes the relationship between the various entities existing in the system. As can be seen, a system user or member will have lots of card no because there is a possibility that the card might be lost. Therefore replacement is given upon reporting loss. 

    The parking information hold the member info referenced by his /her card number. The information is created every time they parked in the carpark. The carpark status is changed frequently to reflect the status of the carpark e.g. availability of slots at level 2. Therefore there is only one status at any time.      

 
                                    
                                                                       Equivalent Data Structure Diagram

The above diagram is the conversion of the Entity Relationship Diagram. This is closer to our physical design of the database as we can see later at the tables formulated. 

 
Tables Formulated

We have created 5 tables required for the system.

tblMember

tblSystem_User

tblParkingLot

tblCarpark

tblCardNo

Note : This is not the fixed format because changes will be update as the time goes.

tblMember         

No.

Fields / Attributes

Type

Description

1

*Card_No

Char(8)

Card No. auto-issued by the system.

Can be edited if card is lost.

2

Name

Char(30)

Name of the member.

3

Address1

Char(30)

Address of member

4

Address2

Char(30)

Alternate address (if available)

5

Contact_No

Char(9)

Phone no. or Pager no.

6

Plate_No

Char(10)

Car’s plate no.

7

Spouse_Name

Char(30)

Name of the member’s spouse

8

Member_Type

Char(1)

N-Normal member, E-Employees

9

*NRIC

Char(9)

Member's IC card no

tblSystem_User

No.

Fields / Attributes

Type

Description

1

*User_ID

Char(8)

The ID that the users use to access the system.

2

Name

Char(30)

 

3

Password

Char(8)

 

4

Status

Char(1)

S-Supervisor have more access rights compare to the normal user.

N-Normal user.

tblParkingLot

No.

Fields / Attributes

Type

Description

1

*NRIC

Char(9)

Member's IC card no

2

*Date_In

Date

Date of the car enter the carpark.

3

*Time_In

Char(6)

Time of the car enter the carpark.

4

Date_Out

Date

Date of the car exit from the carpark.

5

Time_Out

Char(6)

Time of the car exit from the carpark.

6

Hour

Char(2)

Hour of the car entry or exit

7

Level

Num(1)

The level of the car parked in the carpark.

8

Slot_No

Char(4)

The slot no. Format : L-XX

L – Level of the carpark.

XX – the slot no.

tblCarpark

No.

Fields / Attributes

Type

Description

1

Total_Slots

Num(3)

Total slots in the carpark.

2

Total_Empty_Slots

Num(3)

Total empty slots in the carpark.

3

Level_1_Slots

Num(2)

Total slots in level 1.

4

Level_1_Empty_Slots

Num(2)

Total empty slots in level 1.

5

Level_2_Slots

Num(2)

Total slots in level 2.

6

Level_2_Empty_Slots

Num(2)

Total empty slots in level 2.

7

Level_3_Slots

Num(2)

Total slots in level 1.

8

Level_3_Empty_Slots

Num(2)

Total empty slots in level 2.

 tblCardNo

No.

Fields / Attributes

Type

Description

1

Last_Card_No

Num(8)

The last generated card no.

2

Type

Char(1)

M-member,  S-system user

Back to Top 

 
Hosted by www.Geocities.ws

1