fpendino
Registered User.
- Local time
- Today, 17:35
- Joined
- Jun 6, 2001
- Messages
- 73
Hi,
I am redeveloping a SQL database that I started several years ago. I have actually left this company and came back. Since being back, other developers have suggested different ways of storing/pulling data. I don't necessarily agree with their suggestions. I just have a couple scenarios where I'd like to recieve some feedback and given some opinions.
We have a reporting group which provides daily, monthly, yearly..etc, reports. I originally set this db up to be very flexible as far as the type of reporting that could be possible.
Part1
I have several Employee tables, each store bits and pieces of info. I did that to try to seperate some data that is confidential and not everytime people query for employee info, do they need every piece of info. In return, this should add a little speed, as if someone performs a query on system id's, well they don't need to see their address. I think I may change this and just create one table though, as suggested by other developers. Apparently they don't like Joins, which I understand but there would usually not be more than 2-3 joins.
Part2
I take a daily snapshot of each employees Department number and extension. We don't have a problem with storage as we only have about 300 active employees. The employees do move supervisors often so that's why i capture each day. I figure when comparing this snapshot table to other tables for reports, I can matchup the dates and be able to pull their supervisor for that date.
Now, heres kind of where I have some friction. When an employee moves groups mid month, there stats start over with the new supervisor, and go away from the old supervisor.
I have worked other places where that was not the case though, and they wanted to be able have reporting where it would show stats for this employee in both of the groups, effective their transfer date. With this my current setup would be useful. I have a feeling that they may need this in the future, as well. But it has also been suggested by others to just create one employee table, and keep multiple records for one employee within this table. So, if an employee transfers groups, add another record to this employee table with their new info, and store an effective date (or similar). Then use a view which returns all active employees and group it in a way which returns the last(current) record entered for them.
To me this just sounds like it could create more problems. Also it seems like like it could slow performance quite a bit. While my idea could require a little more maintenance at times(due to more data storage), I think it would be more ideal for performance. This db is mainly used for a backend to a dynamic website. I know my current setup runs smoothly and it works. I just have to talk others into it.
Any responses are greatly appreciated!! I have attached a snapshot, showing the table layouts, just for a better idea.
Thanks,
Frank
I am redeveloping a SQL database that I started several years ago. I have actually left this company and came back. Since being back, other developers have suggested different ways of storing/pulling data. I don't necessarily agree with their suggestions. I just have a couple scenarios where I'd like to recieve some feedback and given some opinions.
We have a reporting group which provides daily, monthly, yearly..etc, reports. I originally set this db up to be very flexible as far as the type of reporting that could be possible.
Part1
I have several Employee tables, each store bits and pieces of info. I did that to try to seperate some data that is confidential and not everytime people query for employee info, do they need every piece of info. In return, this should add a little speed, as if someone performs a query on system id's, well they don't need to see their address. I think I may change this and just create one table though, as suggested by other developers. Apparently they don't like Joins, which I understand but there would usually not be more than 2-3 joins.
Part2
I take a daily snapshot of each employees Department number and extension. We don't have a problem with storage as we only have about 300 active employees. The employees do move supervisors often so that's why i capture each day. I figure when comparing this snapshot table to other tables for reports, I can matchup the dates and be able to pull their supervisor for that date.
Now, heres kind of where I have some friction. When an employee moves groups mid month, there stats start over with the new supervisor, and go away from the old supervisor.
I have worked other places where that was not the case though, and they wanted to be able have reporting where it would show stats for this employee in both of the groups, effective their transfer date. With this my current setup would be useful. I have a feeling that they may need this in the future, as well. But it has also been suggested by others to just create one employee table, and keep multiple records for one employee within this table. So, if an employee transfers groups, add another record to this employee table with their new info, and store an effective date (or similar). Then use a view which returns all active employees and group it in a way which returns the last(current) record entered for them.
To me this just sounds like it could create more problems. Also it seems like like it could slow performance quite a bit. While my idea could require a little more maintenance at times(due to more data storage), I think it would be more ideal for performance. This db is mainly used for a backend to a dynamic website. I know my current setup runs smoothly and it works. I just have to talk others into it.
Any responses are greatly appreciated!! I have attached a snapshot, showing the table layouts, just for a better idea.
Thanks,
Frank