[Top] [Prev] [Next] [Bottom]

Annex B

(Informative)

Encoding Multi-valued Attributes

Attributes that can be multi-valued shall be in their own tables, along with any other attributes that are functionally dependent. For example, say entity "road" has attributes "num_lanes", "name", "oper_status", and "route_number." "Name" can have many values for a single entity instance. Further, every value of "name" may have its own route number. Since the value of attribute "route_number" is dependent on "name" then both of these are put in their own table. The modules that follow illustrate the proper way to handle multi-valued attributes.

The line module LE01 references the attribute records in the Attribute Primary modules that describe the entity instance being represented. The attribute module AP12 contains the attributes that are not multi-valued for entity "road". The attribute module AP13 contains the multi-valued attribute "name" along with its functionally dependent attribute "route_number".


Module Type: Line


LINE


ATID


...


MODN


RCID


OBRP


MODN


RCID


LE01


52


LE


AP12

AP13

AP13


18

01

02


LE01


53


LE


AP12

AP13

AP13


19

03

04


Module Type: Attribute Primary


ATPR


ATTP


MODN


RCID


NUM_LANES


OPER_STATUS


AP12


18


2


IN USE


AP12


19


4


CONSTRUCTION


Module Type: Attribute Primary


ATPR


ATTP


MODN


RCID


NAME


ROUTE_NUMBER


AP13


01


Main Street


n/a


AP13


02


Highway J


J


AP13


03


I-70 N Bypass


470


AP13


04


Memorial Expy


155

Repeating the row, as shown in the following modules, is an undesirable solution. Attributes that do not repeat are duplicated in subsequent rows. It is not clear whether the two attributes with changing values are related or not.


Module Type: Line


LINE


ATID


...


MODN


RCID


OBRP


MODN


RCID


LE01


52


LE


AP11

AP11


23

24


LE01


53


LE


AP11

AP11


25

26


Module Type: Attribute Primary


ATPR


ATTP


MODN


RCID


NUM_

LANES


NAME


OPER_STATUS


ROUTE_

DESIGNATOR


AP11


23


2


Main Street


IN USE


n/a


AP11


24


2


Highway J


IN USE


J


AP11


25


4


I-70 N Bypass


CONSTRUCTION


470


AP11


26


4


Memorial Expy


CONSTRUCTION


155

NOT the proper way of handling multi-valued attributes.



[Top] [Prev] [Next] [Bottom]

yourEmail@xyzcorp.com
Copyright © 1997, XYZ Corporation. All rights reserved.