Top Banner
Prentice Hall © 2004 1 COS 346 Day 19 Day 19
60

Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

Jan 05, 2016

Download

Documents

Ilene Rose
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

Prentice Hall © 20041

COS 346

Day 19Day 19

Page 2: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

7-2

Agenda

• Questions?• Assignment 8 not Corrected yet• Assignment 9 posted

– Due April 13 @ 2:05 PM• Quiz 2 Corrected

– 2 A’s, 4 B’s & 2 C’s– There was a bad answer in the quiz

• New Time line • Discussion on Managing Multiuser Databases

Page 3: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

New time line

• April– 9 - Managing Multiuser

databases

– 13 - Managing Multiuser databases

• Assignment 9 due

– 16 - Database access standards

• April

– 20 - Database access standards

• Progress report

– 23 XML and ado.net

• Assignment 10 due

– 27

• Quiz 3

• Capstones Presentations Due

Page 4: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-4

David M. Kroenke’s

Chapter Nine:Managing Multiuser Databases

Part Two

Database Processing:Fundamentals, Design and Implementation

Page 5: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-5

ACID Transactions

• Acronym ACID transaction is one that is Atomic, Consistent, Isolated, and Durable

• Atomic means either all or none of the database actions occur

• Durable means database committed changes are permanent

Page 6: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-6

ACID Transactions

• Consistency means either statement level or transaction level consistency– Statement level consistency: each statement

independently processes rows consistently– Transaction level consistency: all rows impacted by

either of the SQL statements are protected from changes during the entire transaction

• With transaction level consistency, a transaction may not see its own changes

Page 7: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-7

Consistent

UPDATE CUSTOMER

SET AreaCode = ‘834’

WHERE Zipcode = ‘04743’;

BEGIN TRANSACTION;

UPDATE CUSTOMER

SET AreaCode = ‘834’

WHERE Zipcode = ‘04743;

…some other stuff….

UPDATE CUSTOMER

SET Discount= 0.05

WHERE AreaCode = ‘834’;

…some other stuff….

COMMITT TRANSACTION

Page 8: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-8

ACID Transactions

• Isolation means application programmers are able to declare the type of isolation level and to have the DBMS manage locks so as to achieve that level of isolation

• 3 Possible Problems– Dirty Reads read uncommited data– Nonrepeatable Reads if you reread data and find something

has changed (committed change)– Phantom Reads if you read data and find new row

• SQL-92 defines four transaction isolation levels: – Read uncommitted– Read committed– Repeatable read– Serializable

Page 9: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-9

Transaction Isolation Level

A Higher isolation level generally means lower throughput

http://msdn.microsoft.com/en-us/library/ms173763.aspx USE AdventureWorks; GO SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; GO BEGIN TRANSACTION; GO SELECT *     FROM HumanResources.EmployeePayHistory; GO SELECT *     FROM HumanResources.Department; GO COMMIT TRANSACTION; GO

Page 10: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-10

Cursor Type• A cursor is a pointer into a set of records• It can be defined using SELECT statements• Four cursor types

– Forward only: the application can only move forward through the recordset

– Scrollable cursors can be scrolled forward and backward through the recordset

• Static: processes a snapshot of the relation that was taken when the cursor was opened

• Keyset: combines some features of static cursors with some features of dynamic cursors

• Dynamic: a fully featured cursor

• Choosing appropriate isolation levels and cursor types is critical to database design

• http://www.sqlteam.com/article/cursors-an-overview • http://msdn.microsoft.com/en-us/library/ms180169.aspx

Page 11: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-11

Cursor Summary

Page 12: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-12

Database Security

• Database security ensures that only authorized users can perform authorized activities at authorized times

• Developing database security– Determine users’ processing rights and

responsibilities – Enforce security requirements using security features

from both DBMS and application programs

Page 13: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-13

DBMS Security

• DBMS products provide security facilities • They limit certain actions on certain objects to certain

users or groups (also called roles)• Almost all DBMS products use some form of user name

and password security

Page 14: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-14

DBMS Security Model

Page 15: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-15

DBMS Security Guidelines

• Run DBMS behind a firewall, but plan as though the firewall has been breached

• Apply the latest operating system and DBMS service packs and fixes

• Use the least functionality possible– Support the fewest network protocols possible– Delete unnecessary or unused system stored procedures– Disable default logins and guest users, if possible– Unless required, never allow all users to log on to the DBMS

interactively

• Protect the computer that runs the DBMS– No user allowed to work at the computer that runs the DBMS– DBMS computer physically secured behind locked doors– Access to the room containing the DBMS computer should be recorded

in a log

Page 16: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-16

DBMS Security Guidelines

• Manage accounts and passwords– Use a low privilege user account for the DBMS service– Protect database accounts with strong passwords– Monitor failed login attempts– Frequently check group and role memberships– Audit accounts with null passwords– Assign accounts the lowest privileges possible– Limit DBA account privileges

• Planning– Develop a security plan for preventing and detecting security

problems– Create procedures for security emergencies and practice them

Page 17: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-17

Application Security

• If DBMS security features are inadequate, additional security code could be written in application program– Application security in Internet applications is often provided on

the Web server computer

• However, you should use the DBMS security features first– The closer the security enforcement is to the data, the less

chance there is for infiltration– DBMS security features are faster, cheaper, and probably result

in higher quality results than developing your own

Page 18: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-18

SQL Injection Attack

• SQL injection attack occurs when data from the user is used to modify a SQL statement

• User input that can modify a SQL statement must be carefully edited to ensure that only valid input has been received and that no additional SQL syntax has been entered

