© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.

Slides:



Advertisements
Similar presentations
Designing Tables in Microsoft Access By Ed Lance.
Advertisements

Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Copyright © 2008 Pearson Prentice Hall. All rights reserved Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Access.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 David M. Kroenke’s Chapter Eight: Database Redesign Database Processing:
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.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Ten: Managing Databases with SQL Server 2008.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Database Administration Chapter Six DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 2 Introduction to Database Development.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 10 Database Application Design.
Introduction to Structured Query Language (SQL)
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Creating Tables, Defining Constraints Rose-Hulman Institute of Technology Curt Clifton.
Introduction to Structured Query Language (SQL)
Database Administration Part 1 Chapter Six CSCI260 Database Applications.
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.
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
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.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
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.
Working with Queries in Microsoft Access The Access Workbench: Section Three DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Database Technical Session By: Prof. Adarsh Patel.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
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.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
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 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 8 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 8 Creating.
Application Data and Database Activities Auditing Dr. Gabriel.
© 2002 by Prentice Hall 1 Database Processing with Microsoft Access David M. Kroenke Database Concepts 1e Appendix A.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
Database Processing with Microsoft Access Appendix DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
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.
© 2002 by Prentice Hall 1 Database Administration David M. Kroenke Database Concepts 1e Chapter 6 6.
1 SQL - II Data Constraints –Applying data constraints Types of data constraints –I/O constraints The PRIMARY KEY constraints The FOREIGN KEY constraints.
Oracle 11g: SQL Chapter 4 Constraints.
SQL Server 2005 Implementation and Maintenance Chapter 3: Tables and Views.
Introduction to Database System Adisak Intana Lecturer Chapter 7 : Data Integrity.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 12 Managing Databases with Oracle.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
4. SQL Backup tasks Objectives –Secure the databases and the database server Contents –Understanding Backup Terms, –Backing Up Databases, Files, Filegroups,
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
Relational Database Management System(RDBMS) Structured Query Language(SQL)
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Ten A: Managing Databases with SQL Server 2012.
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
SQL Basics Review Reviewing what we’ve learned so far…….
Chapter Seven: SQL for Database Construction and Application Processing.
Managing Tables, Data Integrity, Constraints by Adrienne Watt
Microsoft SQL Server 2014 for Oracle DBAs Module 7
Database Processing: David M. Kroenke’s Chapter Seven:
CIS16 Application Programming with Visual Basic
Chapter 7 Using SQL in Applications
Database Administration
Chapter 11 Managing Databases with SQL Server 2000
Presentation transcript:

© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000

© 2002 by Prentice Hall 2 SQL Server versus Oracle Like Oracle, SQL Server adheres to the standards established by the American National Standards Institute (ANSI). As a result, the products are quite similar. A primary difference between the 2 products is the SQL Server 2000 Graphical Interface.

© 2002 by Prentice Hall 3 Launching SQL Server Enterprise Manager  Console Root  Microsoft SQL Servers  SQL Server Group  DBGRV101  Databases  Right-Click  Click New Database

© 2002 by Prentice Hall 4 Invoking the SQL Query Analyzer From the SQL Server Enterprise Manager:  Click Tools  Click SQL Query Analyzer

© 2002 by Prentice Hall 5 Creating a Table with SQL in the SQL Query Analyzer Create Table cust (custIDIntPrimary Key, [Name]Char (50)Not Null, AreacodeChar (5)Null Default (206) Check (Areacode In (‘206’, ‘425’, ‘212’)) ) *note: since ‘Name’ is a reserved word, it must be enclosed in square brackets.

© 2002 by Prentice Hall 6 Creating a Table Using the Graphical Table Creation Window Right Click on Tables from the Enterprise Manager Click New Table Fill-in the dialog box

© 2002 by Prentice Hall 7 SQL Server Data Types Char Datetime Decimal Float Image Int Money Numeric Real Smalldatetime Smallint Smallmoney Text Tinyint Varchar

© 2002 by Prentice Hall 8 Automatically Incrementing the Primary Key To automatically increment a Primary Key… –Set the Identity Speed The starting value –Set the Identity Increment The value that is added each time

