Design Guide DAL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I need some hints and recommandations about accesing data, and instantiating business-objects with this data
we want to use untyped datasets to retrive data from db and hold this datasets in our business-entities

a small scenario
we have a business-object "purchaseorder" which aggregates some others business-object
eg: orderposition, amount, owner (user_entity), creator (user_entity), supplier ..

So my question(s)
Should I retrive the data by a single select for the complete data, but I have to remap the data to fill each business-entity
so the problem is: the user_entity is used as owner and creator, but the user-entity don't know, if it is a owner or a creator-instance, so how should the user_entity indentify it's attributes ...

or should I make separated queries to retrive the data (each table in it's own datatable
In this case, has the supplier-entity only a datatable

how can I make updates to my purchaseorder-table
the purchaseorder has only foreign keys for supplier, owner, creator ..
so I need to manually select the relevant data columns from my business-entities for updating the purchaseorder-tabl

maybe there is a generall approach, I would be appreciate about every comment

i hope my questions are not too stupied ..
Rudolf Löw
 
Here is an interesting webcast that might spark some ideas:
http://www.microsoft.com/usa/webcasts/ondemand/2194.asp

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************************************************
Think outside the box!
***************************************************************
Rudolf Löwe said:
Hello,

I need some hints and recommandations about accesing data, and
instantiating business-objects with this data:
we want to use untyped datasets to retrive data from db and hold this
datasets in our business-entities.
a small scenario:
we have a business-object "purchaseorder" which aggregates some others business-objects
eg: orderposition, amount, owner (user_entity), creator (user_entity), supplier ...

So my question(s):
Should I retrive the data by a single select for the complete data, but I
have to remap the data to fill each business-entity.
so the problem is: the user_entity is used as owner and creator, but the
user-entity don't know, if it is a owner or a creator-instance, so how
should the user_entity indentify it's attributes ...?
or should I make separated queries to retrive the data (each table in it's own datatable)
In this case, has the supplier-entity only a datatable?

how can I make updates to my purchaseorder-table?
the purchaseorder has only foreign keys for supplier, owner, creator ...
so I need to manually select the relevant data columns from my
business-entities for updating the purchaseorder-table
 
Back
Top