lu.[TableName] 而不是 dbo.[TableName]?

发布于 2024-08-03 11:14:08 字数 100 浏览 2 评论 0原文

我的 SQL Server 2005 数据库中的某些表被命名为 lu.[TableName],而不是 dbo.[TableName]。卢代表什么?

注意:我已经尝试过谷歌

Some of the tables in my SQL Server 2005 database is named as lu.[TableName] instead of dbo.[TableName]. What does lu stand for?

Note: I tried google already

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

温柔少女心 2024-08-10 11:14:09

“lu”是查找表的缩写

'lu' is an abbreviation for lookup table

花开雨落又逢春i 2024-08-10 11:14:09

lu 是一个单独的架构(dbo 是默认值)

有关架构的更多信息,这看起来很有帮助: SQL Server 架构有什么好处?

lu is a separate schema (dbo is the default)

For more on schemas, this looks helpful: What good are SQL Server schemas?

暖心男生 2024-08-10 11:14:09

SQL Server 允许多个架构 - dbo ,作为默认值 - 您的数据库具有 lu 的辅助(可能还有更多)模式

SQL server allows multiple schemas - dbo, being the default - your database has a secondary (and possibly more) schema of lu

述情 2024-08-10 11:14:09

lu 是架构名称。

dbo 代表数据库所有者。 lu 可能是创建其他表的用户帐户

lu is the schema name.

dbo stands for database owner. lu may be the user account the created the other tables

两仪 2024-08-10 11:14:08

这将是 SQL Server 2005 中的一个架构 - 您可以使用 CREATE SCHEMA 自行创建该架构。

模式可用于分离逻辑上属于在一起的数据库对象,例如将所有与人力资源相关的表放入“HR”模式等。DB 模式有点像.NET 或XML 命名空间。

模式还可以用于处理权限,例如,您可以在模式级别将权限委托给用户和角色。

查看广泛使用模式的 AdventureWorks 数据库示例。

这也是您应该始终使用“dbo”限定数据库对象的原因之一。前缀。如果不这样做,SQL Server 的查询引擎将首先检查您的默认架构(可能与 dbo 不同)中是否有该名称的对象,如果没有找到,则转到 dbo 架构。如果您始终使用“dbo.YourTableName”,则查询引擎会预先知道要查找的位置 - 性能会得到微小的提升(会乘以数千次访问)。

That would be a schema in SQL Server 2005 - which you can create yourself using CREATE SCHEMA.

A schema can be used to separate out database objects that logically belong together, e.g. put all tables related to human resources into a "HR" schema etc. DB Schemas are a bit like .NET or XML namespaces.

A schema can also be used to handle permissions, e.g. you can delegate permissions to user and roles on a schema level.

Have a look at the sample AdventureWorks database which uses schemas extensively.

That's also one of the reasons you should always qualify your database objects with the "dbo." prefix. If you don't, SQL Server's query engine will first have to check your default schema (which could be different from dbo) for the object of that name, and if not found it goes to the dbo schema. If you always use "dbo.YourTableName", the query engine knows upfront where to look - a tiny performance gain (which gets multiplied by thousands of accesses).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文