项目/订单数据库 [英] Projects/Orders Database

查看:67
本文介绍了项目/订单数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想创建一个数据库来跟踪我们通常需要很长时间的销售项目。

一些项目分别导致销售和订单和一些丢失。

我目前有一个项目表,我输入每个项目的详细信息并跟踪它们。

我想要一些与订单相关的字段进入并跟踪订单详细信息。

我是否只需将订单相关字段添加到项目表中,其中字段对于丢失的项目将保持空白?或者我应该为订单设置一个单独的表并将其链接到项目表(我假设是一对一的关系)?哪一个是常用的方式,哪个更实用?

如果是单独的表,因为我已经有了很多现有记录的项目表,我怎样才能将新的订单表链接到为了在新表中为项目表中的现有记录提供相关记录?

如果有人可以帮我这个,我将不胜感激。

谢谢,

Hossein

Hi,
I?m trying to create a database to keep track of our sales projects which normally have long lead times.
Some projects lead to sales and respectively orders and some are lost.
I currently have a projects table where I enter the details of each project and keep track of them.
I would like to have some order related fields to enter and keep track of the order details.
Should I just add the order related fields to the projects table where the fields will remain blank for the lost projects? or should I set up a separate table for orders and link it to the projects table (I assume by a one-to-one relationship)? Which one would the common way and the more practical one?
In case of a separate table, as I have already the projects table with a lot of existing records, how can I link the new orders table with it in order to have related records in the new table for the existing records in the projects table?
I would appreciate if somebody can help me with this.
Thanks,
Hossein

推荐答案

您好Hossi,

如果您每个客户都有可能有多个订单/ project然后你必须有两个表。


你的Projects表上应该有一个唯一的标识符字段。如果没有进入表格设计并添加一个名为ProjID的字段并将其设置为自动编号。当你保存&关闭它,每个记录将按顺序编号。(早期版本的Access不允许您添加自动编号字段,如果表中已有数据但现在已修复)

在您的销售表中添加一个名为''ProjID''的字段,但是创建数据类型LongInteger。

然后,您必须手动将ProjID的值输入到Sales表中,以允许它们加入到他们的Project中。无论是想要一对一地保留两个表,还是一对多,或者即使您想将Sales中的数据复制到扩展的Projects表中,您都必须这样做(假设不会重复订单)


您不能依赖两个表上匹配的公司/客户名称,因为人们会引入空格,缩写和拼写错误,最终会阻止匹配。

这应该可以帮到你。

S7
Hi Hossi,
If you every have the possibility of having more than one order per customer/project then you must have two tables.

Your Projects table should have a unique identifier field on it already. If not go into table design and add a field called ''ProjID'' and set it to Autonumber. When you save & close it, each record will be numbered sequentially.(Earlier versions of Access would not allow you to add an autonumber field if there was already data in the table but this is now fixed)
In you Sales table add a field called ''ProjID'' but make the data-type LongInteger.
You will then have to manually enter values of ProjID into your Sales table to allow them to be joined to their Project. You will have to do this whether you want to retain two tables on a one-to-one basis, or a one-to- many, or even if you want to copy data from Sales into an extended Projects table (assuming there will not be repeat orders)

You can not rely on matching Company/Client names on two tables because people introduce spaces, abbreviations and typos that eventually stop thing matching.
This should get you started.
S7


嗨Sierra,

非常感谢您的及时帮助。每个项目可能有多个订单,然后我会去一个单独的表。

再次感谢,

Hossi
Hi Sierra,
Many thanks for your prompt help. It may be possible to have more than one orders for each projects, then I will go for a separate table.
Thanks again,
Hossi

嗨!

S7,您正在运行什么版本的Access?

我使用2007但是如果我有,我仍然无法简单地添加auto_number字段我桌上的一些数据。

谢谢。
Hi !
S7, what version of Access are you running ?
I use 2007 but still I am not able to simple add an auto_number field if I have some data in my table.
Thank you.


这篇关于项目/订单数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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