0

我正在处理 SQL Server 2008 中的数据库表,它是经典 ASP 应用程序的后端。我继承了这个数据库表,其中包含每门课程的“结果”。

每行代表一个“目标”,然后“结果”在列中 - 列值表示目标是否满足特定结果。

这是当前 db 表的列的示例:

ID | Objective | Outcome1 | Outcome2 | ... Outcome11

最近,有人表示需要为每一行添加一组新的描述符。简称“KSA”,代表“知识、技能和态度”。基本上,KSA 集将每个结果的描述“分解”成精细的细节。

在 Knowledge 中,有一组特定于第一个结果的标识符。第二个结果有一组不同的标识符,依此类推。“技能”和“态度”每个都有自己的标识符,这些标识符也因结果而异。

为了帮助总结,每门课程都有未知数量的目标——通常是 10-20 个。他们不知道的原因是他们是由教师输入到应用程序中的,数量取决于他们课程的特定要求。

对于每个目标(行),已有 11 个结果列。

新的 KSA 方面将包含:

...... a variable number of identifiers for "Knowledge" that relates to outcome 1.

and... a variable number of identifiers for "Knowledge" that relates to outcome 2.

and so on...thru outcome 11

and... a variable number of identifiers for "Skills" that relates to outcome 1...

and... a variable number of identifiers for "Skills" that relates to outcome 2...

and so on...thru outcome 11

and... the same for "Attitudes"

and so on...thru outcome 11

我继承了表格,其中为 11 个结果中的每一个提供了单独的列。我们将保留这一方面,并​​通过添加 KSA 来添加更多细节。但是,随着 KSA 的添加,我想知道添加数据结构的最佳方法。如果我要为每个 KSA 提供一个单独的列,我最终会得到大约 140 个新列,而且似乎应该有更好的方法来保存数据。此外,许多 KSA 列可能包含空值。

另外,我曾想过将所有 KSA 数据放在一个列中,作为一个分隔字符串,但是当用户执行搜索时,似乎会出现性能问题,因为需要执行相当多的操作每次都在弦上。

以下是 KSA 中“大纲”形式的数据示例,它说明了如何使用 KSA 描述符将每个结果分解为更精细的细节:

Outcome: Calculations-The graduate will be able to perform calculations accurately. 
    Knowledge:
    1.  specific calculations 
    2.  specific factors that influence calculations. 

    Skills:
    1.  employing consistently accurate mathematical ability in all calculations.
    2.  applying principles of calculations and specific factors to determine the appropriate use of therapy. 
    3.  completing calculations needed to prepare specific results.

    Attitudes:
    1.  stating the importance of accurate calculations.
    2.  recognizing the impact of calculation errors on response and risk 

添加 KSA 元素的最佳方式可能是什么?由于每个结果的数据被拆分为多个描述符的方式,我曾考虑使用单独的表,但不知道如何从逻辑上进行。

谢谢你的帮助。

4

1 回答 1

2

我会将结果列更改为引用“结果”表的外键,其中引用记录的一个字段为您提供您目前在主表中拥有的字符串描述,其他字段是 KSA 或引用的字符串根据 KSA 元素是否对结果是唯一的,放入其他 K、S 和 A 表中。

于 2013-10-15T15:43:13.077 回答