表与固定记录和表单设计协助的关系 [英] Table relations with fixed records and form design assistance

查看:107
本文介绍了表与固定记录和表单设计协助的关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,

我有一个简单但非常重要的数据库基本问题,关于表格与固定值的关系以及我面临的表格设计问题,以便轻松输入数据。

我有大约3张桌子

o tbl_company

o tbl_Main_category

o tbl_Sub_category


主类别表有8条记录,子类别表有100条记录,由主类别表中的8条记录共享不同的颜色 - 一对多个相关的


o这两个表中的这些值都是明确的字段值,不能改变即 - 不需要新的条目。但是,将要更改的信息是tbl_company表中的记录,即将输入新的公司详细信息,并在子tbl_Sub_category中输入相应的分数值


o公司将有一个类别其子类别和分配给每个公司子类别的分数。其子类别与主要类别相关


数据库性能/流程预期:


行为:当输入新公司时,用户无需为新公司重新输入任何类别+子类别信息,因为它已预先输入一次

表单设计:需要按公司过滤以查看每个公司的相关主要和子类别值。


我的初始设计:
第一尝试:

2关系:

o tbl_Main_category - 一方 - tbl_Sub_category -many方

o tbl_Main_category是一方& tbl_company是多方面


第二次尝试:

2关系:

o tbl_company -one side tbl_Main_category - 多方

o tbl_Main_category - 一方 - tbl_Sub_category -many方


上述表格关系都要求用户重新输入类别&每个新公司的子类别值,反之亦然。

我不知道这是否是最好的前进方式。 .i.e。为每家公司重新输入相同的值。


注意:输入新公司后,输入每个子类别的分数。

将会欣赏前进的方式关于这个:


我已经走了一圈试图想出一个可行的方法与表关系,现在麻木和疲惫。


我也在考虑创建8个表,代表8个主要类别,并将子类别作为字段值,但这将是紫罗兰数据库设计规则。

我不知道我可以应用规范化规则的程度。


提前感谢您的帮助!!!

解决方案

我无法理解两者之间的关系表,特别是关于分数以及为什么它将存储在子类别表中。


你能从每个表中发布一些样本数据吗?


< blockquote>

Jerr y:

当输入新公司时,用户无需向新公司重新输入任何类别+子类别信息,因为它预先输入一次



当然,每个新公司都需要为其他两个表设置的FK值?我假设您说这项工作将是对任何新公司进行分类所需要的程度吗?


我希望这需要填充现有记录的ComboBox列表,为每个类别和子类别值选择一个。


Rabbit ,子类别是用于衡量公司的明确标准名称。测量得分值分配给公司的每个子类别。子类别名称对于任何新公司都不会改变,因为这些是公司评估的度量工具。就像我说的那样,当衡量一家新公司时,只需要为每个相应的子类别输入得分值。

NeoPa 你是对的。这正是我想在表关系中实现的,但是你可以进一步阐述从组合框中填充值。


如果我的问题太浅,我很抱歉..


Dear all,
I have a simple but very important database fundamental question on table relations with fixed values and its form design problem I am facing for easy data entry.
I have about 3 tables
o tbl_company
o tbl_Main_category
o tbl_Sub_category

The Main Category table has 8 records and subcategory table has 100 records shared differently by the 8 records from the Main Category table)-one to many related

o These values from both table are definite field values and cannot change i.e. - no new entry is required. However the information that will change is the records in tbl_company table i.e. new company details will be entered and a corresponding score value will be entered in the sub tbl_Sub_category

o A company will have a category with its subcategory and a score assigned to the subcategory of each company..in which a sub category is related to the main category

Database performance/process expectations:


Behavior: When a new company is entered user need not have to re-enter any category + sub category infor to the new company since its pre?entered once
Form Design: Need to filter by company to see the related main and sub category values for each company.

My initial design:
First attempt:
2 Relationships:
o tbl_Main_category - one side - tbl_Sub_category -many side
o tbl_Main_category is the one side & tbl_company is the many side


Second attempt:
2 Relationships:
o tbl_company -one side tbl_Main_category - many side
o tbl_Main_category - one side - tbl_Sub_category -many side

Both the above table relations require the user to re-enter category & sub category values for each new company or vice versa.
I don?t know if this is the best way forward. .i.e. re-entering same values for each company.

Note: Once a new company is entered a score for each subcategory is entered.
Would appreciate a way forward on this:

I have gone in circles trying to come up with a workable method with the table relations and now numbed and exhausted.

I am also thinking of creating 8 tables representing the 8 main categories and have the subcategories as the field values but that will violet database design rules.
I don?t know how far I can apply the normalization rules.

Thanks in advance for any help!!!

解决方案

I''m having trouble understanding the relationships between the table, especially in regards to the score and why it would be stored in the subcategory table.

Can you post some sample data from each table?


Jerry:
When a new company is entered user need not have to re-enter any category + sub category info to the new company since its pre-entered once

Surely every new company needs the FK values set up for the other two tables? I assume you are saying that that work will be the extent of what is required to categorise any new company?

I would expect that to require ComboBox lists populated with the existing records, from which one is selected for each of the Category and Sub-Category values.


Rabbit, the subcategories are definite criteria names that are used to measure a company..once measured a score value is assigned to each sub category for the company..The subcategory names does not change for any new company as these are the measurement tools for company assessment. So like I was saying when a new company is measured, only the score value is required to be entered for each corresponding subcategory.

NeoPa You are right. That is exactly what I would like achieve in the table relations but could you eloborate further on populating values from combo box .

I am sorry if am too shallow on my question..


这篇关于表与固定记录和表单设计协助的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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