Monday, August 4, 2008

Service Requests Managing Associations

The fact that associations are maintained by many-to-many tables in a database is an implementation detail, and this must not affect our service interfaces. Take for example an application which associates clients to different possible types. The following database schema could fulfill these requirements :

Client (1)-(*) ClientType (*)-(1) Type

The services needed to retrieve and update associations between a client and its types should make total abstraction of the ClientType table. Indeed, the GetClientTypes service should accept a ClientID and return a list of types, while the AddClientType and RemoveClientType services should accept both a ClientID and a TypeID.

These are the values which are meaningful to the service users.

No comments: