Entity-Relationships Model for Ajaqs

Entity-Entity Matrix for Ajaqs Showing Cardinality of Relationships
  FaqUser Role Project Faq Question Answer Attachment
FaqUser   N:N N:N   1:N 1:N 1:N
Role N:N            
Project N:N     1:N      
Faq     N:1   1:N    
Question N:1     N:1   1:N  
Answer N:1       N:1   1:N
Attachment N:1         N:1  

Note: To resolve the many-to-many relationship between the FaqUser and Project entities, we create an intermediate (i.e., associative) entity called the UserProject. See the E-R Diagram below.

The E-R Diagram for Ajaqs

In this diagram, we follow conventions outlined in the article at http://www.utexas.edu/cc/database/datamodeling/index.html. The image of the diagram was produced by dia-0.90, a free software package that you can download from http://freshmeat.net.

The E-R Diagram for Ajaqs

Size Limits for Entity Fields

The following table shows what size limitations exist for certain entity fields, depending on the database vendor:

Entity Field MySQL PostgreSQL
FaqUser logon 32 chars 32 chars
FaqUser password 32 chars 32 chars
FaqUser email 128 chars 128 chars
Role role 32 chars 32 chars
Project name 64 chars 64 chars
Faq name 64 chars 64 chars
Question question 64 Kb Unknown
Answer answer 64 Kb Unknown
Attachment attachment 16 Mb Unknown
Attachment fileName 128 chars 128 chars
Attachment fileType 64 chars 64 chars