Jump to content
Server Maintenance This Week. ×

when is a table needed or not needed?


This topic is 5160 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a basic understanding, but confuse myself every time I begin to create a relational database.

Please tell me if my thinking is correct here. I need to track employees in positions for each shift per day. What I currently have is this, but I'm questioning one table:

Picture1-2.png

The 'shifts' table now seems redundant. While each day has 2 (and sometimes 3) shifts and each shift has multiple shift-positions, there's only one attribute for each shift (day, night, or detail). In shift-positions I need to reference which shift it belongs to, using a foreign key to do so. I could just move that shift attribute to the shift-position table, eliminating the shift table and keeping the same number of fields in shift-positions. The relationship between days and shift-positions would then be one step instead of two.

So, which is more correct? and why?

As always, thank-you for your time and help!

Link to comment
Share on other sites

This topic is 5160 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.