Hi Teo,
I don't have any experience with OODBMS but I've been using the
ActiveRecords ORM in Ruby for sometime. Some of the few advantages I
found were:
* In the explict SQL method, we first generate an SQL statement and
concatenate the required values into it. something like:
sql="select * from employee where basic > " + str(min_basic)
In this approach, we'll have to take care of SQL Injection and also
convert to and from our native data type. We've to remember to add
single quotes to string values, format dates into the format of
whatever database we're using etc etc. However an ORM abstracts away
all these complexities and we can use our native data types
seamlessly.
* A database record can be persisted into memory easily - like in
xBase. Once we declare an object to represent a record in our table,
we can use the columns similar in Clipper to accessing fields from a
workarea.
Ruby ActiveRecord code:
emp=Employee.find(20) // Loads the record with id 20
into the emp object.
print emp.name // In Clipper: Use Employee
index emp_id; seek 20;
qout(Employee->name)
print emp.basic
* Latest version of ActiveRecord (Rails 3) presents an intuitive way
of representing conditions. You may read about it in the 'New API'
section at http://m.onkey.org/2010/1/22/active-record-query-interface.
An advanced discussion is at http://github.com/rails/arel
On Tue, Mar 16, 2010 at 11:05 PM, Teo Fonrouge <[email protected]> wrote:
> Hello Jasim,
>
> On Mar 16, 2010, at 10:16 AM, Jasim A Basheer wrote:
>
>>> The true advantage in software Development is not OOP but sql
>>> languages that allow write easy program also if a good class is easy
>>> to use like demonstrated by vb paradigm
>>>
>> The growing popularity of ORMs are an example. New generation
>> languages (Python, Ruby etc. and even Java) have shifted focus to
>> using ORMs rather than SQL directly. Now instead of explicit SQL
>> statements, ActiveRecord (Ruby's Object Relational Mapper) uses
>> something like
>>
>> emp=Employee.new
>> emp.name = "Emp1"
>> emp.basic = 4500
>> emp.designation = "Programmer"
>> emp.save
>
> Do you have some experience with using the ORM (or OODBMS) model ?
> By using what programming languages ?
>
> I like the ORM based approach, even I've used in the past an comercial
> product (CACHE by Intersystems), but now I have an Harbour based
> approach. And currently I'm developing some of my new projects with
> Harbour and this approach (that is more closer to the OODBMS model)
> to deal with complex data structures and relations between.
>
> [snip]
>
>
> best regards,
>
> Teo
>
> _______________________________________________
> Harbour-users mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour-users
>
_______________________________________________
Harbour-users mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour-users