# How to store account information separately and across multiple applications?

**URL:** <https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291>\
**Category:** Rails\
**Created:** [March 18, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291 "2009-03-18T23:05:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [March 18, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291/1 "2009-03-18T23:05:56Z")

</div>

We are currently working on a solution to centralize our userbase.  
The central userbase will contain primary account information that  
will be extended on an application-specific basis. For instance, all  
users of our applications will have the following:

first\_name  
last\_name  
email  
phone  
…etc…

Application ‘X’, however, might extend this account information so  
that it includes application\_x\_admin, application\_x\_group, etc. so  
that these attributes are only available to Application ‘X’.  
Application ‘Y’ could similarly have added attributes or it could  
simply utilize the defaults for our userbase.

The questions follows – How do we store account information separate  
from application-specific user data and share that account information  
across multiple applications?

The solution needs to…

–Store the account information in a separate database  
–Avoid as much duplication as possible to avoid unnecessary  
difficulty for modifications  
–Easily allow a login, logout, authenticate ability from within an  
application (registration, etc. will be in a separate application)  
–Easy to retrieve/search the userbase from within applications,  
including direct access to userbase attributes (first\_name, etc.) and  
find methods (find\_by\_first\_name, etc.)

Any suggestions/guidance is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [March 18, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291/2 "2009-03-18T23:14:10Z")

</div>

On Mar 18, 10:04 pm, ericindc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The solution needs to…
> 
> –Store the account information in a separate database  
> –Avoid as much duplication as possible to avoid unnecessary  
> difficulty for modifications  
> –Easily allow a login, logout, authenticate ability from within an  
> application (registration, etc. will be in a separate application)  
> –Easy to retrieve/search the userbase from within applications,  
> including direct access to userbase attributes (first\_name, etc.) and  
> find methods (find\_by\_first\_name, etc.)

When I’ve done this i’ve had a user class (whose attributes are login  
and any app specific attributes) and user\_detail which contains shared  
info. The shared info is only changed in the user authentication app  
and it propagates that info to the other apps.

Fred
