A
Arty
Hi,
I'm designing a DB for our company. Well, actually I have already done the
initial design and have put together a whole bunch of forms but then I
thought of the queries and wasn't sure my design was all that good.
Well, what we'd like to do is keep track of hire histories for our personnel
so basically I created a hire table that all of the history for each
employee will go in. Then for each of the hires there will be
sub-histories - when they change departments, levels, etc. (I created
separate tables for each of those). It seems to work nicely while you're
entering the info. But let's get back to queries. What if wanted to see
their current position information including departments, levels, etc.? To
me, it seems that I would have to run a whole bunch of sub-queries on those
history tables to pull up the most current record (by probably using "top 1"
and "order by start_date desc") and then join them all together with one
big query. It's just seems too "bulky" to me... Plus I need to get that info
quite often.
I thought that I could add a field called "current" or something like that
to each of the history tables but it just doesn't seem right to me in terms
of the design....
I would really appreciate your suggestions. Thank you in advance.
Arthur
I'm designing a DB for our company. Well, actually I have already done the
initial design and have put together a whole bunch of forms but then I
thought of the queries and wasn't sure my design was all that good.
Well, what we'd like to do is keep track of hire histories for our personnel
so basically I created a hire table that all of the history for each
employee will go in. Then for each of the hires there will be
sub-histories - when they change departments, levels, etc. (I created
separate tables for each of those). It seems to work nicely while you're
entering the info. But let's get back to queries. What if wanted to see
their current position information including departments, levels, etc.? To
me, it seems that I would have to run a whole bunch of sub-queries on those
history tables to pull up the most current record (by probably using "top 1"
and "order by start_date desc") and then join them all together with one
big query. It's just seems too "bulky" to me... Plus I need to get that info
quite often.
I thought that I could add a field called "current" or something like that
to each of the history tables but it just doesn't seem right to me in terms
of the design....
I would really appreciate your suggestions. Thank you in advance.
Arthur