Database Mapping as Data Access Layer for Business logic

Posted on 2006-04-04
Medium Priority
Last Modified: 2006-11-18

AS we know that during mapping of database to business

logic, We mapped table to class with columns to Properties.

 but if we have complex queries with multiple joins

and "Group By" clause then what is the mapping of this

query to business ligic side plus how we display data

retrieved by query to the user.

How we handle other issues,

Keeping all aboive question in mind how we formed a Data Access Layer at Business Logic side , or what will be design look like.

How many Interfaces or abstract functionality it have.

Will you suggest a design or any good link that further

elobarate this design logic.

Thinks in advance!

Thanks in advance!
Question by:virdasardar
1 Comment

Accepted Solution

gabeso earned 300 total points
ID: 16383095
Do not map one table to one class: While a simple approach it is very problematic and I think causes major issues for the design.

Classes model domain abstractions and tables are part of a a relational design - they are different things doing different jobs.

Spend some time modelling the data in a relational database and separate time modellnig domain classes without binding one to the other on a one-to-one basis.

You can then create procedures and views on the database that let you serialise and/or deserialise the objects efficiently.

As a test you have to ask yourself if you are able to search for serialised objects efficiently and if you can't then you have a problem.


Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question