FAQ

On Wed, 06 Feb 2013 10:03:08 -0800, rusi wrote:

On Feb 6, 5:58?pm, Andriy Kornatskyy wrote:
The question of persistence implementation arise often. I found
repository pattern very valuable due to separation of concerns, mediate
between domain model and data source (mock, file, database, web
service, etc).

The database data source is somewhat specific since you can proceed
with SQL functions or ORM. Here are some thoughts why you might prefer
SQL functions over ORM in your next project:

http://mindref.blogspot.com/2013/02/sql-vs-orm.html

Comments or suggestions are welcome.

Thanks.

Andriy Kornatskyy
Interesting read. Your first 2 points:
1. It is not valid to think that relational model in database is domain
model of application. They are different (except some trivial cases).
2. ? Design your domain model with plain objects only

And then later you go on to recommend SQL over ORM. So its not clear
which side you are on!

My own very preliminary thoughts on this:
SQL is basically a functional language.
OOP is just imperative programming with some syntactic sugar, name-
spacing etc.
IOW OOP is a lower level paradigm than FP because it deals with the
'how' more than the 'what.'

Object-relational impedance mismatch happens because of the opposite
reason to what people seem to believe: Because the higher-level SQL is
pulled down into the lower-level OO mindset and not the other way around

I'm afraid I don't understand what all that means.


But I invariably go for SQL over any abstraction paradigm.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 6 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedFeb 6, '13 at 12:58p
activeJun 11, '14 at 8:37p
posts6
users6
websitepython.org

People

Translate

site design / logo © 2021 Grokbase