Hi,
The system we are developing is intending for intial use with standard Microsoft Access databases. However for future versions we plan to move over to Oracle (v 9 or 10).
The system should cope with concurrent inserts to the same table from different users. This is giving us problems in dealing with numeric primary keys (or ID fields). If the target system was just MS Access, you could use Auto-Numbers. As far as i know Auto-Numbers are not available in oracle. Although I know Oracle has something called sequences it would be better to find a solution that fits both dbms's.
Developers here have come up with an "ID Control" table. The idea behind this is there is a record per ID column. Each record tracks the max (or next available) ID.
Applications can then read the required column , increment it by the number of records and then update it before inserting the actual data. The only problem with this solution is transactional processing since the updates are not sent to the table until it is committed.
Is there another way ? or is there a way around the transaction issue ?
Thanks in advance.
Rich.
The system we are developing is intending for intial use with standard Microsoft Access databases. However for future versions we plan to move over to Oracle (v 9 or 10).
The system should cope with concurrent inserts to the same table from different users. This is giving us problems in dealing with numeric primary keys (or ID fields). If the target system was just MS Access, you could use Auto-Numbers. As far as i know Auto-Numbers are not available in oracle. Although I know Oracle has something called sequences it would be better to find a solution that fits both dbms's.
Developers here have come up with an "ID Control" table. The idea behind this is there is a record per ID column. Each record tracks the max (or next available) ID.
Applications can then read the required column , increment it by the number of records and then update it before inserting the actual data. The only problem with this solution is transactional processing since the updates are not sent to the table until it is committed.
Is there another way ? or is there a way around the transaction issue ?
Thanks in advance.
Rich.