Chapter 5. Creating Databases and Tables

After you install SQL Server 2008, you can get down to the nuts and bolts of SQL Server databases. And as with any database, you want to apply the basics of good database design, which I cover in Chapter 4. In this chapter, I take you through the process of creating a database on a SQL Server. You find out how easily you can configure a new database, populate it with the tables that hold your data, and modify existing tables.

Remember that a database is a collection of related tables that store your data. Each time you install SQL Server on a system, you have the ability to create one or more databases to store different kinds of data. When you install SQL Server, you don't actually create a database. Rather, you create a server that has the capability to store databases. In this chapter, I show you how to create a single database on your new SQL Server.

Warning

If you just opened the book and skipped to this chapter, you probably want to take a few minutes to look over Chapter 4, where I discuss the proper way to design a database. If you try to create your database and tables without understanding that information, you might make design decisions that will make your life difficult down the road. For example, if you don't design your tables efficiently at first, you may need to redesign them later. Redesigning existing database tables requires modifying all the queries and reports that use those tables — a time-consuming task.

Creating a Database ...

Get Microsoft® SQL Server® 2008 For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.