# Changing access to DataBase

**URL:** <https://www.ruby-forum.com/t/changing-access-to-database/168575>\
**Category:** Rails\
**Created:** [May 22, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/changing-access-to-database/168575 "2009-05-22T16:13:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rui\_Carvalho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@Rui\_Carvalho](https://www.ruby-forum.com/u/Rui_Carvalho)\
**Post date:** [May 22, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/changing-access-to-database/168575/1 "2009-05-22T16:13:42Z")

</div>

Hi,

i am kind of new to ror,

i have rails connected to a remote DB in Postgres,i am trying to remake  
the  
connection instead of accessing directly through query to table start  
using  
the views available,

any help/hint on the best way to do this would be appreciated.

my first thought is to make a new model and replace the one i have…  
if i  
find out how this works 🙂

thanks.
