Re: Design question

From: Robert Klemme (bob.news_at_gmx.net)
Date: 07/31/04


Date: Sat, 31 Jul 2004 12:59:52 +0200


"Mike" <decxor1@hotmail.com> schrieb im Newsbeitrag
news:87a6660f.0407301022.151d478f@posting.google.com...
> > >
> > > I was thinking of having a configuration file that maps object IDs to
> > > database table(since the DB objects essentially represent the database
> > > table entities).
> >
> > IMHO that's a bad idea since you need to keep this data redundant - it's
> > in the mapping file as well as in the database.
> >
>
> If I do not have a configuration "mapping" file, how will I associate
> a DB table to an object. WHat would be a good design pattern(if any)
> to let a broker object determine DB mappings based on the request by a
> entity object.

You only need to map types to tables, not individual ids to instances. You
could even have a central table that holds [id, type, table]

But as I said, there's plenty of OR mapping tools around - partly free.

Regards

    robert



Relevant Pages

  • Re: Databinding - Best Practice (object-oriented)
    ... >>ADO.NET is one way of mapping a relational database into an object ... >>mapping that means your application code is very exposed to the actual ... The actual database structure is hidden by the SQL ... design tends to produce ugly object oriented code). ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: Databinding - Best Practice (object-oriented)
    ... >>ADO.NET is one way of mapping a relational database into an object ... >>mapping that means your application code is very exposed to the actual ... The actual database structure is hidden by the SQL ... design tends to produce ugly object oriented code). ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Event-oriented genealogy software for Linux
    ... relations (in relational database speech) between all of them, ... predicate) that specifies what the mapping represents. ... given names and surnames are not sufficient ... familiar with Phillimore's Atlas and Index of Parish Registers. ...
    (soc.genealogy.computing)
  • Re: ID field as logical address
    ... Date and Darwen's notions that a database is a collection of relvars ... We therefore choose a range of surrogate keys which can be manipulated as ... In some cases we have natural keys where the mapping is enforced by ... see the assignment has having been done by their programs. ...
    (comp.databases.theory)
  • Re: Transaction Oriented Architecture (TOA)
    ... I don't think the issue is ignoring the database; it is recognizing that the database is a different subject matter applying different business rules than the problem solution. ... There is nothing to prevent abstracting the database subject matter in a classic OO manner with objects like Schema, Table, Tuple, and Query. ... I'm of the opinion that the more obvious the database (or at least its interface) is the more easily maintainable an application becomes. ... I've nothing against creating frameworks and patterns to facilitate those programming activities, but prefer the concept of a problem domain transaction to language-specific expressions mapping 1:1 with anything physically present in the database. ...
    (comp.object)