Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38272 > unrolled thread
| Started by | Andriy Kornatskyy <andriy.kornatskyy@live.com> |
|---|---|
| First post | 2013-02-06 15:58 +0300 |
| Last post | 2013-02-06 20:03 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Thoughts on SQL vs ORM Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2013-02-06 15:58 +0300
Re: Thoughts on SQL vs ORM rusi <rustompmody@gmail.com> - 2013-02-06 10:03 -0800
Re: Thoughts on SQL vs ORM Walter Hurry <walterhurry@lavabit.com> - 2013-02-06 20:03 +0000
| From | Andriy Kornatskyy <andriy.kornatskyy@live.com> |
|---|---|
| Date | 2013-02-06 15:58 +0300 |
| Subject | Thoughts on SQL vs ORM |
| Message-ID | <mailman.1408.1360155567.2939.python-list@python.org> |
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
[toc] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-02-06 10:03 -0800 |
| Message-ID | <bda93f4d-c27b-43a7-bfdc-3fbd77e41f56@u21g2000vbo.googlegroups.com> |
| In reply to | #38272 |
On Feb 6, 5:58 pm, Andriy Kornatskyy <andriy.kornats...@live.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Walter Hurry <walterhurry@lavabit.com> |
|---|---|
| Date | 2013-02-06 20:03 +0000 |
| Message-ID | <keucur$qld$2@news.albasani.net> |
| In reply to | #38299 |
On Wed, 06 Feb 2013 10:03:08 -0800, rusi wrote: > On Feb 6, 5:58 pm, Andriy Kornatskyy <andriy.kornats...@live.com> 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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web