Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Designing bizobjects to use lookup tables
Message
From
14/02/2006 03:53:18
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Designing bizobjects to use lookup tables
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01096078
Message ID:
01096078
Views:
55
Hi all,

I have a design question regarding how to handle database tables that use a lot of lookup tables. From what I understand, the MM framework is great at handling master/detail relationships but I am having trouble finding a nice way to handle lookup tables.
What I need is "best practice" way of designing my business objects that retrieve and modify data in tables that have a lot of foreign key columns as well as other data columns.

If the data was read-only then I would just create a view or stored procedure that joins (resolves) the table to all its lookup tables and display them to the user. The problem is that our program allows users to add and modify the rows as well.

My idea 1 : Have two tables in my business object. The default table would contain just the columns of the table (mostly foreign key columns). This default datatable would be used to add/modify rows (I'm thinking using a mmPicker to add foreign keys to the default datatable) The bizobj's second datatable would use a database view which joins the database table to all its lookup tables. This the bizobj's second datatable would be used to display data in a read-only fashion.

My idea 2 : Use just a database view that joins the table to its lookup values but also contains all the foregin key columns and just perform updates on this database view.

Does anyone know of a better way of doing this. I'm open to using stored procedures aswell.

Andrew
Reply
Map
View

Click here to load this message in the networking platform