From 567ab5d2b3545baf1fa536f23ea4f5ef6fe71d68 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 16 Jul 2006 06:25:57 +0000 Subject: Rename APP_CODE directory name. --- .../protected/pages/Docs/DatabaseDesign.page | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 demos/time-tracker/protected/pages/Docs/DatabaseDesign.page (limited to 'demos/time-tracker/protected/pages/Docs') diff --git a/demos/time-tracker/protected/pages/Docs/DatabaseDesign.page b/demos/time-tracker/protected/pages/Docs/DatabaseDesign.page new file mode 100644 index 00000000..a306ba2c --- /dev/null +++ b/demos/time-tracker/protected/pages/Docs/DatabaseDesign.page @@ -0,0 +1,42 @@ + +

Database Design

+

The design steps we take in the sample application is a data centric +approach. That is, we shall consider the application from the view +point of data structures, data relationships and data integrity. +Other designs starting from object and class design are also possible but is +not the approach taken in this guide. +

+ +

Entity Relationship

+

We start with the following entity relationship diagram. +The bold text in each entity indicate required fields. The underline +text indicates the entity's primary key, also denoted as PK. +Entity relationships are indicated with arrows between entities and +each relationship field is denoted with FK.

+ +

The four entities: Project, Categories, TimeEntry +and ProjectMembers +makes up the time tracker application. While the other entities: +Users, UserRoles, RoleTypes and Signon are +usually found in applications where membership or user management is required.

+ + class="figure" /> +

+ +
Info: +See Database Normalization +for a quick reference regarding database design and normalization, especially the +3rd normal form (3NF). +
+ +

MySQL database

+

We shall concentrate on the MySQL database for this sample application. +Other database engines are also possible and can be quite easily inter-changed. +The SQL script to initialize the MySQL database is given below. The following +SQL script was created using MySQL version 4.1.7. +

+ + +<%= file_get_contents('protected/data/time-tracker-mysql.sql') %> + +
\ No newline at end of file -- cgit v1.2.3