Jump to content

Staff Table


jimfog

Recommended Posts

I am making a booking app. There is one table that holds the bookings.

A second table holds details for the (business)users for WHOM the bookings are made. Details such as name etc.

 

I want to make also a 3rd table that will hold staff names, staff of the business users.

 

So, the bookings table must ALSO hold the staff name the end user chose (such as the case of a hair salon).

The problem is how to connect all these tables, the relationship between them.

 

 

What do you suggest?

 

I have some ideas but before proceeding I want to hear what do you think

Obviously the bookings table must be connected(with a foreign key) with a staff table-what else must be done apart from that?

Link to comment
Share on other sites

The first step would be for you to make a list of every item that you think should be included in the set of tables.

That is the point I am trying to make.I am not sure what to include in one table, the staff table specifically.

The issue bolis down to this-read the logic below and tell me if it sounds OK:

 

The staff table should have 3 cols:

  • The name of the staff
  • A business users col indicating with whom business user the specific staff member is related to (a foreign key here points to a business users table)
  • a staffID column which will serve as the primary key and at the same time a foreign key from the bookings table will point to it(the staff table) so as to indicate that booking with whom staff is related to.

Link to comment
Share on other sites

You may have a calendar of holidays. You may have a daily work schedule. You may have a vacation schedule.You may have to reserve certain other resources. Are there any prerequisites for what is being scheduled? What staff are qualified? Do you have to schedule travel time?

Link to comment
Share on other sites

You may have a calendar of holidays. You may have a daily work schedule. You may have a vacation schedule.You may have to reserve certain other resources. Are there any prerequisites for what is being scheduled? What staff are qualified? Do you have to schedule travel time?

And how all these might affect the design of the database and always in relation with keeping staff name in a db table.

 

Besides, all these details you mention,cannot be determined presently. The app will keep evolving.

Link to comment
Share on other sites

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...