asp.net| Data | database
After a preliminary understanding of ASP.net Portal Starter kit (my previous article), I wanted to continue refactoring the code. At the time of conception, it would be better to think of a combination of five starter kits. Time Tracker (Timing management or project tracking) uses Microsoft's data Access Application Block as the database access layer, and I'm just going to do it, so let's take a look at asp.net time Tracker Starter Kit.
asp.net time Tracker Starter Kit, which provides project members (consultants) with each category in each project, plus statistical analysis, which is equivalent to the project member hour record card. For more information, see the article on the Microsoft website. Like reading the portal kit, start with the database.
Tables in the database:
Tt_categories: Project directory information
Field name
Type
Meaning
Note
CategoryID
Int
Directory ID
Primary KEY (AutoNumber)
ProjectID
Int
Owning Project ID
Associated Project Information table
Name
Nvarchar (50)
Directory Name
Abbreviation
Nvarchar (4)
Shorthand
Estduration
Decimal (9)
Estimated duration
Decimal place two bits (in hours)
Tt_entrylog: Project member hour record card
Field name
Type
Meaning
Note
Entrylogid
Int
Record ID
Primary KEY (AutoNumber)
Description
Nvarchar (255)
Job description
Duration
Decimal (9)
Finish work
Decimal digit two digits
EntryDate
smalldatetime
Record Date
ProjectID
Int
Owning Project ID
Associate Project Member Table
Userid
Int
Owning User ID
CategoryID
Int
Owning Directory ID
Tt_projectmembers: Project member table (this table reflects: a user can participate in multiple projects at the same time, and one project can have multiple users)
Field name
Type
Meaning
Note
ProjectID
Int
Project ID
Associated Project Information table
Userid
Int
Project Member ID
Associated User Information table
Tt_projects: Project Information table
Field name
Type
Meaning
Note
ProjectID
Int
Project ID
Primary KEY (AutoNumber)
Name
Nvarchar (50)
Project name
Description
Nvarchar (1024)
Project description
Manageruserid
Int
Project Manager ID
Associate User Table
Estcompletiondate
Datetime
Estimated time of completion
Estduration
Decimal (9)
Estimated duration
Decimal place two bits (in hours)
CreationDate
Datetime
Creating events
Default value: GetDate ()
Tt_roles: Role Information table
Field name
Type
Meaning
Note
Roleid
Int
Role ID
Primary KEY (AutoNumber)
Name
Nvarchar (50)
Role name
Tt_users: User Information table
Field name
Type
Meaning
Note
Userid
Int
User ID
Primary KEY (AutoNumber)
DisplayName
Nvarchar (50)
User name
Password
Nvarchar (50)
Password
Using MD5 encryption to store
UserName
Nvarchar (50)
Login name (user email)
Used to log in, and set to a unique index (to prevent the registration of the same email, so that when there is the same email insert when the program will throw an exception, catch this exception can determine whether the email is repeated, so you can dispense with the code to determine whether the email is repeated)
Roleid
Int
Role ID
Association role Information Table (Tt_roles)
Stored procedures in the database: (with the document in the detailed, do not repeat)
Each table relationship:
The relationship between the data tables in time Tracker is different from the portal, and there is a strong constraint relationship between the tables. Do better on the integrity constraints. In terms of the relationships in each table, it is consistent with the third paradigm of data design.