Database Creation: Table: Employee
Database Creation: Table: Employee
Database Creation: Table: Employee
Table: Employee
Column Name
Employee_ID (PK)
Employee_Name
Manager_ID
Data type
AutoNumber
Text
Number
Column Name
Product_ID (PK)
Brand_Name
Product_Name
Price
Subcategory_ID
Data type
Number
Text
Text
Currency
Number
Column Name
Category_ID (PK)
Category
Data type
AutoNumber
Text
Table: Product
Data type
AutoNumber
Text
Text
Number
Table: SalesFact
Column Name
Month (PK)
State_ID (PK)
Product_ID (PK)
Employee_ID (PK)
Sales_Dollars
Sales_Units
Data type
Date/Time
Number
Number
Number
Currency
Number
Column Name
State_ID (PK)
State_Name
Region
Country
Data type
Number
Text
Text
Text
Table: State
Practical No: 02
Title: Creating a Data Warehouse
Problem Statement: Create and schedule a DTS Package using Data Transformation
services (DTS) tool. Fire at least 5 queries on the database.
Description:
Creating a DTS Package with the DTS Import/Export Wizard
The Data Transformation Services (DTS) Import/Export Wizard offers the simplest
method of building a DTS package, interactively guiding you through the process of
copying and transforming data. Following are the basic steps for creating a package with
the DTS Import/Export Wizard:
1. Open SQL Server Enterprise Manager, expand the server, and click the Databases
folder.
2. On the Tools menu, point to Data Transformation Services, and then click
Import Data.
3. In the Choose a Data Source dialog box, select Microsoft Access as the Data
Source, and then type the path and file name of your Access database (.mdb), or
use the browser to browse for the file.
4. In the Choose a Destination dialog box, select Microsoft OLE DB Provider for
SQL Server, and then select the database server and the required authentication
mode. In the Database dialog box, select the target database on the server.
5. In the Specify Table Copy or Query dialog box, click Copy tables and views
from the source database. If you copy the data or the results of a query, you can
customize the data being copied to the destination. You can:
6. In the
to import.
7. In the Save, Schedule, and Replicate Package dialog box, select Run
Immediately.(You can save the package to the SQL Server msdb database, to
SQL Server 2000 Meta Data Services, as a structured storage file (.dts file), or as
a Microsoft Visual Basic file.)
8. Click Finish.
Cube Creation
Create a new OLAP database
1. Right click the server in the console tree, and click New Database to display the
Database dialog Box.
2. Type Sales as the database name, and type Market Database as the description.
3. Click OK to close the dialog box and to create the database.
Specify a data source
1. Expand the Sales database folder. Right-click the Data Sources folder, and on the
shortcut menu, click New Data Source.
2. Select Microsoft Jet 4.0 OLE DB Provider, and click Next.
3. On the connection Tab of the Data Link Properties dialog box, click the ellipsis
button(), navigate to the folder containing the Sales.mdb
4. Click Test Connection to make sure the data source definition is correct. Then
click OK to close the dialog box. Expand the Data Sources folder to see the New
Data Source.
5. Right-click the New Data Source, and click Copy on the shortcut menu. Rightclick the Sales database, and click Paste on the shortcut menu. When asked for a
new name, click Delete on the shortcut menu, and click Yes to confirm.
Designing a Cube by Using the Cube Wizard
Select the Fact Tables and the Measures:
1. Right Click the Cube folder under the Sales database, point to New Cube, and
then click Wizard to start the Cube Wizard. On the Welcome screen, click Next.
2. Select SalesFact from the list of tables.
3. Click Browse Data to review the records in the table. Close the Browse Data
window.
4. After selecting the fact table, click Next to move to the next step of the wizard.
5. Add the Sales_Dollars and Sales_Units columns as measures by double-clicking
each in turn. You can select a measure and click the right arrow button(>).
6. After adding both measures, click Next.