- Enterprise ApplicationDevelopment with Ext JSand Spring
- Gerald Gierer
- 198字
- 2021-07-21 17:57:21
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](https://epubservercos.yuewen.com/5BED0A/19470456001891306/epubprivate/OEBPS/Images/5457_02_21.jpg?sign=1739570633-tIKrIJDhqvNR6si18PtWjKdKSpOxSToc-0-5663c825192f67dcf00d3ef245a2d8cd)
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.