CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: OOP Database advice

  1. #1
    Join Date
    Apr 2005

    OOP Database advice

    Hey Guys, I need some advice. I am using custom objects with a data access layer and a business object layer that derive from a database. I have multiple tables that have foreign keys so the foreign keys have to be created before they are inserted into the tables.

    Is it better to perform the insert, update, and delete methods from the presentation or is it better to use the dal that resembles the table that will hold the foreign keys to call the other tables update, insert, and delete methods to get the created keys?

    Thanks In Advanced!

  2. #2
    Join Date
    Mar 2004
    Prague, Czech Republic, EU

    Re: OOP Database advice

    I would say use the DAL, definitely. Why to contamine presentatin layer with particular technical knowleadge about how the data storage is implemented? It is better to achieve loose coupling between the business model and the physical data model.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)