• Example: users are asked to enter their names into a Web form textbox– User input: Benjamin Franklin ' OR TRUE '

SELECT * FROM EMPLOYEEWHERE EMPLOYEE.Name = 'Benjamin Franklin' OR TRUE;

– Result: every row of the EMPLOYEE table will be returned

Page 19: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-19

Database Recovery

• In the event of system failure, that database must be restored to a usable state as soon as possible

• Two recovery techniques: – Recovery via reprocessing– Recovery via rollback/rollforward

Page 20: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-20

Recovery via Reprocessing

• Recovery via reprocessing: the database goes back to a known point (database save) and reprocesses the workload from there through the existing apllications

• Unfeasible strategy because– The recovered system may never catch up if the

computer is heavily scheduled– Asynchronous events, although concurrent

transactions, may cause different results

Page 21: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-21

Rollback/Rollforward

• Recovery via rollback/rollforward: – Periodically save the database and keep a database

change log since the save• Database log contains records of the data changes in

chronological order

• When there is a failure, either rollback or rollforward is applied– Rollback: undo the erroneous changes made to the

database and reprocess valid transactions– Rollforward: restored database using saved data and

valid transactions since the last save

Page 22: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-22

Rollback

Before-image: a copy of every database record (or page) before it was changed.

Page 23: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-23

Rollforward

After-image: a copy of every database record (or page) after it was changed

Page 24: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-24

Checkpoint

• A checkpoint is a point of synchronization between the database and the transaction log– DBMS refuses new requests, finishes processing outstanding

requests, and writes its buffers to disk– The DBMS waits until the writing is successfully completed

the log and the database are synchronized

• Checkpoints speed up database recovery process– Database can be recovered using after-images since the last

checkpoint– Checkpoint can be done several times per hour

• Most DBMS products automatically checkpoint themselves

Page 25: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-25

Transaction Log

Page 26: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-26

Database Recovery:A Processing Problem Occurs

Page 27: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-27

Database Recovery: Recovery Processing

Page 28: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-28

Managing the DBMS

• DBA’s Responsibilities– Generate database application performance reports– Investigate user performance complaints– Assess need for changes in database structure or

application design– Modify database structure– Evaluate and implement new DBMS features– Tune the DBMS

Page 29: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-29

Maintaining the Data Repository• DBA is responsible for maintaining the data repository• Data repositories are collections of metadata about

users, databases, and its applications• The repository may be

– Virtual as it is composed of metadata from many different sources: DBMS, code libraries, Web page generation and editing tools, etc.

– An integrated product from a CASE tool vendor or from other companies

• The best repositories are active and they are part of the system development process

Page 30: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-30

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Chapter Nine Part Two

Page 31: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-31

David M. Kroenke’s

Chapter Eleven:

Managing Databases withSQL Server 2000

Part One

Database Processing:Fundamentals, Design, and Implementation

Page 32: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-32

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

• For SQL Server 2005 use the GUI SQL Server Management Studio

Page 33: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-33

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

Page 34: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-34

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

Page 35: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-35

View Ridge Gallery Database Design

Page 36: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-36

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)

);

Page 37: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-37

SQL Server Enterprise Manager

Right-Click Databases, then use New Database… to create a new database

Page 38: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

SQL Server Management Studio

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

8-38

Page 39: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-39

Creating a Database

Type in the new database name, and

then click the OK button.

Page 40: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-40

Page 41: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-41

SQL Query Analyzer:Starting SQL Query Analyzer from Enterprise Manager

Use the menu command Tools

| SQL Query Analyzer.

Page 42: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-42

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.

Page 43: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-43

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Chapter Eleven Part One

Page 44: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-44

David M. Kroenke’s

Chapter Eleven:

Managing Databases withSQL Server 2000

Part Two

Database Processing:Fundamentals, Design, and Implementation

Page 45: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-45

SQL Server CREATE TABLE Statementsfor the View Ridge Schema

Page 46: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-46

SQL Server CREATE TABLE Statementsfor the View Ridge Schema

Page 47: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-47

SQL Server CREATE TABLE Statementsfor the View Ridge Schema

Page 48: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-48

SQL Server CREATE TABLE Statementsfor the View Ridge Schema

Page 49: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-49

Viewing Tablesin Enterprise Manager

Right-Click the table

name, then click Design

Table to view table

columns and properties.

Page 50: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

8-50

Page 51: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-51

Viewing Table Columns and Properties in Enterprise Manager

Right-click the white

space and then click

Properties to see table

constraints.

Page 52: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-52

Viewing Table Constraints in Enterprise Manager

Page 53: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-53

Creating a Relationship Diagram in Enterprise Manager

Right-click Diagrams, then click

New Database

Diagram to create a

relationshipsdiagram.

Page 54: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-54

Table Relationship Diagram

Right-click a relationship line, then

click Properties to

see the properties.

Page 55: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-55

WORK – TRANS Relationship Properties

Page 56: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

8-56

Page 57: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-57

Creating Views:By SQL in SQL Query Analyzer

Do NOT put a semi-colon (;) at the end of a CREATE

VIEW statement in SQL Query Analyzer!

Page 58: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-58

Creating Views:By GUI in Enterprise Manager

Page 59: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

8-59

Page 60: Prentice Hall © 2004 1 COS 346 Day 19. 7-2 Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 13 @ 2:05 PM Quiz 2 Corrected.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall

9-60

David M. Kroenke’s Database Processing

Fundamentals, Design, and Implementation

(10th Edition)

End of Presentation:Chapter Eleven Part Two