|
-
Oct 2nd, 2000, 02:12 PM
#1
Thread Starter
Addicted Member
Hello,
I have this little problem.
I'm developing a wrapper for a database that exposes the database structure with classes and collections. Well, it would be more correct that I need to create a database structure from the collections/classes struct.
The problem is that I don't know how to store a collection tree on the database.
For example, I have these classes:
* Employees - Collection of employees
* Employee - An employee
* Addresses - Addresses where the employee can be contacted (actually this is inherited from an interface called IContact).
* Address - An address
So, I create a table named Employees, that will hold an employee info with each record. But, how do I store the Addresses collection? Do I create another table for each employee that will hold his addresses? Do I compress all the info on a single field in the first table? or what?
I'm puzzled here...
ANY help (or idea) is welcome...
-
Oct 2nd, 2000, 02:43 PM
#2
Frenzied Member
Create another table, Addresses. Include in that table a key (made up of 2 parts), Employee (number?) and Address type (in case an employee can have more than 1 address)
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
|