473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Naming syntax in 2005

Here is a simple question. I am having difficulty accessing books
online at Microsoft so I thought I would ask here. What is the
standard naming syntax for Sqlserver 2005? Assuming I had the
following table, [proddb01].[details].[dbo].[daily_tranx], how would I
refer to it in the new version?

Thanks a lot!

Mar 12 '06 #1
5 1185
ne**********@yahoo.com wrote:
Here is a simple question. I am having difficulty accessing books
online at Microsoft so I thought I would ask here. What is the
standard naming syntax for Sqlserver 2005? Assuming I had the
following table, [proddb01].[details].[dbo].[daily_tranx], how would I
refer to it in the new version?


What's the problem? If your example follows this syntax:

<server>.<database>.<owner>.<table>

then it should work.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Mar 12 '06 #2
On 12 Mar 2006 14:26:55 -0800, ne**********@yahoo.com wrote:
Here is a simple question. I am having difficulty accessing books
online at Microsoft so I thought I would ask here. What is the
standard naming syntax for Sqlserver 2005? Assuming I had the
following table, [proddb01].[details].[dbo].[daily_tranx], how would I
refer to it in the new version?

Thanks a lot!


Hi newtophp2000,

In SQL Server 2000, namiing was <server>.<database>.<owner>.<table>. In
SQL Server 20005, this changes to <server>.<database>.<schema>.<table>.

The only change is that owner and schema are now seperated. On migration
from 2000 to 2005, all objects will automatically be placed in a schema
that matches the name of the owner. After that, you can decide to change
the schema, and you set the schema for new objects how you want.

--
Hugo Kornelis, SQL Server MVP
Mar 12 '06 #3
(ne**********@yahoo.com) writes:
Here is a simple question. I am having difficulty accessing books
online at Microsoft so I thought I would ask here. What is the
standard naming syntax for Sqlserver 2005? Assuming I had the
following table, [proddb01].[details].[dbo].[daily_tranx], how would I
refer to it in the new version?


The same as you always have done.

The example is a little funny. "proddb01" sounds like a database, but
it appears in the position of the server name.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 12 '06 #4
My thanks to all who replied. So, if I understand it correctly, while
the syntax remains the same, the dbo part will really refer to a schema
within the database? (i.e., each user will have their own separate
area where they can create tables.)

(Erland, you are right. proddb01 is a server, we just name it that way
to distinguish it from test servers where we can play freely. Nothing
else runs on these servers other than the database; hence the name.)


Erland Sommarskog wrote:
The same as you always have done.

The example is a little funny. "proddb01" sounds like a database, but
it appears in the position of the server name.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se


Mar 13 '06 #5
(ne**********@yahoo.com) writes:
My thanks to all who replied. So, if I understand it correctly, while
the syntax remains the same, the dbo part will really refer to a schema
within the database? (i.e., each user will have their own separate
area where they can create tables.)


Yes and no, and maybe mainly no.

Schema is not really anything new in SQL Server. There has always been
schemas, and up to SQL 2000 any user had his own schema, and there was
no way to drop the schema for a user. Whether he actually could create
tables in tables in that schema depended on whether he had permissions
to create tables. The same was also true for roles - a role always came with
a schema.

The reason you did not always think of this as a schema, was because
the terminology talked about owner, and indeed, schema and ownership
were indeed the same thing.

In SQL 2005 schema and ownership are not tied to each other. This means
that you can create users without creating schemas for them, and the only
schema in the database used by an application will in many cases be DBO.

For more details on owner/schema separation, see
http://www.sommarskog.se/grantperm.html#ownerschema. (This is part
of a longer article.)

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
7
by: DEX | last post by:
Main page of my NC: http://www.ddmrm.com/coding/cpp/naming/cpp.naming.main.html Rules of my NC: http://www.ddmrm.com/coding/cpp/naming/cpp.naming.rules.html Comments are welcome. ...
38
by: news.microsoft.com | last post by:
Greetings, I am posting this message to both the SQL Server and C# news groups because this inquiry is more of a theoretical question that applies to both database and code naming conventions. ...
8
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc)....
0
by: Carl Colijn | last post by:
Hi all, Disclaimer: before I might trigger your "let's start a holy war!" button, I'd like to say I'm not intended to; I just post this message to get some input and not to promote "Yet Another...
9
by: kevininstructor | last post by:
Greetings, I am in the process of creating naming conventions for VB.NET controls i.e. CheckBox -> chkShowThisOnStartup ListBoxt -> lstSomeList What I am looking for other developers...
4
by: Sturdy | last post by:
Hi, I'm new to C# and .NET. I'm a first time user of Visual C# 2005 Express and have a very basic question. I've looked at several links and lots of docs but can't find any tips on naming multiple...
9
by: Pieter | last post by:
Hi, I thouht that I read somewhere that Visual Studio .NET 2005 is able to force naming conventions for controls etc., but I can't find it anymore :-/ did I dream this or is this real? :-) If...
9
by: BillCo | last post by:
I'm coming from a MS Access background and so I'm very used to and comfortable with the hungarian (Leszynski et al) naming conventions. However, I'm getting started into my first SQL Server...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.