Click here to Skip to main content
14,299,406 members
   

Database

 
GeneralRe: structure question 2 Pin
Joan M19-Jul-19 1:14
professionalJoan M19-Jul-19 1:14 
GeneralRe: structure question 2 Pin
Richard Deeming19-Jul-19 1:27
mveRichard Deeming19-Jul-19 1:27 
PraiseRe: structure question 2 Pin
Joan M19-Jul-19 1:31
professionalJoan M19-Jul-19 1:31 
QuestionBest practices for database tables. Pin
RLD7114-Jul-19 12:37
professionalRLD7114-Jul-19 12:37 
AnswerRe: Best practices for database tables. Pin
CHill6017-Jul-19 23:17
protectorCHill6017-Jul-19 23:17 
AnswerRe: Best practices for database tables. Pin
Mycroft Holmes18-Jul-19 11:57
memberMycroft Holmes18-Jul-19 11:57 
GeneralRe: Best practices for database tables. Pin
RLD7121-Jul-19 3:37
professionalRLD7121-Jul-19 3:37 
Questionstructure question Pin
Joan M11-Jul-19 1:30
professionalJoan M11-Jul-19 1:30 
Hi all,

I'm thinking on making a small application to keep track of my working hours, billable or not...

I'd install it in my NAS to be able to access it from everywhere.

The database will be a MySQL database.

I'll do the programming in PHP (don't know any other thing for web).

I've been far away from databases for a long time and wanted to make a question about the right data structure...

I plan to have:

------------------
Table 1: CUSTOMERS
------------------
(PK) ID : autonumeric
Name : string
Address : string

------------------
Table 2: PROJECTS (1 customer can have N projects)
------------------
(PK) ID : autonumeric
Customer ID : number
Description : string

------------------
Table 3: TASKS_IN_PROJECT (1 project will have N tasks).
------------------
(PK) ID : autonumeric
Project ID : number
Person ID : number
Description : string
Date : timeDate
Start time : time
End time : time
Price per hour : number

------------------
Table 4: TASKS (N Tasks_In_Table will have 1 task).
------------------
(PK) ID : autonumeric
Description : string

------------------
Table 5: PEOPLE (N Tasks_In_Project will have 1 person).
------------------
(PK) ID : autonumeric
Person name : string

------------------
Table 6: EXPENSES_IN_PROJECT (1 project will have N expenses).
------------------
(PK) ID : autonumeric
Project ID : number
Note : string
Date : timeDate
Cost : number

------------------
Table 7: EXPENSES (N Expenses_In_Project will have 1 Expense).
------------------
(PK) ID : autonumeric
Description : string


My idea is having this database structure and then make a small PHP web page that would allow me to introduce customers, projects assigned to customers, tasks and persons for each project (those should be available from a combobox selecting from a list of available tasks (tasks table) and people (people table)), and also I would like to be able to add expenses to the project too in the same way... those expenses should be selected from a list coming from the Expenses table...

Do you think this is a good structure?

Have I done something terrible?

My objectives are:

1. storing all the worked hours.
2. being able to get some reports (total hours in a project, lists of tasks done...)

Thank you very much for your time and advice!
AnswerRe: structure question Pin
Eddy Vluggen11-Jul-19 2:01
mveEddy Vluggen11-Jul-19 2:01 
GeneralRe: structure question Pin
CHill6018-Jul-19 1:30
protectorCHill6018-Jul-19 1:30 
GeneralRe: structure question Pin
Eddy Vluggen18-Jul-19 22:53
mveEddy Vluggen18-Jul-19 22:53 
QuestionQuery numbering in groups in access database ? Pin
Member 24584674-Jul-19 23:50
memberMember 24584674-Jul-19 23:50 
SuggestionRe: Query numbering in groups in access database ? Pin
CHill6010-Jul-19 7:51
protectorCHill6010-Jul-19 7:51 
GeneralRe: Query numbering in groups in access database ? Pin
Member 245846710-Jul-19 17:57
memberMember 245846710-Jul-19 17:57 
GeneralRe: Query numbering in groups in access database ? Pin
CHill6010-Jul-19 21:38
protectorCHill6010-Jul-19 21:38 
QuestionHow To Fix SQL Database Error 824 ? Pin
Member 24584673-Jul-19 22:10
memberMember 24584673-Jul-19 22:10 
AnswerRe: How To Fix SQL Database Error 824 ? Pin
Richard MacCutchan3-Jul-19 23:44
protectorRichard MacCutchan3-Jul-19 23:44 
AnswerRe: How To Fix SQL Database Error 824 ? Pin
Eddy Vluggen4-Jul-19 2:49
mveEddy Vluggen4-Jul-19 2:49 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Member 24584674-Jul-19 17:40
memberMember 24584674-Jul-19 17:40 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Victor Nijegorodov4-Jul-19 20:20
memberVictor Nijegorodov4-Jul-19 20:20 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Member 24584674-Jul-19 23:49
memberMember 24584674-Jul-19 23:49 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Victor Nijegorodov4-Jul-19 23:52
memberVictor Nijegorodov4-Jul-19 23:52 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Richard MacCutchan5-Jul-19 1:47
protectorRichard MacCutchan5-Jul-19 1:47 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Eddy Vluggen5-Jul-19 1:04
mveEddy Vluggen5-Jul-19 1:04 
GeneralRe: How To Fix SQL Database Error 824 ? Pin
Member 245846718-Jul-19 18:21
memberMember 245846718-Jul-19 18:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.