且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Server“伪/合成"复合 ID(键)

更新时间:2023-02-07 13:32:09

它被称为智能"、智能"或串联"" 键.这是个坏主意.它很脆弱,会导致更新问题并阻碍 DBMS.DBMS 和查询语言旨在让您通过基表以一种直接的方式描述您的应用程序.按预期使用它们.

It's called a "smart", "intelligent" or "concatenated" key. It's a bad idea. It is fragile, leads to update problems and impedes the DBMS. The DBMS and query language are designed for you to describe your application via base tables in a straightforward way. Use them as they were intended.