You are on page 1of 16

REVIEW 3

Prepared by Project Group No: 3 Signature

Approved by (Faculty)

Huynh Khanh Thien Vu Date:24/12/2010

Kieu Trong Khanh

Project Team: 01

Prepared by: All members

Page 74 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

10. Database Relationship Diagram

Project Team: 01

Prepared by: All members

Page 75 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.1. Table tblDepartment Field Name DepartmentID DeptName Isdelete Data Type varchar nvarchar bit Size 10 50 N/A Null No No No Default Value N/A N/A TRUE Key PK N/A N/A Table-Field-Ref N/A N/A N/A Description DepartmentID Unique Name of department Delete or not delete

Contraints

Name

Add

Delete

Update

tblDepartment

+ (All field not null, DepartmentID must be unique , cant modify DepartmentID , DeptNames length must between 5 and 50 characters , D i s p l a y O r d e r m u s t b e n u m e r i c )

+ (All field not null, DepartmentID must be unique , cant modify DepartmentID , DeptNames length must between 5 and 50 characters ,

Project Team: 01

n Prepared by: All members u m

Page 76 of 124

Project: Blue Pumpkin


11.2. Table tblUser

Document: Development Guide

Approved by: Faculty

Field Name UserID Fullname PassWord Sex Birthday Phone Address Email JoinDate IsAdmin DepartmentID IsActive Isdelete

Data Type nvarchar nvarchar nvarchar Bit date nvarchar nvarchar nvarchar date bit varchar bit bit

Size 50 50 30 N/A N/A 16 50 50 N/A N/A 10 N/A N/A

Null No No No No No No No No No No No No No

Default Value N/A N/A N/A Male 01.01.2010 N/A N/A N/A 01.01.2010 Admin N/A TRUE TRUE

Key PK N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Table-Field-Ref N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Description Username Fullname PassWord User's sex User's birthday User's phone no User's address User's email Users joindate Users role Department Active or not active Delete or not delete

Contraints Name Add Delete Update

+ (All field not null, Username is unique, Birthday >= 01011950, Birthday <= 01011992,
UserIDs account cant be blank, UserIDs length must be between 5 and 50, Fullnames account cant be blank, Fullnames length must be between 5 and 50, Addresss account cant be blank, Addresss length must be between 5 and 50)

+ (All field not null, UseID is unique, Birthday >= 01011950, Birthday <= 01011992, UserIDs
account cant be blank, UserIDs length must be between 5 and 50, Fullnames account cant be blank, Fullnames length must be between 5 and 50, Addresss account cant be blank, Addresss length must be between 5 and 50)

tblUser

Project Team: 01

Prepared by: All members

Page 77 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.3. Table tblEventCategory

Field Name CatID CatName IsDelete

Data Type nvarchar nvarchar bit

Size 20 50 N/A

Null No No No

Default Value N/A N/A TRUE

Key PK N/A N/A

Table-Field-Ref N/A N/A N/A

Description EventCategoryID EventCategoryName Delete or not delete

Contraints

Name tblEventCategory

Add + (All field not null, CatId is unique, CatIDs length between 5 to 20 characters CatNames length between 5 to 50 characters)

Delete -

Update + (All field not null, CatId is unique, CatIDs length between to 5 to 20 characters Catnames length between 5 to 50 characters)

Project Team: 01

Prepared by: All members

Page 78 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.4. Table tblFAQ

Field Name FaqID Question UserID Answer ShowOrder Showstatus Isdelete

Data Type nvarchar nvarchar nvarchar nvarchar int bit bit

Size 20 50 50 50 N/A N/A N/A

Null no no no no no no no

Default Value N/A N/A N/A pending 0 TRUE TRUE

Key PK N/A Fk N/A N/A N/A N/A

Table-Field-Ref N/A N/A N/A N/A N/A N/A N/A

Description FAQ ID Unique Users question UserID of sender Answer Order number Publish or not delete or not delete

Contraints

Name

Add

Delete

Update

tblFAQ

+ (All field not null, cant modify FAQID, Question cannot be blank, Questions length must between 5 and 50 characters, Answer cannot be blank, Answer length must between 5 and 50 characters, ShowOrder cannot be blank, ShowOrder must be numeric )

+ (All field not null, cant modify FAQID, Question cannot be blank, Questions length must between 5 and 50 characters, Answer cannot be blank, Answer length must between 5 and 50 characters, ShowOrder cannot be blank, ShowOrder must be numeric )

Project Team: 01

Prepared by: All members

Page 79 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.5. Table tblPrize

Field Name PrizeID Title Description IsDelete int

Data Type nvarchar nvarchar bit

Size N/A 100 100 N/A

Null No No Yes No

Default Value N/A N/A N/A TRUE

Key PK N/A N/A N/A

Table-Field-Ref N/A N/A N/A N/A

Description PrizeID Identity Title of prize Description delete or not delete

Contraints

Name tblPrize

Add + (All field not null, cant modify PrizeID, Titles length between 5 to 100 characters Descriptions length between 5 to 100 characters)

Delete -

Update + (All field not null, cant modify PrizeID, Titles length between 5 to 100 characters Descriptions length between 5 to 100 characters)

Project Team: 01

Prepared by: All members

Page 78 of 124

Project: Blue Pumpkin


11.6. Table tblEvent Field Name EventID CatID Title Brief EventContent ImgPath StartDate EndDate NoOfParticipant PostDate PostUser IsProposed Status Condition Isdelete Contraints Name Data Type Nvarchar Nvarchar Nvarchar Nvarchar Nvarchar Nvarchar Date Date Int Date Nvarchar Bit Char Nvarchar Bit

Document: Development Guide

Approved by: Faculty

Size 20 20 50 100 200 100 N/A N/A N/A N/A 50 N/A 1 50 N/A

Null No No No No No No No No No No No No No No No

Default Value N/A N/A N/A N/A N/A N/A 01.01.2010 01.01.2010 N/A 01.01.2010 N/A TRUE N/A N/A TRUE

Key Pk Fk N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Table-Field-Ref N/A tblEventCategory N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A

Description Event ID EventCategory Title of event Brief of event Content of event Images of event Startdate of event Enddate of event Number of particant Post date Post user Propose or not propose Status Condition of event Delete or not delete

Add

delete -

Update

tblEvent

+ (All field not null, cant modify EventID, NoOfParticipants>0, StartDate< EndDate, Title cannot be blank, Title must have 5 to 50 characters, You must choose event category, brief cannot be blank, Eventcontent cannot be blank, brief must have 5 to 100 characters, eventcontent must have 5 to 200 characters, NoOfParticipant cannot be blank, NoOfParticipant must be numeric)

+ (All field not null, cant modify EventID, NoOfParticipants>0, StartDate< EndDate, Title cannot be blank, Title must have 5 to 50 characters, You must choose event category, brief cannot be blank, Eventcontent cannot be blank, brief must have 5 to 100 characters, eventcontent must have 5 to 200 characters, NoOfParticipant cannot be blank, NoOfParticipant must be numeric)

Project Team: 01

Prepared by: All members

Page 79 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.7. Table tblWin-prize

Field Name WinPrizeID Int PrizeID EventID Int

Data Type

Size N/A N/A 20

Null No No No

Default Value N/A N/A N/A

Key PK Fk Fk

Table-Field-Ref N/A tblPrize tblEvent

Description WinPrizeID Identity prizeID EventID

nvarchar Contraints

Name tblWin-Prize

Add + (All field not null, cant modify WinPrizeID, prizeId must be numeric, eventID must between 5 to 20 characters )

Delete -

Update + (All field not null, cant modify WinPrizeID, prizeId must be numeric, eventID must between 5 to 20 characters )

Project Team: 01

Prepared by: All members

Page 79 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

11.8. Table tblJoin_user

Field Name UserID EventID JoinDate Winner WinPrize JoinStatus Score Isdelete

Data Type Nvarch ar nvarchar date nchar Int Nchar Int Bit

Size 50 20 N/A 1 N/A 1 N/A N/A

Null no no no no no no No no

Default Value N/A N/A 01.01.2010 N/A N/A N/A N/A TRUE

Key PK Pk N/A N/A N/A N/A N/A N/A

Table-Field-Ref N/A N/A N/A N/A N/A N/A N/A N/A

Description UserID of tblUser EventID of Event UserID of sender Number of winner Winprize of event Status Score of participant delete or not delete

Contraints Name Add delete Update

tblJoin_User

+ (All field not null, cant modify UserID, cant modify EventID, winner must between 3 to 10, winprize must be numeric, score must be numeric,

+ (All field not null, cant modify UserID, cant modify EventID, winner must between 3 to 10, winprize must be numeric, score must be numeric,

Project Team: 01

Prepared by: All members

Page 79 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

12. Other constrains 12.1. Table: tblEvent, tblWinPrize Contraints: 1 Event n winPrize

Name e tblEvent

Add -

Del ete + (tblEvent.EventID not exist on tblWinPrize) -

Update + (tblEvent.EventID not exist on tblWinPrize) + (tblEvent.EventID must exist)

tblWinPrize

+ (tblEvent.EventID must exist)

12.2. Table: tblEvent, tblJoin_User Contraints: 1 Event n player Name Add tblEvent TblJoin_User + (tbJoin_lUser.EventID must exist)

Delete + (tblEvent.EventID not exist ) -

Update + (tblEvent.EventID not exist ) + (tblJoin_User.EventID must exist)

12.3. Table: tblEventCategory, tblEvent Contraints: 1 EventCategory n Event Name Add tblEventCategory Delete + (tblEventCategory.CatID not exist) Update + (tblEventCategory.Cat ID not exist) + (tblEvent.CatID must exist)

tblEvent

+ (tblEvent.CatID must exist)

Project Team: 01

Prepared by: All members

Page 81 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

12.4. Table: tblWinprize, tblPrize Contraints: 1 Winprize n Prize Name Add Delete + (tblWinprize.PrizeID not exist) Update + (tblWinprize.PrizeID not exist) + (tblPrize.PrizeID must exist)

tblWinprize

+ (tblPrize.PrizeID must exist)

tblPrize

12.5. Table: tblWinprize, tblJoin_User Contraints: 1 Winprize n User Name tblWinPrize tblJoin_User Add + (tblJoin_User.WinprizeID must exist) Delete + (tblWinprize.WinprizeID not exist tblWinprize) Updat e + (tblWinprize.WinprizeID not exist tblWinprize) + (tblJoin_User.WinprizeID must exist)

12.6. Table: tblDepartment, tblUser Contraints: 1 Department n User Name tblDepartment Add Delete + (tblDepartment. DepartmentID not exist tblWinprize) Updat e + (tblDepartment. DepartmentID not exist tblWinprize) + (tblUser.DepartmentID must exist)

tblUser

+ (tblUser.DepartmentID must exist)

12.7. Table: tblUser, tblFaq Contraints: 1 User n Faq Name tblUser tblFaq Add + (tblFaq.UserID must exist) Delete + (tblUser.UserID not exist tblUser) Update + (tblUser.UserID not exist tblUser) + (tblFaq.UserID must exist)

Project Team: 01

Prepared by: All members

Page 82 of 124

Project: Blue Pumpkin


13. Site map 13.1. Homeside

Document: Development Guide

Approved by: Faculty

HOME Login Forgot password Faculty Profile Detail FAQs About Us Event List Event Detail Propose Event Search Result Profile Detail Support Question

Project Team: 01

Prepared by: All members

Page 84 of 124

Project: Blue Pumpkin


13.2. Admin side

Document: Development Guide

Approved by: Faculty

Project Team: 01

Prepared by: All members

Page 85 of 124

Project: Blue Pumpkin

Document: Development Guide

Approved by: Faculty

You might also like