Quote:> What is the best way to model a company, its parent companies, and its
> affiliated companies? I have a company table with 2 self joins (one
> for Parents and one for Affiliates). However, a Company might have
> several Affiliates. Does that mean I should have a separate Affiliate
> table?
its affiliated companies? <<Quote:>> What is the best way to model a company, its parent companies, and
Put the company information in one table and the structural information
in a second table. The second table will be (m:n) from your
description, should use the tax id numbers or other legal identifier and
contain information about the legal relationship (affilate, subsidary,
fully owned, x-% owned, privately held, etc.)
Beware of n-ary relationships that can lead to 5NF problems.
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Give a look at the Data Model Resource book revised edition volume 1Quote:>What is the best way to model a company, its parent companies, and its
>affiliated companies? I have a company table with 2 self joins (one
>for Parents and one for Affiliates). However, a Company might have
>several Affiliates. Does that mean I should have a separate Affiliate
>table?
Lerch
1. Extracting Parent Model from Nested Sets Model
As i had seen an outer join as the only suggestion out there i
wondered if there werent a faster query for tables with a lot of
nested sets.
This is for mysql, but seems to be translatable to other dbs(?):
THEN right+1
END, name
FROM categories
ORDER BY left;
Nuncanada
2. Convert VB Function to T-SQL
5. Parent-Child Modeling Problem
6. CFP ECOOP94 Workshop "Common Elements for Object-Oriented Programming S
7. Extract parent node from CELKO nested set model
8. US-GEAT0702-POSITIONS IN ORACLE APPS WITH A GE AFFILIATE
9. looking for e-commerce which can handle affiliate program
10. Popular affiliates query problem
11. Parent Dimension And Parent Member Can Change.