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
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
SQL server allows multiple schemas - dbo
, being the default - your database has a secondary (and possibly more) schema of lu
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).
Marc
lu is the schema name.
dbo stands for database owner. lu may be the user account the created the other tables
lu is a separate schema (dbo is the default)
For more on schemas, this looks helpful: http://stackoverflow.com/questions/529142/what-good-are-sql-server-schemas