Database Reference
In-Depth Information
( NAME=N'DWPubsSales_log'
, FILENAME=N'C:\_BISolutions\PublicationsIndustries\DWPubsSales_log.LDF'
, SIZE=1MB
, MAXSIZE=1GB
, FILEGROWTH=10MB)
GO
EXEC [DWPubsSales].dbo.sp_changedbowner @loginame=N'SA', @map=false
GO
ALTER DATABASE [DWPubsSales] SET RECOVERY BULK_LOGGED
GO
If you are typing the SQL code, highlight and execute the code by clicking the “! Execute” button.
In this exercise, you created the database that is used as the Publication Industries sales data warehouse.
next you need to fill it with fact and dimension tables.
Creating Tables
As you saw from Listing 5-5, creating a database with SQL code is pretty straightforward. However, many
developers prefer to use the New Database dialog windows instead.
Creating a table is just as easy, and as with creating a database, you can use either code or designer windows.
SQL Server Management Studio has two tools for designing tables. The first one we look at is the table designer.
Different versions of SQL Server may not include all the designer tools mentioned here. In this topic, we
assume that you are using SQL Server's developer edition, which includes all SQL Server's designer tools. For more
information, see SQL Books online.
Note
Using the Table Designer
SQL Server Management Studio's table designer provides a graphical way to create tables by using a designer
window along with a property window. To create a new table with the table designer, start by using Object
Explorer to select the database in which you want to create the table, and then expand the treeview until you see
the Tables folder. From there, right-click the Tables folder to get a context menu that allows you to add a new table
(Figure 5-18 ).
 
 
Search WWH ::




Custom Search