且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要表格方面的帮助

更新时间:2023-02-26 14:14:08

你好


只要包含在其中的所有信息都直接与Job相关,那么Job表中有多少个字段并不重要。同样对客户而言。但是,在我看来,您可能需要一个将客户端连接到Job的中间表,因为(人们希望)您将拥有许多客户端和许多工作。中间表是创建必要的多对多关系的方式。


举一个简单的例子,我的招聘数据库有很多表,但最重要的三个是申请人,空缺和申请工作。在申请人表格中,我只记录了申请人特有的细节。在空缺表中,我只记录那些与所宣传的职位直接相关的细节,例如:职位申请表,招聘经理,薪级表,结账/面试日期等.PreeApplication表将两者结合在一起,无需为申请多个工作的申请人重新输入个人详细信息,也无需为每个申请人单独记录面试日期。但在该表格中,我能够记录申请人是否已经入围并进入面试时间。


在设计表格时,请考虑数据冗余,即您需要的数据必须继续输入多个记录。我建议你查看本网站上关于规范化的建议。


B
Hi

It doesn''t really matter how many fields your Job table has, as long as all of the information contained in them relates directly to the Job. Likewise for client. However, it seems to me that you might need an intermediate table linking Client to Job, as (one would hope) that you will have many clients and many jobs. The intermediate table is the way one creates the necessary many to many relationship.

To give a simplified example, my recruitment database has many tables, but the three most essential are Applicant, Vacancy and JobApplication. In the applicant table I record only those details that are unique to the applicant. In the vacancy table, I record only those details that relate directly to the post being advertised, e.g. post title, recruiting manager, salary scale, closing/interview date etc. The JobApplication table brings the two together, eliminating the need to re-enter personal details for those applicants who apply for more than one job or record interview dates separately for each applicant. But in that table I am able to record whether or not an applicant has been shortlisted and enter an interview time.

When designing your tables, think about data redundancy, i.e. data that you would have to keep entering for multiple records. I suggest you check out the advice given on this site around normalisation.

B


我猜本表同时包含客户和工作信息。

如上所述,您需要将其标准化为两个表:

tblClient包含客户端数据,tblJob包含作业数据和客户端ID。

最后,由于您需要多个地址,因此需要使用tblAddress作为唯一键ClientID和AddressID。


要创建Client表,您可以使用GroupBy查询如:


选择客户,地址,街道,城镇从tblOld集团按客户,地址,街道,城镇


当你有这个在图形查询编辑器中查询,将类型更改为maketable查询(使用Query菜单)并为新表命名为tblClient。


接下来为Job数据创建SELECT查询并在可打印的查询中进行更改。


最后创建w来自tblClient的groupby查询所需的tblAddress。


得到这个想法?


Nic; o)
I guess that the present table holds both Client and Job information.
You''ll need to normalize this, as described above, into two tables:
tblClient with the client data and tblJob with the job data and the Client ID.
Finally as you need multiple addresses a tblAddress will be needed with as the unique key ClientID and AddressID.

To create the Client table you can use a GroupBy query like:

select client, address, street, town from tblOld Group By client, address, street, town

When you have this query in the graphical query editor, change the type into a maketable query (use the Query menu) and give the new table the name tblClient.

Next create a SELECT query for the Job data and change that also in a maketable query.

Finally create also with a groupby query from the tblClient the needed tblAddress.

Getting the idea ?

Nic;o)


也可以查看本教程。

规范化和表格结构


Mary
It may help to check out this tutorial as well.

Normalisation and Table structures

Mary