Search Postgresql Archives

Re: PostgreSQL 8.1 vs. MySQL 5.0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux