Sql – Primary Keys in Oracle and SQL Server


What's the best practice for handling primary keys using an ORM over Oracle or SQL Server?

Oracle – Should I use a sequence and a trigger or let the ORM handle this? Or is there some other way ?

SQL Server – Should I use the identifier data type or somehow else ?

Best Solution

If you are using any kind of ORM, I would suggest you to let it handle your primary keys generation. In SQL Server and Oracle.