Relations in Datasets

  • Thread starter Thread starter a
  • Start date Start date
A

a

Hey,

I am building a Database App using VB.NET instead of MSAccess. I need some
tips for the data access strategy. I like the 'Microsoft Application Blocks
for .NET' approach, but am curious about relationships.

As an example, one section will be Document Tracking. A Document has one
Author (int field in the tblDoc table), one Type (int field in the tblDoc
table), possibly many WorkAreas (Many_to_Many with another table).

Am I better off manually grabbing DataSets, one for each int field, and then
manually binding 'dropdown' boxes on my form, or should I use Relationships
in the DataSet?

Also, I need some input about the ManyToMany deal. Is a PopUp form the best
way to go?

Please Advise.


Kevin
 
Hi Kevin,

When deal with Many-to-Many relationship, it is better to convert it to
"one to many to one". For example, we have a "Books" table and a "Author"
table. A book may have multiple authors and an author can have many books:

Books
---------------------
BookID, AuthorID

Authors
---------------------
AuthorID, BookID


You may add one table "BooksToAuthors", to present the relation between
Books and Authors. The three tables will be like:

Books
---------------------
BookID

Authors
---------------------
AuthorID

BooksToAuthors:
---------------------
BooksToAuthorsID
BookID
AuthorID

hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top