Click here to Skip to main content
14,272,257 members
   

Database

 
GeneralRe: I didn't design it but I need to get data out of it. Pin
rnbergren2-Aug-19 8:12
memberrnbergren2-Aug-19 8:12 
AnswerRe: I didn't design it but I need to get data out of it. Pin
ZurdoDev2-Aug-19 10:33
professionalZurdoDev2-Aug-19 10:33 
AnswerRe: I didn't design it but I need to get data out of it. Pin
Mycroft Holmes2-Aug-19 13:40
memberMycroft Holmes2-Aug-19 13:40 
QuestionSQL Server: Facing problem to parse xml using xquery Pin
Mou_kol31-Jul-19 5:56
memberMou_kol31-Jul-19 5:56 
QuestionMessage Closed Pin
22-Jul-19 1:59
memberjohnwilliamsonn0922-Jul-19 1:59 
GeneralMessage Closed Pin
19-Jul-19 20:29
memberAbdulrahman Kalari19-Jul-19 20:29 
QuestionMessage Closed Pin
19-Jul-19 0:15
memberMember 1453550719-Jul-19 0:15 
Questionstructure question 2 Pin
Joan M18-Jul-19 21:25
professionalJoan M18-Jul-19 21:25 
Hi again!

I have a doubt:

Let's say I have a tasks table:

---------------------
Tasks Table
---------------------
id : INT (PK)
idProject : INT 
idUser : INT 
idTaskType : INT 
idInvoice : INT 
date : DATETIME
start_time : DATETIME
end_time : DATETIME
pricePerHour : FLOAT
notes : LONGTEXT
---------------------


Then I have a types of tasks table:
---------------------
Tasks types table
---------------------
id : INT (PK)
name : VARCHAR(45)
---------------------


Then I have a types of tasks table:
---------------------
Tasks types table
---------------------
id : INT (PK)
name : VARCHAR(45)
---------------------


Also a users table
---------------------
Users table
---------------------
id : INT (PK)
idGroup : INT
name : VARCHAR(45)
---------------------


And a projects table
---------------------
Projects table
---------------------
id : INT (PK)
idCustomer : INT
notes : VARCHAR(200)
---------------------


And a reference prices table
---------------------
Reference prices table
---------------------
idProject : INT (PK) -> foreign key to Id at projects table
idUser : INT (PK) -> foreign key to Id at users table
idTask : INT (PK) -> foreign key to Id at tasks types table
pricePerHour : FLOAT
---------------------


My idea is to have specific prices depending on the project, the user and the task to be performed.

As you can see there are two pricePerHour fields (one in the "Reference prices table" and one in the "tasks" table).

I've found that in some projects prices change during the project... so it would be able to change the prices on the fly...

What do you think if my GUI uses the reference price as basis to assign the task price?

That way I would be able to change the price of each task if needed (renegotiating...).

Is there any better way to do that?

modified 19-Jul-19 7:13am.

AnswerRe: structure question 2 Pin
Richard Deeming19-Jul-19 1:11
mveRichard Deeming19-Jul-19 1:11 
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 
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 

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.