views:

379

answers:

5

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  A: 

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

Rowland Shaw
+7  A: 

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

marc_s
+1  A: 

lu is the schema name.

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

TrickyNixon
+2  A: 

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

AlexCuse
+1  A: 

'lu' is an abbreviation for lookup table

Anthony Faull