Re: How to model searchable properties of an entity

From: Marshall Spight <>
Date: Mon, 30 Aug 2004 04:20:15 GMT
Message-ID: <2WxYc.256964$eM2.119797_at_attbi_s51>

"mAsterdam" <> wrote in message news:41231c36$0$48933$
> Tony wrote:
> > Laconic2 wrote:
> >
> >>What's wrong with "a load of tables"? If each table relates to a
> >>"proposition" expressed as a "relation", then if you have a lot of
> >>propositions, perhaps you ought to have a lot of tables.
> >>
> >>It continues to baffle me why people think that terabytes of data is "not
> >>complex", but a hundred tables or so is beyond human comprehension. But
> >>that probably reflects the fact that I'm closer to the "data centric"
> >>mindset than I am to the OO mindset.
> >
> > I couldn't agree more. And if the issue IS coming from an OO
> > perspective, than how is having hundreds of classes and subclasses
> > good while hundreds of tables is bad?
> An important difference would be: the hundreds of tables,
> and so the complexity, are by default exposed. The subclasses
> (and complexitiy) are hidden.

I don't understand in what sense the complexity is hidden in the OO approach. If you are modelling a situation with 1000 optional attributes with an inheritance hierarchy and you want the hierarchy hidden, that means 1000 virtual methods in the base class. Most invocations of said methods will throw an exception or return a special value to indicate attribute-not-present. 1000 virtual methods in the base class doesn't sound like "hidden complexity" to me.

OTOH, in the relational case, where optional attributes are modelled as tables with a primary-key-foreign-key attribute and the optional attribute, you have all the tables exposed but for any given query you only have to attend to those tables in which the relevant attributes lie.

I don't see a big advantage to either approach. In either case, *someone* has to know the full complexity, and anyone who only needs a subset will be exposed to lot more than he needs.

But perhaps I'm not getting what you mean.


PS. Sorry I'm so late to the party. Received on Mon Aug 30 2004 - 06:20:15 CEST

Original text of this message