baanprog
17th November 2002, 00:39
In response to pedro's Problem about database, Why doesn't Baan allow secondary Indexes to be on a field other than the primary Index,(when duplicates are not allowed) just for search capabilities.

Like say if i have three fields in a table
Customer
Item
Quantity

Why can't we have two indexes
Index1........... Customer,Item

Index2........... Quantity


Right now Baan doesn't allow such a combo, because it violates Primary key if duplicates are NOT allowed.

Regards

nick_rogers
18th November 2002, 17:54
Is this not the core to the rdbms model ? its not Baan.

baanprog
18th November 2002, 18:55
RDBMS does allow you to have indexes like that I guess, not sure.But DBMS allows like that,Iam sure.

Regards

baanprog
22nd November 2002, 20:25
Please pay a little attention here.


Regards

patvdv
22nd November 2002, 21:41
Please don't troll for answers. If people want to answer your question, they will. If they don't want to then they won't.

baanprog
23rd November 2002, 04:52
I don't know what you meant by troll.The reason I posted again was to make my post appear on top because it sinks into sea if in the bottom.

Also Troll meaning in Oxford dictionary:

trolling

Surfing, or browsing, the Web.

Posting derogatory messages about sensitive subjects on newsgroups and chat rooms to bait users into responding.

Hanging around in a chat room without saying anything, like a "peeping tom."

I guess I didn't do any of this.:)


Regards

patvdv
23rd November 2002, 13:59
Yes you did. Read your Oxford dictionary description again:

'..bait users into responding...'

You deliberately posted the earlier message to try to get an answer for your post. Please don't do that.

baanprog
23rd November 2002, 20:43
But please note that Troll still doesn't mean just baiting, but by posting derogatory messages about sensitive subjects , which I didnt do.

Regards

dave_23
27th November 2002, 21:13
Baan is "normalized" which means that its tables have to adhere to certian rules. (look in your DB theory books for more on this, I'm too rusty with it to tell you off hand, this may even be one of the basic rules of 1st normal form..)

But part of the rules are that, if you have a Key that could be a Primary Key (unique index1) but isn't, that key should be broken out "normalized" into its own table.

So in your example (which we all know doesn't really work)
Item
Customer
Quantity

Item, Customer is the key because that's the smallest value that we can logically make unique.
All 2ndary unique keys have to include that index.

If Quantity was allowed to be unique to itself it should be in its own table.