I am seeking coaching from normalization experts as I build a data model for a temporary database that will house local data for now but will be translated to the website we're building. The web-based database will be developed by a professional programmer but we need a temporary solution since customers have already signed up and we're managing transactions and data manually. This exercise I hope will help me write finish writing the specs for the web app.
I'll try to explain the requirements by outlining a scenario for you...
So my first question is...
Q1
The employer may have multiple contacts with authority relative to the transactions. Should I just flag those people with a type code in the employee table or put them in a separate table? My thought is add a field called type code (O = owner, A = admin, P = Professional Advisor, E = employee) to the employee table and then another table for the Code descriptions.
In this scenario, O's, A's and P's would have a permission level defined in the webapp down the road. For now, we'll just describe it because obviously they won't be logging into the local database. We still want to define them because we want to track who has the authority to, for example, change the amount (not E's) which they will do via phone or email for now.
Deposits would be made to the accounts of O's and E's but not to P's because they would be professional external advisors, such as a Chartered Accountant.
Employees
EmployeeID (PK)
TypeCode (FK)
EmployerID (FK)
FirstName
LastName
etc...
EmployeeCode
TypeCodeID (PK)
PermissionLevel (FK)
TypeDescription
Permissions
PermissionLevel (PK)
Description
Coaches - over to you! TIA
I'll try to explain the requirements by outlining a scenario for you...
- A brokerage offers an insurance type product to their clients (employers)
- A broker from the brokerage sells the product (we may also sell it directly so no commission on the transaction)
- The broker and the brokerage are paid a commission on the initial sale of the product and on each transaction
- The employer enrolls their employees in the program.
- The employer regularly deposits money into an account for the employee to spend on specific services
- The employee submits receipts for which they are reimbursed from the amount in their account
So my first question is...
Q1
The employer may have multiple contacts with authority relative to the transactions. Should I just flag those people with a type code in the employee table or put them in a separate table? My thought is add a field called type code (O = owner, A = admin, P = Professional Advisor, E = employee) to the employee table and then another table for the Code descriptions.
In this scenario, O's, A's and P's would have a permission level defined in the webapp down the road. For now, we'll just describe it because obviously they won't be logging into the local database. We still want to define them because we want to track who has the authority to, for example, change the amount (not E's) which they will do via phone or email for now.
Deposits would be made to the accounts of O's and E's but not to P's because they would be professional external advisors, such as a Chartered Accountant.
Employees
EmployeeID (PK)
TypeCode (FK)
EmployerID (FK)
FirstName
LastName
etc...
EmployeeCode
TypeCodeID (PK)
PermissionLevel (FK)
TypeDescription
Permissions
PermissionLevel (PK)
Description
Coaches - over to you! TIA
Last edited: