|
-
Sep 2nd, 2005, 09:12 AM
#1
Thread Starter
Fanatic Member
OO Design Question
Design question:
Say I have a universal database that holds person data - ie. First name, last name, all things that a person MUST have. Then I have a second database that has a table that holds person data specific for the particular business like compliance score, training level, etc. What would be the correct way to represent this using OO in .NET?
Options:
1) Create an object SpecificPerson and have a GenericPerson object within it – so that the GenericPerson can handle the saving of its own data into the universal database table while the SpecificPerson can save its own data in the specific table. However this would require notation like SpecificPerson.GenericPerson.FirstName and this does not make use of inheritance.
2) Have SpecificPerson inherit from GenericPerson. But then GenericPerson would not be handling it’s own data retrieval and updates, and I would have to maintain 2 different dirty properties, valid properties, userstamps, change timestamps, etc. and write logic to react appropriately.
Any input is greatly appreciated.
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
|