简体   繁体   English

经理/员工数据库设计

[英]manager / employee database design

How would you modify the manager/employee relationship (as seen here ) if managers have an additional attribute that normal employees lack? 你将如何修改经理/员工关系(如看到这里 )如果管理者有一个额外的属性,正常的员工缺乏?

For example, if managers are assigned a parking spot (which itself would be a reference to a parking spot table). 例如,如果为管理人员分配了停车位(其本身就是对停车位表的引用)。

Sounds like the solution would be a "assigned_to" column in the parking lot table. 听起来解决方案将是停车场表中的“ assigned_to”列。 Your database doesn't need to know who has the right to "own" a parking lot in my opinion. 我认为您的数据库不需要知道谁有权“拥有”停车场。

As altenrnative: create a table with parking lot and employee as columns, if more than one employee(or manager) can share a parking_lot. 另外,如果一个以上的雇员(或经理)可以共享一个parking_lot,则创建一个以停车场和雇员为列的表。

One sidenote: it looks as if you are designing your database for the actual situation - that might change in the future; 一个旁注:看起来好像您是在为实际情况设计数据库-将来可能会改变; you cannot know if normal employees won't get a parking lot in the future! 您不知道普通员工将来是否不会获得停车场!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在设计员工和经理关系时需要帮助 - Need help with the design of the Employee and Manager relationship SQL 数据库设计时间表员工与工作人员 - SQL Database Design Timesheet Employee vs Crews 员工、部门和角色层次结构的数据库设计 - Database design for employee, department and role hierarchy 用于存储员工的多个地址和联系电话的数据库设计 - Database design for storing multiple address and contact number of a employee 如何设计数据库并将Phone作为与另一个(与员工)关系的表 - How to design database and make Phone as a table that is in a relationship with another one(Employee) 更好的数据库设计可将大量员工详细信息保存在mysql中 - better database design to save large employee details in mysql 管理员和雇员具有相似角色时的数据库设计,但管理员可以查看所有其他雇员数据 - Database Design when Admin and Employee have similar roles except Admin can see all the other Employees Data 在员工,经理和部门关系中实现参照完整性 - Achieving referential integrity in an Employee, Manager and Department relationship 自助加入获取员工经理姓名 - Self Join to get employee manager name 设计具有多个雇主的员工的最有效方法 - Most efficient way to design an employee with multiple employers
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM