Click here to Skip to main content
16,004,901 members
Home / Discussions / Database
   

Database

 
GeneralRe: Reading an SQL backup file Pin
kkadir21-Nov-07 21:37
kkadir21-Nov-07 21:37 
GeneralRe: Reading an SQL backup file Pin
pmarfleet21-Nov-07 22:00
pmarfleet21-Nov-07 22:00 
QuestionDataSet/DataTable/Reader VS Custom Entities Pin
N a v a n e e t h20-Nov-07 22:34
N a v a n e e t h20-Nov-07 22:34 
AnswerRe: DataSet/DataTable/Reader VS Custom Entities Pin
Pete O'Hanlon20-Nov-07 23:10
mvePete O'Hanlon20-Nov-07 23:10 
GeneralRe: DataSet/DataTable/Reader VS Custom Entities Pin
N a v a n e e t h20-Nov-07 23:24
N a v a n e e t h20-Nov-07 23:24 
GeneralRe: DataSet/DataTable/Reader VS Custom Entities Pin
Pete O'Hanlon21-Nov-07 0:16
mvePete O'Hanlon21-Nov-07 0:16 
GeneralRe: DataSet/DataTable/Reader VS Custom Entities Pin
N a v a n e e t h21-Nov-07 19:40
N a v a n e e t h21-Nov-07 19:40 
AnswerRe: DataSet/DataTable/Reader VS Custom Entities Pin
Mark Churchill21-Nov-07 13:39
Mark Churchill21-Nov-07 13:39 
Your business layer should definitely be operating on your business/domain objects. The general principle here is that the your domain objects are abstracted away from the storage mechanism.

If you are using DTOs, then to keep this abstraction going, its fairly likely that your DTOs will be closer to your domain objects than the storage mechanism. This brings up the obvious idea that since your DTOs look so much like your domain objects, then lets give the DAL the capability of acting on your domain objects directly.

Now you are entering ORM territory, and if you don't mind me saying so I think our product Diamond Binding[^] does this quite well.

In regards to performance, a naive DAL implementation is going to be slower than, say, ad-hoc queries to the database. Even a highly optimised commercial OR Mapper like Diamond Binding is going to be slightly slower when performing trivial operations (insert single record, etc). Where you gain a lot of performance back is when you are performing more complex operations.

"Invoice.Load(34);" may not appear to be doing much on first glance, but theres huge gains that can be made here when your DAL is fully aware of the relationships in your domain model. DB will pull the invoice back, making some intelligent decisions about joins, and you'll have the invoice34.Customer and the invoice34.lineItems[] as well, in one round trip. Theres similar gains with mature caching strategies as well.

Anyway, yes a generalized DTO is realized by eliminating it Wink | ;) A DAL that's aware of the domain model can act on your business objects intelligently, and pick the most optimal strategy for the particular action you are requesting. (And my biased opinion is that its much easier to use an off the shelf one than trying to write one yourself Wink | ;)

Mark Churchill
Director
Dunn & Churchill

GeneralRe: DataSet/DataTable/Reader VS Custom Entities Pin
N a v a n e e t h21-Nov-07 19:38
N a v a n e e t h21-Nov-07 19:38 
Questionwhat sort cursors are used in msacces? Pin
nicetohaveyou20-Nov-07 20:12
nicetohaveyou20-Nov-07 20:12 
AnswerRe: what sort cursors are used in msacces? Pin
Pete O'Hanlon20-Nov-07 23:12
mvePete O'Hanlon20-Nov-07 23:12 
AnswerRe: what sort cursors are used in msacces? Pin
astanton197821-Nov-07 2:36
astanton197821-Nov-07 2:36 
GeneralRe: what sort cursors are used in msacces? Pin
Pete O'Hanlon21-Nov-07 4:44
mvePete O'Hanlon21-Nov-07 4:44 
QuestionReports based on logged on users credentials Pin
MSinha20-Nov-07 19:48
MSinha20-Nov-07 19:48 
AnswerRe: Reports based on logged on users credentials Pin
Kishore.P21-Nov-07 0:31
Kishore.P21-Nov-07 0:31 
QuestionHow to change chart type at runtime using SSRS 2005 Pin
MSinha20-Nov-07 19:34
MSinha20-Nov-07 19:34 
AnswerRe: How to change chart type at runtime using SSRS 2005 Pin
pmarfleet20-Nov-07 21:28
pmarfleet20-Nov-07 21:28 
QuestionMS SQL Server 2000 on Windows XP Professional Pin
__yash__20-Nov-07 18:12
professional__yash__20-Nov-07 18:12 
AnswerRe: MS SQL Server 2000 on Windows XP Professional Pin
WoutL20-Nov-07 20:47
WoutL20-Nov-07 20:47 
GeneralRe: MS SQL Server 2000 on Windows XP Professional Pin
__yash__20-Nov-07 21:05
professional__yash__20-Nov-07 21:05 
GeneralRe: MS SQL Server 2000 on Windows XP Professional Pin
WoutL20-Nov-07 21:24
WoutL20-Nov-07 21:24 
GeneralRe: MS SQL Server 2000 on Windows XP Professional Pin
__yash__20-Nov-07 21:29
professional__yash__20-Nov-07 21:29 
GeneralRe: MS SQL Server 2000 on Windows XP Professional Pin
BugWacker21-Nov-07 3:29
BugWacker21-Nov-07 3:29 
AnswerRe: MS SQL Server 2000 on Windows XP Professional Pin
Marek Grzenkowicz21-Nov-07 0:08
Marek Grzenkowicz21-Nov-07 0:08 
GeneralRe: MS SQL Server 2000 on Windows XP Professional Pin
__yash__21-Nov-07 0:20
professional__yash__21-Nov-07 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.