需要表格方面的帮助 [英] need help in forms

查看:85
本文介绍了需要表格方面的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是新手,对数据库知之甚少。我被赋予了创建涉及客户(公司工作请求)和工作的数据库的任务。


客户的主要密钥是ABN,而Job是其工作号。我的问题是,Job表包含70多个字段,我想以一对一的关系拆分表。我不知道该怎么做。当我将表分成30个字段,每个字段中每个表中的作业号作为外键时,它最终会产生一对多关系。


此外,在客户端表单中,我需要放置一个名为添加更多地址的按钮。我可以为同一个客户端添加多个地址信息。当我点击此按钮时,只有街道,邮政编码,国家等地址字段必须列在表单的同一页面中。我不知道如何做到这一点。


i非常感谢你的帮助。


i am new to access and have little knowledge in database. i have been given a task to create a database involving client (a company request for a job) and job .

Primary key for Client is ABN and for Job, its Job number. My question is, the Job table consists of more than 70 fields and i want to split the table with one-to-one relationship. i dunno how to do this. when i split the table into 30 fields each with Job number in every table as the foreign key, it ends up with one-to-many relationship.

Also, in the Client form, i need to place a button called "Add more address" where i can add more than one address information for the same client. when i click this button, only the address fields like Street, post code, country must be listed in the same page of the form. i dunno how to do this.

i would appreciate your help.

推荐答案

你好


只要包含在其中的所有信息都直接与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


这篇关于需要表格方面的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