databases and connectivity mis 497. relational databases dominant database technology today....

20
Databases and Databases and Connectivity Connectivity MIS 497 MIS 497

Post on 22-Dec-2015

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Databases and ConnectivityDatabases and Connectivity

MIS 497MIS 497

Page 2: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Relational DatabasesRelational Databases

Dominant database technology today.Dominant database technology today. Stores data in relational format in the form of tables:Stores data in relational format in the form of tables:

– Data are organized in the form of tables with rows and Data are organized in the form of tables with rows and columnscolumns

– Powerful manipulations (using the SQL language) are Powerful manipulations (using the SQL language) are used to manipulate data stored in the tables.used to manipulate data stored in the tables.

– Facilities are included to specify business rules that Facilities are included to specify business rules that maintain integrity of data when they are manipulated.maintain integrity of data when they are manipulated.

Page 3: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Most popular productsMost popular products

Oracle (Oracle Corp)Oracle (Oracle Corp) DB2 (IBM)DB2 (IBM) SQL Server (Microsoft)SQL Server (Microsoft) Adaptive Server IQ (Sybase)Adaptive Server IQ (Sybase) Informix products (Dynamic Server, Red Informix products (Dynamic Server, Red

Brick)Brick) Teradata (NCR Corp.)Teradata (NCR Corp.)

Page 4: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational
Page 5: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

TablesTables

Table is a named two-dimensional array of data. Each table consists Table is a named two-dimensional array of data. Each table consists of a set of named columns and an arbitrary number of unnamed of a set of named columns and an arbitrary number of unnamed rows.rows.

Table properties:Table properties:1.1. Each table in a database has a unique nameEach table in a database has a unique name

2.2. An entry at the intersection of each row and column is atomic (or single-An entry at the intersection of each row and column is atomic (or single-valued). There can be no multi-valued attributes in a tablevalued). There can be no multi-valued attributes in a table

3.3. Each row is unique; no two rows in a table are identicalEach row is unique; no two rows in a table are identical

4.4. Each attribute (or column) within a table has a unique name.Each attribute (or column) within a table has a unique name.

5.5. The sequence of columns (left to right) is insignificant. The columns of a The sequence of columns (left to right) is insignificant. The columns of a table can be interchanged without changing the meaning or use of a table.table can be interchanged without changing the meaning or use of a table.

6.6. The sequence of rows (top to bottom) is insignificant. As with columns, the The sequence of rows (top to bottom) is insignificant. As with columns, the rows of a table may be interchanged or stored in any sequence.rows of a table may be interchanged or stored in any sequence.

Page 6: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Tables (continued)Tables (continued)

Page 7: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Relational KeysRelational Keys

A A primary keyprimary key is an attribute (or is an attribute (or combination of attributes) that uniquely combination of attributes) that uniquely identifies each row in a table.identifies each row in a table.

A A composite keycomposite key is a primary key that is a primary key that consists of more than one attribute.consists of more than one attribute.

A A foreign keyforeign key is an attribute (possibly is an attribute (possibly composite) in a table of a database that composite) in a table of a database that serves as a primary key of another table in serves as a primary key of another table in the same database.the same database.

Page 8: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

ConnectivityConnectivity

To use a database, one must connect to it.To use a database, one must connect to it. ODBC – Open Database Connectivity, de-ODBC – Open Database Connectivity, de-

facto connectivity standard created by facto connectivity standard created by Microsoft.Microsoft.

We’ll use ODBC to connect to our We’ll use ODBC to connect to our databases.databases.

Page 9: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

ODBCODBC

Page 10: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

DSNDSN

Data Source Name – Data Source Name – stores information on stores information on how to connect to the how to connect to the indicated data provider.indicated data provider.

To connect one must To connect one must know location and type know location and type of the data provider and of the data provider and have appropriate logon have appropriate logon credentials (login and credentials (login and password).password).

Page 11: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Database SecurityDatabase Security Unauthorized users must be prevented from accessing information.Unauthorized users must be prevented from accessing information. Databases have User Management tools.Databases have User Management tools. Each project group in the class will be assigned a unique user ID and Each project group in the class will be assigned a unique user ID and

password to access their Metadata and Data Warehouse databases.password to access their Metadata and Data Warehouse databases.

Page 12: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Resources UsedResources Used

Modern Database Management – Fifth Edition, Fred R. Modern Database Management – Fifth Edition, Fred R. McFadden and others, Addison-Wesley 1999.McFadden and others, Addison-Wesley 1999.

Page 13: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

WorkshopWorkshop

Page 14: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

First we’ll create a DSN to connect to our Data WarehouseFirst we’ll create a DSN to connect to our Data Warehouse Go toGo to

StartStartControl PanelControl PanelData Sources (ODBC)Data Sources (ODBC)System DSN.System DSN. Select AddSelect Add Scroll down, select SQL Server and click FinishScroll down, select SQL Server and click Finish

Page 15: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

Complete the fields as laid out below:Complete the fields as laid out below:

NameName VMALL_WH VMALL_WH

DescriptionDescription VMALL Data Warehouse VMALL Data Warehouse

ServerServer ADA ADA

Page 16: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

Make sure that you are using SQL Server authentication mode.Make sure that you are using SQL Server authentication mode. Enter the name of your group as your login and the password that was Enter the name of your group as your login and the password that was

assigned to you.assigned to you. Click NextClick Next

Page 17: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

Ensure that VMALL_WH is your default database and click NextEnsure that VMALL_WH is your default database and click Next

Page 18: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

Click Finish and then Test Your Data SourceClick Finish and then Test Your Data Source If you see the following screen then your DSN is created!If you see the following screen then your DSN is created! Click OK couple of timesClick OK couple of times

Page 19: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Creating DSNs for the projectCreating DSNs for the project

Now follow the same procedure to create a DSN for connection to your Now follow the same procedure to create a DSN for connection to your Metadata database according to the following information:Metadata database according to the following information:

DSN Name:DSN Name:YourGroupName_MD (I.e. Group3_MD)YourGroupName_MD (I.e. Group3_MD)

Server:Server: ADAADA

Login:Login: YourGroupNameYourGroupName

Password:Password: Use the one assigned to you by Dr. SauterUse the one assigned to you by Dr. Sauter

Default DB:Default DB:YourGroupNameYourGroupName

Page 20: Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational

Using DSNs for the projectUsing DSNs for the project

All changes to your project will be stored in the SQL Server database on All changes to your project will be stored in the SQL Server database on ADA. You’ll be able to access your project using MicroStrategy Desktop ADA. You’ll be able to access your project using MicroStrategy Desktop from any machine in the MIS Lab. Most probably that machine will from any machine in the MIS Lab. Most probably that machine will already have your DW DSN and even your metadata DSN if you worked already have your DW DSN and even your metadata DSN if you worked on that machine before. However, if they are not there, you should create on that machine before. However, if they are not there, you should create them manually (it takes less than a minute for each of them).them manually (it takes less than a minute for each of them).