by Lennart <Erik.Lennart.Jonsson@[EMAIL PROTECTED]
>
Apr 18, 2008 at 11:54 AM
On Apr 18, 8:27 pm, "Stuck&Cold" <stuck.and.c...@[EMAIL PROTECTED]
> wrote:
> Hi guys;
>
> I have a hierarchical structure represented in a database with child
> nodes having a foreign key to their parent. I'm wondering how to
> create a constraint on uniqueness of a "name" attribute on that
> entity, but the uniqueness should only be between siblings. In other
> words, duplicate names are allowed as long as the instances don't
> share the same parent.
>
> Could someone in the know point me in the right direction?
>
> Thanks in advance.
I think you are close to a solution. Think about it, what information
does two siblings share? That together with the name should be
unique.
HTH
/Lennart