Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server.

Similar presentations


Presentation on theme: "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server."— Presentation transcript:

1 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server 2000 Part One Database Processing: Fundamentals, Design, and Implementation

2 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-2 Introduction SQL Server 2000 can be installed on: –Windows 2000 and Windows XP workstations –Windows 2000 Server and Windows Server 2003 There are two ways to create database, to insert data, and to modify its structure: –Use the GUI SQL Server Enterprise Manager –Write SQL statements and submit them to SQL Server via the SQL Query Analyzer utility Many SQL Server professionals choose to create structures via SQL then modify them with the graphical tools

3 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-3 View Ridge Gallery View Ridge Gallery is a small art gallery that has been in business for 30 years It sells contemporary European and North American fine art View Ridge has one owner, three salespeople, and two workers View Ridge owns all of the art that it sells; it holds no items on a consignment basis

4 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-4 Application Requirements View Ridge application requirements: –Track customers and their artist interests –Record gallery's purchases –Record customers' art purchases –List the artists and works that have appeared in the gallery –Report how fast an artist's works have sold and at what margin –Show current inventory in a Web page

5 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-5 View Ridge Gallery Database Design

6 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-6 The IDENTITY Keyword SQL Server supports the SQL-92 standard The IDENTITY keyword implements a new constraint for surrogate keys: –IDENTITY (m, n) creates a surrogate key with an Identity Seed of m and an Identity Increment of n: CREATE TABLE CUSTOMER( CustomerID int NOT NULL IDENTITY (1000,1), Name char(25)NOT NULL, CONSTRAINT CustomerPK RIMARY KEY (CustomerID), CONSTRAINT CustomerAK1 UNIQUE (Name) );

7 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-7 SQL Server Enterprise Manager Right-Click Databases, then use New Database… to create a new database

8 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-8 Creating a Database Type in the new database name, and then click the OK button.

9 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-9 SQL Query Analyzer: Starting SQL Query Analyzer from Enterprise Manager Use the menu command Tools | SQL Query Analyzer.

10 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall SQL Query Analyzer: Creating the TRANS table in SQL Query Analyzer Use the Execute Query button after the SQL command is entered. Enter the SQL command in this window. Results appear in this window.

11 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Eleven Part One


Download ppt "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 11-1 David M. Kroenke’s Chapter Eleven: Managing Databases with SQL Server."

Similar presentations


Ads by Google