Prepare for your Next Interview
This is a discussion on System functions Vs Entity classes within the Data Modeling forums, part of the Databases category; I have a confusion with entity classes. as far as I know entity classes are directly mapped to database entities (tables). I want to know in which classes business functions(...
|
|||
|
System functions Vs Entity classes
I have a confusion with entity classes. as far as I know entity classes are directly mapped to database entities (tables). I want to know in which classes business functions(eg. in a Library System, reserveBook(),checkoutBook() so on...) should be implemented. Do I need to put business functions to a set of separate classes or can I keep them in relevant entity classes? Actually I want to know what the best & accepted (If any standard exists) way of doing it. I hope it'll be really helpful if I give you an example.
For the simplicity, let's say that we're designing a library system. I want to know in which class reserveBook() method should be implemented. In Book entity class or In Member(entity) class or In a separate class reserved for business functionalities such as Services. Some people say that reserveBook() should be implemented in Book(entity) class because it's a function relevant to book entity. Some guys say that it should be implemented in Member(entity) class since it's a function of a library member. Others believe that method should be implemented in a separate class likes a Service in order to keep Book(entity) class as a pure entity class that is directly mapped to a database table. I would be grateful If you can help me to solve my problem using this little example since it seems to be more effective. --------------------- suresh |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WireKeys is a hotkey-driven system utility that runs in the system tray and provides | JobHelper | Geeks Lounge | 0 | 05-18-2007 01:20 PM |
| Entity Relationship Model | Lokesh M | Data Modeling | 0 | 04-24-2007 06:21 AM |
| System Safety Monitor allows you to track down Microsoft Windows operating system act | JobHelper | Geeks Lounge | 0 | 01-23-2007 11:31 AM |
| create new entity in crm 3.0 | SIVAM_SOLAI | Microsoft CRM | 0 | 10-06-2006 12:35 AM |
| Microsoft CRM : Connect a new entity to an existing entity by using a lookup field | Jim.Anderson | Microsoft CRM | 0 | 09-27-2006 06:39 AM |