on 08-23-2004 5:03 PM
Hello,
I'm creating some database tables in the Java Dictionary on Web AS 6.40. What is the best way to create unique identifiers for the primary key of these tables? In ABAP Dictionary you would use a number range. Is there an equivalent or other technique for the Java Dictionary?
Thanks,
Dustin
Hi Dustin,
the best way is if the logic of your data represent a primary key. If your central data object for example is a project, it will have a project number, and this is unique, so predestinated to be the primary key. If a customer has an order for this project (maybe the project is handled via two or three single orders), you will have an "order" table. For single customers having unique order IDs, the combination of the customers order id and the project id (foreign key) are predestinated to be the primary key.
If such a logic does not work, it's up to you to implement something (automatic PK generation does not work with the Java Dictionary). A number range seems to be ABAP... I would prefer a PKGenerator, generation them out of a combination of timestamp and random number or chars (sure, managing that the generated keys are unique).
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.