[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] Re: Primary key does not exist !!!!!!!
From: |
Chris Cormack |
Subject: |
[Koha-devel] Re: Primary key does not exist !!!!!!! |
Date: |
Thu Feb 28 11:07:05 2002 |
On Fri, 2002-03-01 at 04:02, paul POULAIN wrote:
> Hi everybody,
>
> My fisrt post is to CRY because of a BIG proble in the DB structure:
> In most tables there is no primary key defined.
> On some of them there are indexes, but no pk.
>
> It's very, very dirty, ugly, infamous, ridiculous (and every -y or -ous
> term you could find ;-)) from a theoric point of vue,
> It's the source of perf caveats, (joins make heavy use of primary key.
> In fact, almost every "join" are usually on a pk of the right part of
> the expression)
> It's the cause of some bugs in a practical point of vue : it's not
> possible to use "append" sql command, which is VERY practical when you
> have to store datas (the same form is shares for insert and modify
> actions...)
>
> So, unless there is a very important reason to do so (and I don't know
> what could be such a reason...), I think a primary key must be defined
> for every table in the DB...
>
Yep a very valid point
> Who can include them in the db schema ? If you want a SQL patch to
> correct the DB, I should be able to spend a few hours to do it.
>
That would be great
> Note : for a 1st post, it may seem to be very critic. As you will see
> later, I'm usually a happy man ;-))))) It's just that I've work a lot on
> many DB (mySQL, Interbase, Informix...) and I'm very surprised with this
> problem. I don't blame anybody.
Criticism is good :-) As long as its constructive which this is. It
makes better solutions.
If having primary keys on every table will give a performance increase
thats great.
Chris
--
Chris Cormack Programmer
025 500 789 Katipo Communications Ltd
address@hidden www.katipo.co.nz