© 2002 by Prentice Hall 9 User-Defined Data Types Right-Click on User-Defined Data Types from the Enterprise Manager Select New User-Defined Data Type Complete the dialog box fields

© 2002 by Prentice Hall 10 Defining Rules Rules are declarative expressions that limit data values. The general format Any SQL predicate expression is permitted (the limiting expression found in the WHERE clause) Rules serve the same purpose as the Check clauses of Create and Alter statements. However, Rules are not part of the ANSI standard.

© 2002 by Prentice Hall 11 Changing Table Structures The SQL Alter statement may be used to change the structure of a table Or… the Table Design Form may be used to change the structure of a table.

© 2002 by Prentice Hall 12 Deleting a Table The SQL Drop statement may be used to delete tables Or… you may Right-Click on the Table from the Enterprise Manager and select Delete.

© 2002 by Prentice Hall 13 Defining Relationships The SQL Foreign Key constraint may be defined when using a Create or Alter statement to define relationships Or… you may Right-Click on Diagrams from the Enterprise Manager and select New Database Diagram.

© 2002 by Prentice Hall 14 Defining Relationships using New Database Diagram Once invoked, a wizard will guide you through the process of creating the GUI. Once the GUI is created, you may drop-and-drop a Primary Key from one table to another.

© 2002 by Prentice Hall 15 Enforcing Referential Integrity Similar to Microsoft Access, the Enforce Referential Integrity Checkbox must be selected. However, SQL Server provides many more options.

© 2002 by Prentice Hall 16 Views The SQL Create View statement may be used to create views in SQL Server. Or… you may create views using the SQL Server GUI. –Right-Click on Views in the Enterprise Manager –Click New View –Complete the dialog box fields

© 2002 by Prentice Hall 17 Indexes The SQL Create Index statement may be used to create an Index. Or… you may Right-Click on the table that contains the column you wish to index –Click All Tasks –Click Manage Indexes Note… SQL Server automatically creates an Index for all Primary keys and Foreign Keys

© 2002 by Prentice Hall 18 Application Logic Programming logic may be depicted using… –SQL (using the SQL Query Analyzer) –Embedding application programs written in various programming languages (e.g., Visual Basic, Java, C#, C++, OBDC, Active Data Objects, or JDBC) –Write procedures using TRANSACT- SQL. Invoke TRANSACT-SQL code using the SQL Query Analyzer via stored procedures and triggers

© 2002 by Prentice Hall 19 Saved Queries SQL Server allows you to save a Query and execute it in the future.

© 2002 by Prentice Hall 20 Stored Procedures Using TRANSACT-SQL, you may create stored procedures The following is an example of how to call a stored procedure:

© 2002 by Prentice Hall 21 Triggers Triggers are stored procedures that are automatically called when a specified action occurs

© 2002 by Prentice Hall 22 Concurrency Control Concurrency Control behavior is a function of three factors: –Transaction Isolation Level –Cursor Concurrency –Locking Hints

© 2002 by Prentice Hall 23 Transaction Isolation Level From least to most restrictive, the transaction isolation levels are… –Read uncommitted –Read committed (default) –Repeatable read –Serializable

© 2002 by Prentice Hall 24 Cursor Concurrency The cursor concurrency options are… –Read_only –Optimistic –Scroll_lock

© 2002 by Prentice Hall 25 Locking Hints Locking hints may be placed in SQL Select statements by adding the With parameter after the From clause. Common locking hints include… –ReadCommitted –ReadUncommitted –RepeatableRead –Serializable –NoLock –HoldLock

© 2002 by Prentice Hall 26 Invoking a Backup Procedure Launch the Enterprise Manager Click Databases Right-Click on the database name Select All Tasks Select Backup Database Complete the dialog box

© 2002 by Prentice Hall 27 Types of Backups SQL Server supports several types of backups –Complete –Differential –Transactional log –File and filegroup

© 2002 by Prentice Hall 28 Recovery Options Recovery is performed at one of three levels: –Simple –Full –Bulk-Logged

© 2002 by Prentice Hall 29 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000