Emp table cannot have ename as it's primary key e.g., (because empno is
it's PK). Further, although I asked particularly about unique column
actually I wanted to ask that how can we implement business rule that
depends on the same table.

For example if I don't want to use UNIQE constraint on database level or
want to do some query on same table

Thank you,
Aamir

-----Original Message-----
From: Edson Carlos Ericksson Richter
[mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 6:46 PM
To: OJB Users List
Subject: Re: Unique column

Short answer: it's all in documentation. Look there.

Long answer:
As far you have not give more details, just set it as primary key. This
guarantee no duplicates, and no nulls. Don't forget to set this in
database too (all good databases around the world support primary keys).

Other way: in OJB uses it as normal field, and in database create a
UNIQUE index. Almost all databases knows the UNIQUE concept.

If it need be auto-generated, look docs about auto-increment. If it
isn't numeric, and need be unique, you can create your own Sequence
Manager. Check docs.

Best regards,

Edson Richter

  ----- Original Message ----- 
  From: Muhammad Aamir 
  To: OJB Users List 
  Sent: Friday, February 13, 2004 9:25 AM
  Subject: RE: Unique column



  Re-post
  -----Original Message-----
  From: Muhammad Aamir 
  Sent: Wednesday, February 11, 2004 9:51 AM
  To: [EMAIL PROTECTED]
  Subject: Unique column

  There is a column that I want it to be unique in the table. How can I
  implement this business rule ??
   
  Thanks
  Aamir

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.587 / Virus Database: 371 - Release Date: 12/2/2004

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to