本文介绍了明智的表结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在开发一个访问应用程序,其中一部分涉及在不同的时间内将人员分配到不同的项目。到目前为止,这么好。 我遇到的问题是项目可以预测(招标)或坚定。已经招标的项目与那些坚定的项目具有不同的属性。 我试图这样做的方法是使用Tender表,Projects表,Timespan表和一个人表。 Timespan表包含对人的查找。 有两个连接表,一个在Timespan和Tender之间,另一个在两者之间时间跨度和项目。 一个问题是没有什么可以阻止Timespan加入招标和项目,这不是很理想。 我的主要问题是,对我来说这样订购它似乎并不合乎逻辑。将敏感的查询放在一起会让人感到恼火(我对Access不是特别有经验或熟练)。 如果有人对我如何安排事情有任何建议更明智的是,我会非常感激。 非常感谢,解决方案 我假设是招标你的意思是它们是为了将来 - 只是不是一个活跃的项目,或者它可能是是/否(投标或不投标)。 你的TimeSpan表是否包含贵组织的时间跨度或时间跨度为招标/项目?不能同时进行项目和投标吗? 如果您考虑一下 - 投标可能没有与项目不同的属性,但只有不同的值分配给属性。 以下是项目数据库中的一些表(实际上有大约40个表)。每个项目可以是不同的大小和类型。每个人都可以分配自己的里程碑和人员。我这样做的公司根据项目规模和复杂程度设定了项目的发布日期。人员可以在不同的项目中拥有不同的角色(可以是一个开发人员,另一个是项目负责人) tblProjects((pk)ProjID,(fk)ProjTypeID,(fk)StatusID) - 项目 tblPersonnel((pk)PersID) - 组织人员 tblProjPers((fk)ProjID,(fk)PersID,(fk)RoleID) - 分配给项目 tblProjTypes((pk)ProjTypeID) - 组织项目类型 tblMilestones((pk)MilestoneID) tblProjMilestones((fk)ProjID,(fk )MilestoneID) tblProjStatus((pk)StatusID) tblRoles((pk)RoleID) 我不是除非你有更多问题,否则我真的希望得到答案只是想引发一些更多的想法...:D 如果你还没有,我会花一点时间来浏览规范化和表结构。我认为它可以帮助您更好地掌握如何以及为什么以建议的方式对事物进行更好的排序。我当然觉得它很有用。 I''m working on an access application, part of which involves assigning personnel to different projects for different amounts of time. So far, so good. The problem I''m having is that the projects can be either projected (tendered for) or firm. Projects that have been tendered for have different attributes to those that are firm. The way I''ve tried to do this is having a Tender table, a Projects table, a Timespan table, and a Persons table. The Timespan table contains a lookup to Persons.There are two join tables, one between Timespan and Tender, and one between Timespan and Project. One problem is that there''s nothing to stop a Timespan being joined to both a Tender and a Project, which is not really ideal. My main problem, though, is that it just doesn''t seem logically sensible to me to order it like this. It''s making it irritating to put sensible queries together (I''m not particularly experienced or skilled with Access). If anybody has any suggestions as to how I can arrange things more sensibly, I would be extremely grateful. Many thanks, 解决方案 I assume by "tendered" you mean they are slated for future - just not an active project OR it could be yes/no (Tender or Not). Does your TimeSpan table contain timespans for your organization or timespans for the tender/projects? Can''t a project and a tender occur at the same time? If you think about it a bit - a tender may not have different attributes from projects but only different values assigned to an attribute. Here are a few tables I have in a project database (it actually has about 40 tables). Each project can be a different size and type. Each can have it''s own Milestones and Personnel assigned. The company I did this for has set release dates for projects depending on project size and complexity. Personnel can have different roles on different projects (could be developer on one and project lead on another) tblProjects ((pk)ProjID, (fk)ProjTypeID, (fk)StatusID) - projectstblPersonnel ((pk)PersID) - org personneltblProjPers ((fk)ProjID, (fk)PersID, (fk)RoleID) - pers assigned to projectstblProjTypes ((pk)ProjTypeID) - organization project typestblMilestones ((pk)MilestoneID)tblProjMilestones ((fk)ProjID, (fk)MilestoneID)tblProjStatus ((pk)StatusID)tblRoles ((pk)RoleID) I don''t really expect an answer unless you have more questions. Just trying to spark some more thought... :D 这篇关于明智的表结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-27 05:17