From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org, Michael Fuhr <mike(at)fuhr(dot)org>, CSN <cool_screen_name90001(at)yahoo(dot)com>, Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
Subject: | Re: PostgreSQL 8.1 vs. MySQL 5.0? |
Date: | 2005-10-07 15:47:52 |
Message-ID: | 20051007154752.GB15456@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy pgsql-general |
On Fri, Oct 07, 2005 at 10:45:06AM -0400, Robert Treat wrote:
> On Thursday 06 October 2005 17:31, Michael Fuhr wrote:
> >
> > Also, notice the "TYPE innodb" clause of the CREATE TABLE
> > statement. The default table type in MySQL is MyISAM, which
> > doesn't support foreign key contraints at all, but which will
> > silently allow you to declare them. If you haven't changed the
> > default table type, then you must remember to specify that you
> > want an InnoDB table, or else your REFERENCES clauses are nothing
> > but documentation.
>
> I'm working on porting mediawiki to postgresql and was really
> puzzled by the following:
>
> CREATE TABLE trackbacks (
> tb_id INTEGER AUTO_INCREMENT PRIMARY KEY,
> tb_page INTEGER REFERENCES page(page_id) ON DELETE CASCADE,
> tb_title VARCHAR(255) NOT NULL,
> tb_url VARCHAR(255) NOT NULL,
> tb_ex TEXT,
> tb_name VARCHAR(255),
> INDEX (tb_page)
> );
>
> I couldn't figure out why they weren't specifying type = innodb for
> the table, but then figured they must have declared it some place
> else or something... but now I see that even that wouldn't work.
> Makes you wonder if my$ql users realize this behavior or not....
As a rule, they don't expect the database to handle any data
integrity. This is a quite reasonable (lack of) expectation from that
product. The trouble starts to happen when they run across DBMSs that
*can* do this.
> I would have to guess not because otherwise why would you use this
> type of syntax at all?
Right in one.
> (And people claim my$ql is eaiser to use? I still don't get that
> one)
I was confused, too. Then it dawned on me. When people say, "MySQL
is easier to use," what they really mean is, "I started from nothing.
I worked hard getting used to these quirks, and I'll be *damned* if
I'll consider all that painful effort wasted and start over." It
reminds me a lot of the kind of mental gymnastics that cause people
not to call the law when they realize they've been taken in by a con
artist. In both cases, the emotional investment in not being wrong on
an important matter is too big.
Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778
Remember to vote!
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2005-10-07 16:40:56 | Re: 4th draft up -- get your comments in! |
Previous Message | Robert Treat | 2005-10-07 15:21:01 | Re: PostgreSQL 8.1 vs. MySQL 5.0? |
From | Date | Subject | |
---|---|---|---|
Next Message | Rafael Montoya | 2005-10-07 15:52:02 | [General] Using cursors... |
Previous Message | Mark Rae | 2005-10-07 15:45:05 | Database Comments |