| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Attribute name prefixes, domains, joins, ISO 11179
incog_au wrote:
> mAsterdam wrote:
>
>> 87 Suiss franks - is the naming part freely available somewhere?
And they even provide links to the ISO PDF's, great. Thank you.
>>> 3) The attributes have three letter prefixes, same problem as (2). >> >> exposing the type / domain.
Earlier confusions around the terms 'type' and 'domain'
in this group have lead to a list of common usages
in the glossary.
See below.
>>> The obvious first list, using a D prefix to distinguish between the >>> domains and the attributes themselves, is... >>> DProductCode, DProductName, DProductCreatedDate, DWarehouseCode, >>> DWarehouseName, DWarehouseCreatedDate
>> The type/domain doesn't care about the context - a value is either >> in the defined set or not. >> The domain/type names can/should only reflect the defined set >> of values. In these names there is context.
>> DCreatedDate still holds context, so it assiociates with something >> different than just the set of values. It doesn't name the domain, >> it names something else.
What's that, just a date? 'Just' appeals to some common understanding we have about it - and I claim we have that common understanding. It very effectively facilitates us to communicate about dates.
I also claim that that common understanding is not enough to have our (your and mine) automated systems communicate with eachother about dates.
I just :-) state that DCreatedDate is a bad name for a domain because being involved in a creation event does not in itself have any effect on what values are or are not in the set. It is bad because it suggests it does.
ProductCode and WarehouseCode are different fish. Make sure the ProductCode authority and the WarehouseCode authority publish the respective Codes. These authorities own the sets of values. I have no objections to these names as names for domains.
> But there are different rules for a created / inserted date than other
> dates you might want to store. It cannot be earlier than the
> installation date of the system. When the row is inserted, it has to be
> "now". And given the requirements of the hypothetical system, it does
> not have a time component. These extra rules differentiate the
> underlying type (date) from the domain (createdDate).
>
>> What, to you, is the difference between type and domain?
Well, this is what the c.d.t. glossary currently says:
Differentiating between (your numbers) (2) and (3) with type for (2) and domain for (3) is not going to get accepted, I suspect. I've heard 'basic types' used for (2) and UDT (user defined type) for (3). Personally whenever I see 'domain' I first think of (1). Maybe it's best to just spell it out if there is room for misinterpretation.
>>> This question does not refer to those attributes which form part of a >>> foreign key, because these will certainly be named the same in the >>> referencing table as they are in the referenced table
>> Why? >> >> The name of the foreign key should reflect a role. >> >> Person: >> Person.Name PersonName. >> >> Game: >> Game.Black PersonName references Person, >> Game.White PersonName references Person, >> Game.Arbiter PersonName references Person.
What complication? Complication of what?
You stated that
"those attributes which form part of a
foreign key" ... "will certainly be named the same in the
referencing table as they are in the referenced table"
This practise causes trouble whenever there are more than
one foreign keys between two tables. The practise of basing
the name on roles avoids that trouble - it never arises.
> But my
> response to it is that what we are adding to the attribute name, here,
> is a "qualification term" according to ISO 11179. Hence my use of the
> word "implies" in "type + name implies domain" and not "type plus name
> equals domain". A human reading an attribute called "white person name"
> would presumably not have any problem understanding that a white person
> name is still a person name.
In the example 'PersonName' is meant to denote the type (UDT). The tables are Person and Game (should be Persons and Games if we go with the wikipedia interpretation of ISO 11179). The columns are Name, Black, White and Arbiter. The type (PersonName) is /not/ part of the column name.
Maybe you did not see
>> Both the type and the attribute have a name here.
(you snipped it).
> To use a simplified counterexample, if you
> called it "white male name" then we have a different class term and a
> different domain. I guess I'm suggesting that qualification terms can
> regularly (but perhaps not always) be excluded when considering which
> domains exist, and when they can be excluded is usually clear from the
> semantics.
Could you give a more explicit example? Received on Sat Nov 26 2005 - 13:16:45 CST
![]() |
![]() |