For many applications, you may need to decide whether to keep a User table in the application's database, or on the other hand, to just have the GAM User table in a GAM database. This document explains how to solve this situation.
Suppose your application has already been implemented, the Users table already exists, and is related to many others. What are the alternatives for using GAM?
In general, changing the Users table to use other PKs (GAMGUID) is not feasible because there are relations to other tables which have the UserCode attribute as a Foreign Key.
For example, imagine you have the AppUsers Transaction, and a TourReservations Transaction, where UserCod is FK, as shown in the following pictures:
Another problem is what to do when you need to store the users' additional information, which is not in the GAM User table, and you do not want to use the Extensibility of GAM entity properties. That is, you want to store that information in an application's table.
If you keep a Users table in the application database, there are two possible alternatives to cope with the problem:
See HowTo: Mapping Application Users to GAM - Adding a secondary attribute referencing the GAMUser
See HowTo: Mapping Application Users to GAM Users - Using ExternalID
In summary, the decision of keeping the User table in the application's database or having only the GAM User table in the GAM database will depend basically on the requirements of your application.
If you keep the user's information only in the GAM User table, each time you need to query the user's additional information (e.g: name), the GAM database has to be accessed using the GAM API.
On the other hand, if the users are duplicated in the GAM database and the application's database, you need to keep both User tables updated.
Parallel with this, in case that you need to add new attributes to the GAM User table, the GAM User attributes can be extended dynamically in order to meet the needs of the reality you're modeling . See Extensibility of GAM entity properties for more details.
GAM API: How to reference GAM users
HowTo: Filtering Data by User Using the GAM API
HowTo: Mapping Application Users to GAM Users - Using ExternalID GAMUser property
HowTo: Mapping Application Users to GAM - Adding a secondary attribute referencing the GAMUser
Extensibility of GAM entity properties