Creating a Database
The first step in building a database with SQL Server is to actually create the database. That’s
right. SQL Server is a piece of software that runs on a computer, or server. Once the SQL Server
software is installed you can create a database (or databases) with the SQL Server software
database, which it is, sort of. SQL Server is actually an application, a Relational Database
Management System (RDBMS), which can contain multiple databases.
We will be using SQL Server 7.0 to create the database in this session. If you
are using SQL Server 2000, the steps will be slightly different.
OK, let’s create the Music database. You’ll start by creating the database using Enterprise
Manager and perform the following steps:
1. Expand the SQL Server Group item, if it isn’t already expanded, in the Enterprise
Manager tree. Once expanded you should see a list of SQL Servers that are registered
with Enterprise Manager.
2. Right-click the SQL Server in which you want to create the Music database.
3. Select New➪Database. Figure 4-1 illustrates steps 1, 2, and 3.
4. You see the Database Properties dialog box, shown in Figure 4-1. On the General
tab, enter Music in the Name field. The Database Properties dialog box allows you
to control other features of your database such as file growth, maximum database
size, transaction log files, and so on. For the sake of brevity, accept the defaults.
Specifying database properties with Enterprise Manager
That’s it. You have created a SQL Server database using Enterprise Manager. If you want
to create a database with T-SQL, follow these steps:
0 comments:
Post a Comment