ganotedp posted the following extremly interesting and helpful URL in Thread669-799932 : .
Now I'm working at home in Access 2000 on a finance/contact info/web info database with these new ideas and understandings.
I have mostly been going lickety split and answering my own questions as they arise, but I've started to slow down with some uncertanties, so I'm once again hoping some generous readers might chip in!
I have several ideas for how to actually implement Locators.
- LocatorType, LocatorSubType, and I was starting to add LocatorSuperType. The Locator table would point to the smallest of these (subtype) and each of those tables would point to the one above it for a hierarchy. For example:
LocatorTypes: results of query joining 3 tables together
[tt]SuperL Locator SubL
Physical Address Address1
Physical Address City
Physical Address State
Physical Geo Latitude
Physical Geo Longitude
Electronic Phone Land
Electronic Phone Mobile
Electronic Messenger Yahoo
Electronic Messenger AIM[/tt]
- Then I thought, well, gee, what if I want more levels? Will I have to have a SubSubLocatorType and a SuperSuperLocatorType? Why not collapse them all into one table with a Parent field? I wrote a function to walk the tree upwards and return a name in my tables so I can make sense of them in raw format or if entering data in datasheet & subdatasheet view, e.g. "Electronic: Phone: Land."
LocatorTypes
[tt]ID Name Parent CanBeSelected
1 Physical (Null)
2 Electronic (Null)
3 Address 1
4 Geo 1
5 Phone 2
6 Messenger 2
7 Address1 3 True
8 City 3 True
9 State 3 True
10 Latitude 4 True
11 Longitude 4 True
12 Land 5 True
13 Mobile 5 True
14 Yahoo 6 True
15 AIM 6 True[/tt]
-This was pleasing me so far, but then I started working on an Attributes table and came up with an additional problem.
Aside: In the web page referenced above, this is called "External Party Identifier" but only has the "is identified by" field. (I dont fully understand the "identifies" link. I, a party, am identified by my Social Security Number, but how is an identifier identified by a party? Isn't is the same relationship?)
So, anyway, I want to store attributes about parties. For example, company size, height, weight, number of fingers, number of buildings (numbers, single or long or other)? Yearly earnings, Pay rate (currency)? Eye color, skin color, slogan (text)?
Plus, are locators and attributes something that could be combined into one table? Locator could be just another kind of attribute with subattributes and sub-sub-attributes.
But... I can't put these all in one table. Not if they are different data types. So, do I have to have a separate table for each data type, and make the top or bottom hierarchy of my attributes be Number, Currency, and Text? Or make a new field in AttributeTypes called DataType?
Then join separate tables to this to store the actual values?
[tt]AttributeLongs
AttributeDoubles
AttributeCurrencies
AttributeTextValues
...[/tt]
[tt]Attributes
Metrics: Eye Color, Type:Text
Peculiars: Favorite Color, Type:Text
Metrics: Eye Count, Type:Integer
Peculiars: IsVegetarian, Type:Boolean[/tt]
I certainly don't want to make a table with fields like:
[tt]AttributeID LongValue TextValue BooleanValue[/b][/tt]
and put a value only in the one that is correct.
- There's no Variant type in Access so I can't use that.
- I could store all the values in a text field and convert them on use (yuck).
Right now it's looking like the only thing to do is have separate tables for each data type.
Anyone want to help... not just with my specific questions, but also if you see errors or assumptions in my thinking that you'd like to point out!
I'd be happy to give you a copy of my empty database so far if you want to inspect it.
-E²
Now I'm working at home in Access 2000 on a finance/contact info/web info database with these new ideas and understandings.
I have mostly been going lickety split and answering my own questions as they arise, but I've started to slow down with some uncertanties, so I'm once again hoping some generous readers might chip in!
I have several ideas for how to actually implement Locators.
- LocatorType, LocatorSubType, and I was starting to add LocatorSuperType. The Locator table would point to the smallest of these (subtype) and each of those tables would point to the one above it for a hierarchy. For example:
LocatorTypes: results of query joining 3 tables together
[tt]SuperL Locator SubL
Physical Address Address1
Physical Address City
Physical Address State
Physical Geo Latitude
Physical Geo Longitude
Electronic Phone Land
Electronic Phone Mobile
Electronic Messenger Yahoo
Electronic Messenger AIM[/tt]
- Then I thought, well, gee, what if I want more levels? Will I have to have a SubSubLocatorType and a SuperSuperLocatorType? Why not collapse them all into one table with a Parent field? I wrote a function to walk the tree upwards and return a name in my tables so I can make sense of them in raw format or if entering data in datasheet & subdatasheet view, e.g. "Electronic: Phone: Land."
LocatorTypes
[tt]ID Name Parent CanBeSelected
1 Physical (Null)
2 Electronic (Null)
3 Address 1
4 Geo 1
5 Phone 2
6 Messenger 2
7 Address1 3 True
8 City 3 True
9 State 3 True
10 Latitude 4 True
11 Longitude 4 True
12 Land 5 True
13 Mobile 5 True
14 Yahoo 6 True
15 AIM 6 True[/tt]
-This was pleasing me so far, but then I started working on an Attributes table and came up with an additional problem.
Aside: In the web page referenced above, this is called "External Party Identifier" but only has the "is identified by" field. (I dont fully understand the "identifies" link. I, a party, am identified by my Social Security Number, but how is an identifier identified by a party? Isn't is the same relationship?)
So, anyway, I want to store attributes about parties. For example, company size, height, weight, number of fingers, number of buildings (numbers, single or long or other)? Yearly earnings, Pay rate (currency)? Eye color, skin color, slogan (text)?
Plus, are locators and attributes something that could be combined into one table? Locator could be just another kind of attribute with subattributes and sub-sub-attributes.
But... I can't put these all in one table. Not if they are different data types. So, do I have to have a separate table for each data type, and make the top or bottom hierarchy of my attributes be Number, Currency, and Text? Or make a new field in AttributeTypes called DataType?
Then join separate tables to this to store the actual values?
[tt]AttributeLongs
AttributeDoubles
AttributeCurrencies
AttributeTextValues
...[/tt]
[tt]Attributes
Metrics: Eye Color, Type:Text
Peculiars: Favorite Color, Type:Text
Metrics: Eye Count, Type:Integer
Peculiars: IsVegetarian, Type:Boolean[/tt]
I certainly don't want to make a table with fields like:
[tt]AttributeID LongValue TextValue BooleanValue[/b][/tt]
and put a value only in the one that is correct.
- There's no Variant type in Access so I can't use that.
- I could store all the values in a text field and convert them on use (yuck).
Right now it's looking like the only thing to do is have separate tables for each data type.
Anyone want to help... not just with my specific questions, but also if you see errors or assumptions in my thinking that you'd like to point out!
I'd be happy to give you a copy of my empty database so far if you want to inspect it.
-E²