# ActiveRecord with \*\*some\*\* columns mapped to database?

**URL:** <https://www.ruby-forum.com/t/activerecord-with-some-columns-mapped-to-database/162464>\
**Category:** Rails\
**Created:** [March 10, 2009, 6:15am UTC](https://www.ruby-forum.com/t/activerecord-with-some-columns-mapped-to-database/162464 "2009-03-10T06:15:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kretch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/db5fbb/32.png) [@kretch](https://www.ruby-forum.com/u/kretch)\
**Post date:** [March 10, 2009, 6:15am UTC](https://www.ruby-forum.com/t/activerecord-with-some-columns-mapped-to-database/162464/1 "2009-03-10T06:15:13Z")

</div>

Hi There.  
I’m involved in creating a bridge between ROR and an open-source  
database (OpenAccess, or OA for short) used for EDA (Electronic Design  
Automation).

OA is a great database for capturing properties of hardware designs  
(such as pins, ports, constraints on signals etc.), since it provides  
very compact storage for designs which contain millions of objects,but  
is not a relational database.  
There is a preliminary OA\<-\>Ruby bridge done in SWIG, so that we can  
create OA objects through Ruby, store them in OA etc.

I would like to combine the two - i.e. have n “activerecord”-like  
object, where some columns are stored directly in an \*SQL table, but  
other columns are mapped to OA objects. That way I can use the Rails  
framework while utilizing the compact OA database.

Is that doable? Any pointers or advice would be most welcome

Kretch

---

<div class="post-metadata">

**Author:** ![kretch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/db5fbb/32.png) [@kretch](https://www.ruby-forum.com/u/kretch)\
**Post date:** [March 10, 2009, 10:12am UTC](https://www.ruby-forum.com/t/activerecord-with-some-columns-mapped-to-database/162464/2 "2009-03-10T10:12:23Z")

</div>

On Mar 10, 5:15 am, Kretch Kretchmer \<rails-mailing-l…@andreas-  
[s.net](http://s.net)\> wrote:

> create OA objects through Ruby, store them in OA etc.
> 
> I would like to combine the two - i.e. have n “activerecord”-like  
> object, where some columns are stored directly in an \*SQL table, but  
> other columns are mapped to OA objects. That way I can use the Rails  
> framework while utilizing the compact OA database.

store the OA data as a blob column on the corresponding activerecord  
or store as a text column whatever info you need to get the info out  
of OA ?

Fred

---

<div class="post-metadata">

**Author:** ![kretch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/db5fbb/32.png) [@kretch](https://www.ruby-forum.com/u/kretch)\
**Post date:** [March 10, 2009, 3:00pm UTC](https://www.ruby-forum.com/t/activerecord-with-some-columns-mapped-to-database/162464/3 "2009-03-10T15:00:09Z")

</div>

Frederick C. wrote:

> On Mar 10, 5:15ï¿½am, Kretch Kretchmer \<rails-mailing-l…@andreas-  
> [s.net](http://s.net)\> wrote:
> 
> > create OA objects through Ruby, store them in OA etc.
> > 
> > I would like to combine the two - i.e. have ï¿½n “activerecord”-like  
> > object, where some columns are stored directly in an \*SQL table, but  
> > other columns are mapped to OA objects. That way I can use the Rails  
> > framework while utilizing the compact OA database.
> 
> store the OA data as a blob column on the corresponding activerecord  
> or store as a text column whatever info you need to get the info out  
> of OA ?
> 
> Fred

The issue is that for a given object there might be a huge amount of  
data stored in OA (up to many millions of objects), so translating it to  
text and storing in activerecord will require lots of space and take a  
lot of time. I’m looking to combine the superior storage of OA with the  
great infrastructure you get for activerecord

Kretch
