Enterprise ApplicationDevelopment with Ext JSand Spring
上QQ阅读APP看书,第一时间看更新

Chapter 2. The Task Time Tracker Database

This chapter defines the Task Time Tracker (3T) database design and configures NetBeans as a client of MySQL server.

The 3T application will be used to keep track of the time spent on different tasks for different company projects. The main entities are:

  • Company: This is the entity that owns zero or more projects. A company is independent and can exist in its own right (it has no foreign keys).
  • Project: This represents a grouping of tasks. Each project belongs to exactly one company and may contain zero or more tasks.
  • Tasks: These represent activities that may be undertaken for a project. A task belongs to exactly one project.
  • Users: They are participants who undertake tasks. Users can assign time spent to different tasks.
  • Task log: This is a record of the time spent by a user on a task. The time spent is stored in minutes.

These entity definitions result in a very simple database design:

The Task Time Tracker Database

We will prefix all of our 3T tables with ttt_. Large enterprise databases may contain hundreds of tables, and you will soon appreciate the prefixing of table names to group related tables.