Is using MS SQL Identity good practice?

前端 未结 5 1005
囚心锁ツ
囚心锁ツ 2021-02-09 23:56

Is using MS SQL Identity good practice in enterprise applications? Isn\'t it make difficulties in creating business logic, and migrating database from one to another?

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-10 00:36

    Good article on identities, http://www.simple-talk.com/sql/t-sql-programming/identity-columns/

    IMO, migrating to another RDBMS is rarely needed these days. Even if it is needed, the best way to develop portable applications is to develop a layer of stored procedures isolating your application from proprietary features:

    http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/02/24/writing-ansi-standard-sql-is-not-practical.aspx

提交回复
热议问题