I'm creating a web portal for a business. I have three different tables for owners, customer, and employees. I also have a table called events where I will be storing event information. I want all the users(owners, customers, and employees) to have access to this table. What would be the best what of designing this? I also have the same question about the pricing.
I don't follow: what has the fact that different types of users need to have access to table Events got to do with the design of that table?
If what you mean is that an Event may be associated with any one of Employees, Customers and Owners then you can either have 3 foreign keys and a check constraint to enforce the rule that only 1 is applicable for any Event, or you can have a "supertype" table e.g. "People" like this:
Employees -- 1:1 -- People
Customers -- 1:1 -- People
Owners -- 1:1 -- People
The problem is I'm creating a site that allows owners, customers, and employees to logon to a web site. Each table has the username, password and users personal information. The owners can give the customers or employees access to the calendars (event table). I'm wondering how I can have a 1 to many relationship with the owner table and the employee & customer table and still allow the owners to grant permissions to the event table? I'm a novice at db design when it comes to relating it to a web application. Can someone help.