473,729 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OODB vs RDBMS

Hi,

most of the time I use ZODB/Durus to store my data.

I like it, but I know that it has some weaknesses:
- only accesible from python
- I need to code your indexes for fast searching yourself.

I think about using a RDBMS for the next project. What I don't like
about RDBMS: If you need a list of values you need to create a new
table. Example: If you want to store several email addresses of one
customer, you need to create a new table.

Since the namespace if tablenames is flat, you soon have so many
tables, that it is hard to browse them.

Postgres has extensions which allows you to store arrays in a column. Is
this supported by the python binding? Are there other databases which
support this?

Are there OR-mappers (object relational mappers) which support lists in
a column?

How is the unicode support of the python bindings to RDBMSs? I don't
want to convert the results of a query to unicode myself.
Can you insert unicode strings into a SELECT statement?

Which database supports fulltext searches with a customized word
normalization? (All should be the same: str. str straße, strasse)

Which OR-mapper do you suggest?
Are there OR-mappers which support this: Subobjects are
fetched automatically while you access the object tree?
Example: One customer has N TroubleTicketIt ems:
customerobj=get _customer(...) # First SELECT
for ticket in customerobj.tic kets: # (*)
...

(*) Second SELECT gets executed only if needed.

I now this message is vague, but maybe we can discuss the
pros/cons of "OODB vs RDBMS"

Thomas
--
Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: ni************* *@thomas-guettler.de

Nov 20 '06 #1
6 2526
Thomas Guettler a écrit :
Hi,
(snip lot of questions about OR mappers)

http://www.sqlalchemy.org/
Nov 20 '06 #2
On Monday 20 November 2006 16:34, Bruno
Desthuilliers wrote:
Thomas Guettler a écrit :
Hi,

(snip lot of questions about OR mappers)

http://www.sqlalchemy.org/
Thanks,
Verry interesting.

jim-on-linux
http://www.inqvista.com
Nov 20 '06 #3
I'll second the recommendation of sqlalchemy... I've heard it's very
good. Personally I prefer SQLObject, which is a similar library but in
my opinion a bit simpler and more "pythonic".

Needing to make a special "join table" to do arrays is one of the
downsides of RDBMS, but it leads to big performance advantages over
kludged-in things like using a variable-length string to store arrays.
Plus, with an ORM like sqlalchemy/sqlobject, you never have to deal
with the join table directly. If you have a table that matches users
to purchases, for example, you can just do something like:

user = Users.retrieve( id)
purchases = user.Purchases( )

ORMs like sqlobject are just awesome for making objects in a database
integrate seemlessly with python code: they make accessing and
manipulating objects in the database as easy as accessing regular
program variables.

Dan

Nov 20 '06 #4
Dan Lenski wrote:
I'll second the recommendation of sqlalchemy... I've heard it's very
good. Personally I prefer SQLObject, which is a similar library but in
my opinion a bit simpler and more "pythonic".
SQLObject and SQLAlchemy have different purposes IMHO : the first one is
meant as a way to easily persist objects in a SQL DBMS, while the second
is primarily a (mostly successful) attempt to provide a higher-level,
pythonic interface to SQL DBMS - the ORM features of SQLAlchemy being
mostly built on top of the SQL/Python integration layer.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom. gro'.split('@')])"
Nov 21 '06 #5


On Nov 20, 6:34 pm, "Dan Lenski" <dlen...@gmail. comwrote:
I'll second the recommendation of sqlalchemy... I've heard it's very
good. Personally I prefer SQLObject, which is a similar library but in
my opinion a bit simpler and more "pythonic".
TurboEntity was the first "SQLObject Layer for SQLAlchemy"... it will
soon be improved upon, but it was quite slick.

Nov 21 '06 #6
Thomas Guettler wrote:
Hi,

most of the time I use ZODB/Durus to store my data.

I like it, but I know that it has some weaknesses:
- only accesible from python
- I need to code your indexes for fast searching yourself.
There are other features of relational database systems
that I find much more relevant than those, but then I don't
know what your use case is. For high performance, mission
critical, multi-user database systems, where many simultaneous
users actually do fine grained data manipulation, I don't think
there is any competition. Also, I don't know any other solution
that lets you do serious tuning without code changes. Even if the
application is the same, data size and usage patterns might lead
to vastly different performance. Being able to speed up some
operation on the expense of some other operations might be just
the right thing for a certain installation at a certain time.
This can be more or less automatic, depending on your brand and
version of RDBMS.

