i copied post messages by other user: --------------------------- I have this link [1] I used when I'm developing a Java project using Hibernate [2]. I used some other materials I studied for a seminar I presented on ORM topic, in the college. Django [3][4] (a Python web framework) uses a more "lightweight" aproach for object-relational mapping. Python also have SQLAlchemy [5] wich is largely used. The topic is complex [6] and need a deep dive into the details. It isn't like to assign a value to an object that represents a database. Many patterns [7] are applied in order to get the best results for performance and liability.
[1] http://www.agiledata.org/essays/mappingObjects.html [2] https://www.hibernate.org/ [3] http://docs.djangoproject.com/en/dev/topics/db/models/#topics-db-models [4] http://docs.djangoproject.com/en/dev/topics/db/queries/ [5] http://www.sqlalchemy.org/ [6] http://www.codinghorror.com/blog/2006/06/object-relational-mapping-is-the-vietnam-of-computer-science.html [7] http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29 Daniel Gonçalves Base4 Sistemas Ltda. [www.base4.com.br] [twitter.com/spanazzi] 2010/3/16 Massimo Belgrano <[email protected]>: > Dear harbour developer > In user list as started an interesting post > http://thread.gmane.org/gmane.comp.lang.harbour.user/427/focus=430 > i invite post here, in developer list, a reply to populate this post > > > > 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 > > This syntax closely resembles the tight integration between the > language and database for the xBase languages. A comparable Clipper > syntax was > > Employee->name = "Emp1" > > The advantage of ORM is that programmers can write database code that > are not specific to the back-end engine. This is also strikingly > similar to the Clipper concept of RDDs. > > Ruby, Python and Javascript do not force the entire OOP boilerplate - > unlike the SmallTalk based languages like Java and C++. Ruby and > JavaScript are considered 'Object Based' rather than 'Object Oriented' > and allows the programmer to write procedural and object oriented code > with same ease. > > ORMs usually enable us to declare multiple objects, which might have > the data for different records in a single table. This could be > implemented easily on top of an SQL based database. But for native > engines like DBFCDX, we'll need to have a unique ID field for every > table to quickly commit the various record objects already loaded into > memory. > > I am not much into Harbour development, however I'll try to contribute > if an ORM implementation is in the pipeline. > > ----------------------------------------- > http://en.wikipedia.org/wiki/Object-relational_mapping > Quickdb http://code.google.com/p/quickdb/ > QtPersistence is a project to create an ORM and persistence library > for Qt Users. (Active Record and Data Mapper Ruby ) ORM projects. > Linq by microsoft as powerfull orm mapper > https://www.hibernate.org/ > > -- > Massimo Belgrano > -- Massimo Belgrano _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
