Create a Table in SQL Server in SBS 2003 {Windows Small Business Server 2003 Best Practices book excerpt]

hiya gang – harrybbb here – author of the above book and holding da’ daily virtual book reading by posting up a passage. Here ya’ go…gotta run!

Creating the Tracking Table

You should always have a bona fide business purpose for creating a database and populating it with information. SPRINGERS is no exception. Here the underlying business purpose is clear: to use SQL Server to solve a problem. The problem is that, with the sheer volume of Springer Spaniels entering the world at SPRINGERS, you must have a method for tracking their whereabouts and exact origin. From the simple table here (a data dictionary) you’ll create the Tracking table in SQL Server. This allows you to achieve the important business goal of tracking Springer Spaniels.

Table 14-1 shows the data dictionary that you will use to create the database.

Table 14-1: SPRINGERS Data Dictionary

 

Item (Column Name)

Description

SSLDOG

Database name

Tracking

Table name for tracking springer spaniels

DogName

Name of dog (column name, Data Type = char,Length = 30)

ShowName

Long name of dog for show purposes (column name,Data Type = char, Length = 50)

FatherDN

Father dog’s name (column name, Data Type =char, Length = 30)

MotherDN

Mother dog’s name (column name, Data Type = char,Length = 30)

DDOB

Dog’s date of birth (column name, Data Type =datetime, Length = 8)

AKCNum

American Kennel Club (AKC) registration number(column name, Data Type = char, Length = 15)

 

Now commence the task of creating your Tracking table:

1.         Log on to the SBS server machine as Administrator with the pass­word Husky9999!

 Visit http://www.microsoft.com/technet for the latest updates for any Microsoft product.

14-22

Section 4 SBS 2003 Premium Edition

1                    Click Start, All Programs, Microsoft SQL Server, Enterprise Manager.

2                    Expand the following objects in the left pane: Microsoft SQL Serv­ers, SQL Server Group, SPRINGERS1 (Windows NT).

3                    Expand Databases, SSLDOG and then right-click the Table icon in the left pane. Select New Table from the secondary menu.

4                    The New Table in SSLDOG on SPRINGERS1 screen appears. Cre­ate the table based on the information contained in Table 14-1. For example, enter the column name under the Column Name column. Enter the data type under the Data Type column. Enter the field length in the Length column. You will not modify the Allow Nulls column. The result should look similar to Figure 14-9.

 

Figure 14-9

Tracking table setup.

Chapter 14 Database Management With SQL Server 2000

BEST PRACTICE: Move your cursor from field to field just like you would when using a spreadsheet. When your cursor is in the Data Type field, a down arrow appears. This is a drop-down menu containing the different types of data type fields you’ll be working with (for example, datetime).

1                    Click the Save icon on the left side of the toolbar (disk icon) on the New Table in SSLDOG on SPRINGERS1 screen. Type Tracking in the Enter a name for the table field when the Choose Name dialog box appears. Click OK.

2                    Close the Tracking Table window via the X in the upper-right cor­

 

ner of the screen. If you look at the table listed for SSLDOG database in the SQL Server Enterprise Manager, you will see that the Tracking table is listed in alphabetical order right after the sysusers table.

 

cheers…harrybbbb

Harry Brelsford, CEO at smb nation www.smbnation.com

Microsoft Small Business Specialist SBSC, MBA, MCSE, MCT, MCP, CNE, CLSE, CNP

PS – did u know I host a technology conference in the New York City area each spring? Save the date for March 6-8, 2009 and watch “voice meet data” in the SMB space!

PPS – my SBS 2008 book will be out in mid-November 2008!

PPPS – my Microsoft Response Point Primer book is here NOW!

Advertisements

Leave a comment

Filed under Book

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s