Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^7: Conditional many to many relationships with Class::DBI

by cbraga (Pilgrim)
on Nov 02, 2004 at 15:36 UTC ( [id://404635]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Conditional many to many relationships with Class::DBI
in thread Conditional many to many relationships with Class::DBI

I never meant to flame, sorry.

When I mentioned MySQL changing data and ignoring the SQL standard I meant the kind of stuff pointed out here.

I expected you to know abut that. For instance, if a column has a default value in Mysql, you can't insert a null value into it. If I attempt to do so Mysql will substitute the NULL for the column's default.

And yes I know that's all fully documented, but it's still well documented wrong behaviour IMHO.

Of course both Postgres and Oracle deviate from the SQL standard but Mysql does things that have no logical explanation. Another example: if a table has a timestamp column, that column (or the first timestamp if there's more than one) in each row is automatically updated every time the row is changed. How is that supposed to help me? How am I supposed to guess that that will happen when I create a timestamp I don't expect to be automatically updated? Why not name the datatype "autoupdate_timestamp" instead?

And now Mysql is stuck with these wrong behaviours because they can't fix them without breaking compatibility with existing applications.

PostgreSQL does have replication and clustering solutions. Several, actually. I know of at least two that are open-source and free, though I've never tried them:
1 2

ESC[78;89;13p ESC[110;121;13p

  • Comment on Re^7: Conditional many to many relationships with Class::DBI

Replies are listed 'Best First'.
Re^8: Conditional many to many relationships with Class::DBI
by dragonchild (Archbishop) on Nov 02, 2004 at 15:46 UTC
    Yes, there are many gotchas in MySQL. There are also many gotchas in Oracle and Postgres. I have two comments on them:
    1. MySQL's gotchas are well-documented. Oracle's aren't. This means that I can learn all the gotchas without losing two days on a production box. I don't know about you, but I never assume that application X will behave just like application Y - I read the manual cover-to-cover at least twice. Every time.
    2. Nearly every single gotcha was the result of a request from a user. And, it's because that behavior was unavailable in the existing systems.

    Now, I would love for a setting that would allow me to force the server to error out in many of those gotchas, such as inserting NULL into a NOT NULL column. But, it's like Perl - why must everyone conform to your ideas of correct behavior? Maybe, I like the incorrect behavior. :-)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://404635]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found