CHAPTER 8 Legacy databases and custom SQL … The exported DDL includes the unique constraint: create table USERS ( … USERNAME varchar(16) not null unique check(regexp_like(USERNAME,’^[[:alpha:]]+$’)), … ); A unique constraint can also span several columns. For example, CaveatEmptor supports a tree of nested Category objects. One of the business rules says that a particular category can t have the same name as any of its siblings. Hence, you need a multicolumn multirow constraint that guarantees this uniqueness: …
… You assign an identifier to the constraint with the unique-key attribute so you can refer to it several times in one class mapping and group columns for the same constraint. However, the identifier isn t used in the DDL to name the constraint: create table CATEGORY ( … CAT_NAME varchar(255) not null, PARENT_CATEGORY_ID integer, … unique (CAT_NAME, PARENT_CATEGORY_ID) );
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.
This entry was posted
on Saturday, March 15th, 2008 at 5:14 pm and is filed under PHP5.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.