Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.

Slides:



Advertisements
Similar presentations
Fundamentals, Design, and Implementation, 9/e Chapter 8 Database Redesign.
Advertisements

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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 20.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 1/1 Copyright © 2004 Please……. No Food Or Drink in the class.
©2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 5 Slide 1 IT390 Business Database Administration Unit 5 :
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Ten: Managing Databases with SQL Server 2008.
Fundamentals, Design, and Implementation, 9/e Chapter 14 JDBC, Java Server Pages, and MySQL.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 11.
Transaction Management and Concurrency Control
Fundamentals, Design, and Implementation, 9/e Chapter 10 Managing Databases with Oracle 9i.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Fundamentals, Design, and Implementation, 9/e Chapter 6 Introduction to Structured Query Language (SQL)
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database Processing.
Concepts of Database Management Sixth Edition
9 Chapter 9 Transaction Management and Concurrency Control Hachim Haddouti.
CSC 2720 Building Web Applications Database and SQL.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Chapter 9 Database Management
Overview What is SQL Server? Creating databases Administration Security Backup.
Module 9: Managing Schema Objects. Overview Naming guidelines for identifiers in schema object definitions Storage and structure of schema objects Implementing.
1 Chapter Overview Creating a User Database Setting Database Options Managing User Database Size Placing Database Files on Multiple Disks.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Database Technical Session By: Prof. Adarsh Patel.
SQL Server 7.0 Maintaining Referential Integrity.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Database Management Systems Introduction. In the Beginning… Customer Program 1.
Chapter 5 Database Processing. Neil uses software to query a database, but it has about 25 standard queries that don’t give him all he needs. He imports.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 12 Understanding database managers on z/OS.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 6/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Fundamentals, Design, and Implementation, 9/e by David M. Kroenke BSA206 Database Management Systems Lecture 21: Databases and the Web Chapters 12, 13.
Fundamentals, Design, and Implementation, 9/e COS 346 DAY 20.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Commercial RDBMSs Access and Oracle. Access DBMS Architchecture  Can be used as a standalone system on a single PC: -JET Engine -Microsoft Data Engine.
Prentice Hall © COS 346 Day Agenda Questions? Assignment 8 not Corrected yet Assignment 9 posted –Due April 2:05 PM Quiz 2 Corrected.
06 | Modifying Data in SQL Server Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft SQL Server Program Manager.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Session 1 Module 1: Introduction to Data Integrity
1 Intro stored procedures Declaring parameters Using in a sproc Intro to transactions Concurrency control & recovery States of transactions Desirable.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Database technology Introduction ER Modeling Database objects (intro) SQL.
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
Chapter 3: Relational Databases
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Ten A: Managing Databases with Oracle Database.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. DATABASE.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Ten A: Managing Databases with SQL Server 2012.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
SQL Triggers, Functions & Stored Procedures Programming Operations.
SQL Basics Review Reviewing what we’ve learned so far…….
7.5 Using Stored-Procedure and Triggers NAME MATRIC NUM GROUP Muhammad Azwan Bin Khairul Anwar CS2305A Muhammad Faiz Bin Badrol Shah CS2305B.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Getting started with Accurately Storing Data
Chapter 6 - Database Implementation and Use
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Chapter 7 Using SQL in Applications
Chapter 7 Using SQL in Applications
Chapter 11 Managing Databases with SQL Server 2000
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Presentation transcript:

Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/2 Copyright © 2004 Introduction  SQL Server 2000 can be installed on Windows 2000 and Windows XP computers  There are two ways to create database, to insert data, and to modify its structure –Use the Server Enterprise Manager, i.e., graphical design tools similar to those in Microsoft Access –Write SQL statements and submit them to SQL Server via the SQL Query Analyzer utility  Many professionals choose to create structures via SQL, but to modify them with the graphical tools

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/3 Copyright © 2004 Example: CREATE TABLE statement

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/4 Copyright © 2004 Example: Table Properties

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/5 Copyright © 2004 IDENTITY Constraint  SQL Server supports SQL-92 standard  IDENTITY constraint is the only new constraint –IDENTITY (m, n) creates a surrogate key with an Identity Seed of m and an Identity Increment of n –Example: CREATE TABLE CUSTOMER( CustomerID int NOT NULL IDENTITY (1000,1), Name char(25) NOT NULL, CONSTRAINT CustomerPK PRIMARY KEY (CustomerID), CONSTRAINT CustomerAK1 UNIQUE (Name));

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/6 Copyright © 2004 Example: Relationship Diagram

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/7 Copyright © 2004 Creating Views

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/8 Copyright © 2004 Indexes  Indexes are special data structures used to improve database performance  SQL Server automatically creates an index on all primary and foreign keys  Additional indexes may be assigned on other columns that are –Frequently used in WHERE clauses –Used for sorting data

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/9 Copyright © 2004 Indexes (cont.)  SQL Server supports two kinds of indexes: –Clustered index: the data are stored in the bottom level of the index and in the same order as that index –Nonclustered index: the bottom level of an index contains pointers to the data  Clustered indexes are faster than nonclustered indexes for updating and retrieval

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/10 Copyright © 2004 Application Logic  SQL Server database application can be processed using –Programming language, e.g., C#, C++, Visual Basic, Java, to invoke SQL Server DBMS commands –Stored procedures –SQL Query Analyzer to invoke database commands stored in.sql files –Triggers

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/11 Copyright © 2004 Stored Procedures  With SQL Server 2000, stored procedures must be written in TRANSACT/SQL, or T/SQL –T/SQL surrounds basic SQL statements with programming constructs such as parameters, variables, and logic structures such as IF and WHILE  Creating stored procedures –Write a stored procedure in a text file and process the commands using the Query Analyzer –Using Enterprise Manager

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/12 Copyright © 2004 Triggers  Triggers can be used to –Enforce business rules –Set complex default values –Update views –Implement referential integrity actions  SQL Server supports INSTEAD OF and AFTER triggers only –A table may have one or more AFTER triggers –AFTER triggers may not be assigned to views –A view or table may have only one INSTEAD OF trigger for each triggering action  Triggers can roll back the transactions that caused them to be fired

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/13 Copyright © 2004 Concurrency Control  Three factors determine the concurrency control behavior of SQL Server –Transaction isolation level –Cursor concurrency setting –Locking hints provided in the SELECT clause  Locking behavior also changes, depending on whether actions occur in the context of transactions or cursors independently –Therefore, SQL Server places locks on behalf of the developer –Locks may be placed at many levels of granularity and may be promoted or demoted as work progresses

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/14 Copyright © 2004 SQL Server Concurrency Options

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/15 Copyright © 2004 SQL Server 2000 Security  SQL server provides two modes of authentication –Windows only: the authentication is provided by the windows operating system –Mixed security: SQL Server will accept either the windows-authenticated user name or it will perform its own authentication  Roles may be assigned to a SQL Server user account –A role is a group of predefined authorities –Public role has the authority only to connect to the database

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/16 Copyright © 2004 SQL Server Backup  SQL Server supports several types of backup –A complete backup makes a copy of the entire database –A differential backup makes a copy of the database changes since the last complete backup Differential backups are faster and can be taken more frequently Complete backups are simpler to use for recovery  The transaction log also needs to be periodically backed up

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/17 Copyright © 2004 Database Recovery  Both data and log files are created by SQL Server  SQL Server provides a wizard for setting up database maintenance plan, e.g., scheduling database and log backups  To recover a database with SQL Server –The database is restored from a prior database backup –Log after images are applied to the restored database –At the end of the log, changes from any transaction that failed to commit are then rolled back

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 11/18 Copyright © 2004 SQL Server Recovery Models  Three recovery models –Simple recovery: neither logging is done nor log records applied To recover a database is to restore the database to the last backup This method can be used for a database that is never changed –Full recovery: all database changes are logged –Bulk-logged: all changes are logged except those that cause large log entries

Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000