Tables in a relational database must have a primary key. When designing a database, the primary key can often be chosen from intrinsic data. A person’s Social Security Number or the hardware address of a network interface card are examples of naturally unique identifiers. These properties can also be good choices for a repository ID. Sometimes, though, there is no natural ID, and you need to create an artificial ID to serve as the primary key. Typically an integer counter is used for this. The major relational database management system vendors have facilities to automatically generate IDs internally. These IDs (called sequences in some systems) differ from each other in how they are generated and retrieved. Database-generated sequences are not supported as repository IDs in the ATG platform. Instead, use an ID generated by the IdGenerator, as described above and in the IDGenerators section of the Core Dynamo Services chapter of the ATG Programming Guide.

 
loading table of contents...