Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Designing bizobjects to use lookup tables
Message
De
14/02/2006 03:53:18
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Designing bizobjects to use lookup tables
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01096078
Message ID:
01096078
Vues:
56
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
Répondre
Fil
Voir

Click here to load this message in the networking platform