Michael Schlenker wrote:
> Patrick schrieb:
>> I am a beginner to intermediate Python Programmer. I can use SQLite with 
>> it just fine but it is my understanding that relational database and 
>> object oriented programming our not the perfect marriage.
> 
> Otherwise it does not really matter. Your right that there is a mismatch
> between the set oriented operations of relational databases and the more
> item oriented OO world, thats why there are all those ORMs like SQLalchemy,
> Storm etc. which bridge the gap.

Generally speaking there is no impedance mismatch between relational 
databases and the OO world.

Both natively provide relation and tuple data types and relational 
operators, and sets and arrays etc, and booleans, numbers, text and binary 
strings etc.  Both natively support the creation of arbitrarily complex 
user-defined data types and operators.  Both natively support automatic 
persistence of any of the above, and atomicity, and transactions.  Both 
support definition and enforcement of arbitrary type, state, and transition 
constraints, and triggers.  Both support multiple views of the same data, 
sometimes updateable.  Both support invoking the compiler at runtime.  Both 
support type graphs and polymorphism, substitutability, inheritence.

How they differ are in relatively minor ways, such as in OO you have the 
concept of a value that is a pointer to a memory address or implementation 
detail, while in a relational database you don't and there is a clear 
distinction between a value and a variable, and those are referred to 
symbolically.

The reason that ORMs exist is to either compensate for relatively minor 
differences, or to provide a wider variety of APIs for a database than the 
database is providing itself, or compensate in the application-space for a 
database implementation that lacks some of the relational database features.

-- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to