sql - Table design for payments -
i have table holds data person on project. table has start
date field nullable end
date field. so, person on project start
end
.
at moment, billable project. have new requirement that, period, can non-billable, yet, still working on project. so, have been assigned project, , working, reason, client isn't billed part of period assigned, or maybe billed @ lower rate.
my idea have exclusion type table, linked person assignment table have start date, , end date, , rate
column, set 0 no-charge, or else, works override value period.
does seem valid design? person billed 95% of time, , never had exclusion, makes more sense me have exclusion table.
if has idea of how better, great.
at moment, have 'calendar' table, join based on start/end date of person's schedule daily rate. so, join exclusion date well, see if there override of rate?
issues might find design, lot of joins based on:
on datevalue between start , end
and not sure they're efficient joins.
if exception 1 or more period of times (one-to-many) 1 project design using exclusion table best design.
example:
june 1, 2013 june 30, 2013
exclusion:
june 9, 2013 - 0 rate june 25 27 - 30% of original rate
however, if exclusion possible , can maximum of 1 single period (or one-to-one type of relationship) might instead put on same fields other fields on project table.
example:
june 1, 2013 june 30, 2013
exclusion:
june 9, 2013 - 0 rate
Comments
Post a Comment