|
-
Jul 4th, 2006, 03:44 AM
#1
Thread Starter
Hyperactive Member
Should I use collections ?
I'm about to start writing my first 'useful' application, the project is some service management software which will enable the user to maintain a customer database along with their associated contract details. The main funtion of the application is to manage the equipment faults for theses contracts, it will be able to raise new faults and allocate them to one of the engineering staff as well as maintain a complete fault history for each customer.
I'm going to use a SQL database, the question is should I create collections for the customer , contract, fault etc to hold the data or just use a data table for each. I know this question is a bit vauge but I'm thinking of just using datasets and data tables but this would put everythig into one big class, is this good practice ?
-
Jul 4th, 2006, 01:04 PM
#2
Hyperactive Member
Re: Should I use collections ?
It is fine to put multiple tables inside a dataset. I tend to group logical items together. For example I would have a customers dataset, and a faults dataset. Thus you mught have a table
Customer
CustomerID
Customer
CustomerDocument
DocumentID
CustomerID
Document
etc
and a faults table
FaultType
FaultTypeID
FaultType
CustomerFaults
FaultID
FaultTypeID
CustomerID
hope this helps!
-
Jul 4th, 2006, 04:02 PM
#3
Re: Should I use collections ?
If your not using objects and collections in your business layer you do lose a lot of the advantages of O-O programming (keeping your data and related methods for each "thing" in one place) and lose some flexibility.
There is a code example I have posted for serialising objects and collections to/from SQL tables that might help you..
-
Jul 4th, 2006, 04:53 PM
#4
Thread Starter
Hyperactive Member
Re: Should I use collections ?
Thanks for your input on this, I'll check out your code sample.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|