For a non-critical, single-user system without huge amounts of
data in a structure that fits the relational model, it might not
be worth the effort.
I think about using a RDBMS for the next project. What I don't like
about RDBMS: If you need a list of values you need to create a new
table. Example: If you want to store several email addresses of one
customer, you need to create a new table.
I think this is a tiny thing when you look at the big picture.
I don't know a lot about the PostgreSQL extensions, but the way
things work in relational database has proven to work very well
for quite some time. Obviously, OODBMS's haven't made any huge
impact, despite two decades of efforts.

The "impedance mismatch" between OO programming and relational
databases is annoying, but it's something we have to (and can)
deal with.
Since the namespace if tablenames is flat, you soon have so many
tables, that it is hard to browse them.
The tablename namespace is not flat in SQL. Where did you get this
from? Although not implemented in every RDBMS, the SQL standard has
the concept of a schema, and every table should belong to a schema.
For instance Oracle lacks schemata, but more or less makes up for it
by through the way it implements users. (Tables are owned by users.)

There's just this two level structure though, no abitrary hierarchy.
Postgres has extensions which allows you to store arrays in a column. Is
this supported by the python binding? Are there other databases which
support this?
I don't know about the first question, but regarding the second, none
of the popular ones do as far as I know. PostrgeSQL is a fine RDBMS
though.

By the way, a database is a collection of data, not some software.
Are there OR-mappers (object relational mappers) which support lists in
a column?
I think they do, but having a separate class for the email addresses
(if we continue with your example above) has its advantages too. If
the customer has several email addresses (and you feel a desire to
keep track of that) they are probably different in some ways. It's
e.g. likely that you should use one particular address as recipient
when you send mail, not just one at random, or all of them. You might
also realize than not only customers, but also other entities, such
as employees, sub-contractors and authorities have email addresses.
Actually, while you might get more tables due to the first normal
form, your tables might well get leaner, the total amount of columns
smaller, and your over-all datamodel more coherent.
How is the unicode support of the python bindings to RDBMSs? I don't
want to convert the results of a query to unicode myself.
Can you insert unicode strings into a SELECT statement?
As far as I remember, all the bindings I tried returned unicode
objects from varchar and char fields, and always accepted them
as parameters for CHAR/VARCHAR fields.

Remember to always pass parameters properly. I.e. use e.g.
cur.execute("SE LECT * FROM T WHERE C=?", col_value) rather than
something like cur.execute("SE LECT * FROM T WHERE C="+col_value ).
The former will prevent SQL injection attacks, remove the need
to worry about quoting and escaping, and also make performance
better in the major systems.
Nov 29 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2113
by: Matt O'Toole | last post by:
I'm looking for a website backend. I can use PHP and other scripting languages, but I don't have access to an RDBMS. So I'm looking for an RDBMS substitute -- maybe something that reads/writes plain text or XML files sitting on the web server. Any ideas? Matt O.
1
1822
by: Marek Kotowski | last post by:
I'm preparing short dictionary and this is the question: are 'RDBMS' and 'database server' synonyms? If not, what are the differences? Thanx in advance. Regards Marek Kotowski Warsaw
17
764
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
3
1461
by: Terry | last post by:
Do u often use OODB? I haven't heard of any friends using it.
3
1639
by: Michael Lueck | last post by:
Considering a project which will target DB2 UDB on Linux as the primary / suggested platform, but also support MySQL and/or PostgreSQL as our project is GPL so it would be "slightly" rude then to require a licensed database to even "kick the tires"... but then DB2 does rock! Anyway, considering that focus, the database class we develop will handle making the correct connection based on the RDBMS configuration. For DB2 it will connect via CLI...
4
6262
by: Arijit Chatterjee | last post by:
I heard that MS Access is not at all a RDBMS.But why? Only the security feature in Access is low.We can't create multiple logins or... Other than that everything is available.So why not a RDBMS.Please explain me. Regards Arijit Chatterjee
1
1898
by: Mark Everett | last post by:
Hi, I am going to be undertaking a large project that I am going to write in C#. I want to use an object oriented database to reduce development times and allow me to write clean object code without cluttered ugly sql and O/R mapping code. Ideally I would like to be able to just write my code and then have it automatically persisted to the OODB with little intervention. I also need to use a scalable system where by I can add new...
43
2900
by: sinister | last post by:
Is MS Access a true RDBMS?
0
8927
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9289
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9210
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9156
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3242
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.