Topic: Advise on a Restful Application for Sarbanes Oxley...

I like to create a Sarbanes Oxley List of my Servers + Applications + Databases.

Here is what I think should work.



## Create the Table Server

./script/generate scaffold_resource Server name:string cat:string net_face:integer ids:integer mon_man:integer mon_aut:integer int_ip:string ext_ip:string desc:string bu_media:string bu_method:string bu_data_freq:string os_vendor:string os:string os_version:string


## Create the Table Application

./script/generate scaffold_resource Application name:string fsa:integer fsa_logic:string description:string bu_data:string


## Create the Table Database

./script/generate scaffold_resource Database name:string cat:integer description:string mon_man:integer mon_auto:integer


## Create the Table APP_SVR
./script/generate scaffold_resource App_svr server_id:integer application_id:integer


## Create the Table DB_APP
./script/generate scaffold_resource Db_app database_id:integer application_id:integer


## Create the Table DB_SVR
./script/generate scaffold_resource Db_svr database_id:integer server_id:integer


There is a many to many relationship between the tree.... I wonder if models should be:

For the Servers Model:
has_many :applications :trough :app_svrs
has_many :databases :trough :db_svrs

For the Applications Model:
has_many :servers :trough :app_svrs
has_many :databases :trough :db_apps

For the Databses Model:
has_many :servers :trough :db_svrs
has_many :applications :trough :db_apps

I'm not sure about some more relationship like belongs to or has many ???

Also creating this migration it failed when rake db:migrate something in the Database table can not be created, I wonder if somebody know about some restriction to create this database !!!

Thanks in advance for your help.

Dino.