# Best structure to a SaaS software

**URL:** <https://www.ruby-forum.com/t/best-structure-to-a-saas-software/203455>\
**Category:** Rails\
**Created:** [February 20, 2011, 5:39pm UTC](https://www.ruby-forum.com/t/best-structure-to-a-saas-software/203455 "2011-02-20T17:39:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 20, 2011, 5:39pm UTC](https://www.ruby-forum.com/t/best-structure-to-a-saas-software/203455/1 "2011-02-20T17:39:17Z")

</div>

Hello, I’m new in this community and I began my studies on Ruby On  
Rails. I am developing a SaaS software, but I have a doubt as to its  
structure.

The SaaS software that use a subdomain like [suaempresa.dominio.com](http://suaempresa.dominio.com) to  
access the system. All companies use a single application in the same  
database or an application and a database for each company?

I think the ideal would be a single application and database for all  
companies and not need a subdomain to access the system. But there is a  
problem, how this is a single database, how to do the backups?

Thanks.
