Database Reference
In-Depth Information
CHAPTER 9
C REATING THE P HYSICAL M ODEL
WITH SQL S ERVER
We have come a long way since we started our discussion about data mod-
eling, but now we are on the downhill slide. You have done all the hard
work—gathering requirements, transforming them into a logical model,
and acquiring customer approval of that model. Throughout this process
you had to make sure to avoid common problems and keep everything nor-
malized to a reasonable level.
Now it's time to use the logical model and the business requirements
to come up with your physical model. This physical model will become
your actual database in SQL Server. This chapter first covers the naming
guidelines we suggest for SQL Server objects, and then we talk about cre-
ating your physical model. So without further ado, let's get right into cre-
ating our physical model in Microsoft SQL Server.
Naming Guidelines
Naming guidelines are extremely important when you create your physical
model. There are literally hundreds of naming standards out there, and
each has its pros and cons. At the end of the day, it doesn't matter which
standard you use, as long as you use a standard.
Why is a naming standard so important? First, it provides a quick indi-
cator of the type of object you are working with. If all tables start with the
same prefix, such as “table” or “tbl,” and if all views start with “vw” or
“view,” then you will be able to tell at a glance where data is coming from.
This practice can save a lot of time and is especially helpful if you find
yourself looking at T-SQL code that is not performing well. Also, when
performance tuning, you will have different considerations for views than
189
 
 
Search WWH ::




Custom Search