问题
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
回答1:
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).
回答2:
'lu' is an abbreviation for lookup table
回答3:
lu is a separate schema (dbo is the default)
For more on schemas, this looks helpful: What good are SQL Server schemas?
回答4:
SQL server allows multiple schemas - dbo
, being the default - your database has a secondary (and possibly more) schema of lu
回答5:
lu is the schema name.
dbo stands for database owner. lu may be the user account the created the other tables
来源:https://stackoverflow.com/questions/1330833/lu-tablename-instead-of-dbo-tablename