Chapter 11 Managing Databases with SQL Server 2000

Slides:



Advertisements
Similar presentations
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.
Advertisements

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 20.
©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 Chapter 11 Managing Databases with SQL Server 2000.
Transaction Management and Concurrency Control
Fundamentals, Design, and Implementation, 9/e Chapter 10 Managing Databases with Oracle 9i.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Concepts of Database Management Sixth Edition
9 Chapter 9 Transaction Management and Concurrency Control Hachim Haddouti.
Database Administration Part 1 Chapter Six CSCI260 Database Applications.
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.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
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.
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,
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
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.
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.
Chapter Seven: SQL for Database Construction and Application Processing.
Getting started with Accurately Storing Data
Fundamentals of DBMS Notes-1.
DBMS & TPS Barbara Russell MBA 624.
Chapter 6 - Database Implementation and Use
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
Functions of a Database Management System
Translation of ER-diagram into Relational Schema
Database solutions Database environment Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms: 3.21 C,
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Advanced SQL: Views & Triggers
Database Processing: David M. Kroenke’s Chapter Seven:
Chapter 7 Using SQL in Applications
Database management concepts
Chapter 7 Using SQL in Applications
Chapter 1 Introduction to Database Processing
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Presentation transcript:

Chapter 11 Managing Databases with SQL Server 2000

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 Copyright © 2004

Example: CREATE TABLE statement Copyright © 2004

Example: Table Properties 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)); Copyright © 2004

Example: Relationship Diagram Copyright © 2004

Creating Views 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 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 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 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 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 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 Copyright © 2004

SQL Server Concurrency Options 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 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 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 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 Copyright © 2004

Chapter 11 Managing Databases with SQL Server 2000