Advanced Database & Client Server Introduction to MS SQL Server 2000 and Transact SQL -

Slides:



Advertisements
Similar presentations
9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
Advertisements

Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
MSc IT UFIE8K-10-M Data Management Prakash Chatterjee Room 3P16
ISD3 Lecture 4 - Databases, SQL and MySQL. dept deptno dname location emp empno ename not null job not null hiredate sal comm manager The EMP DEPT database.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
MI807: Database Systems for Managers Introduction –Course Goals & Schedule –Logistics –Syllabus Review Relational DBMS Basics –RDBMS Role in Applications.
1 1. SQL SERVER OVERVIEW zWhat Is SQL Server? zInterfaces To Use SQL Server zSQL Server Services zTypes Of Databases zSQL Server Security.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
MD807: Relational Database Management Systems Introduction –Course Goals & Schedule –Logistics –Syllabus Review RDBMS Basics –RDBMS Role in Applications.
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.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Passage Three Introduction to Microsoft SQL Server 2000.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Week 5 – Chap. 5 Data Transfer DBAs often must transfer data to and from text files, Excel spreadsheets, Access, Oracle or other SQL Server databases This.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Module 2: Using Transact-SQL Querying Tools. Overview SQL Query Analyzer Using the Object Browser Tool in SQL Query Analyzer Using Templates in SQL Query.
Overview What is SQL Server? Creating databases Administration Security Backup.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Database Lecture # 1 By Ubaid Ullah.
ASP.NET Programming with C# and SQL Server First Edition
RDB/1 An introduction to RDBMS Objectives –To learn about the history and future direction of the SQL standard –To get an overall appreciation of a modern.
Database Technical Session By: Prof. Adarsh Patel.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
1 SQL Server 2000 Administration Kashef Mughal MSB.
SQL/Lesson 4/Slide 1 of 45 Using Subqueries and Managing Databases Objectives In this lesson, you will learn to: *Use subqueries * Use subqueries with.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 2: Intro to Relational.
Using SAS® Information Map Studio
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Populating a Data Warehouse. Overview Process Overview Methods of Populating a Data Warehouse Tools for Populating a Data Warehouse Populating a Data.
DATABASE TRANSACTION. Transaction It is a logical unit of work that must succeed or fail in its entirety. A transaction is an atomic operation which may.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 12 Understanding database managers on z/OS.
Module 5: Upgrading to SQL Server 7.0. Overview Planning an Upgrade Preparing to Upgrade Verifying the Upgrade Setting a Compatibility Level.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
1 Chapter Overview What is Microsoft SQL Server 2000? What are the SQL Server 2000 Components? What is the Relational Database Architecture? What is the.
(SQL - Structured Query Language)
1 CS 430 Database Theory Winter 2005 Lecture 10: Introduction to SQL.
Database technology Introduction ER Modeling Database objects (intro) SQL.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
Introduction to Teradata Client Tools. 2 Introduction to Teradata SQL  OBJECTIVES :  Teradata Product Components.  Accessing Teradata – Database /
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
Manipulating Data Lesson 3. Objectives Queries The SELECT query to retrieve or extract data from one table, how to retrieve or extract data by using.
Creating Simple and Parallel Data Loads With DTS.
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
Understanding Core Database Concepts Lesson 1. Objectives.
3 A Guide to MySQL.
Module 1: SQL Server Overview
Managing, Storing, and Executing DTS Packages
SQL Server 2000 and Access 2000 limits
Contents Preface I Introduction Lesson Objectives I-2
Chapter 11 Managing Databases with SQL Server 2000
Understanding Core Database Concepts
Presentation transcript:

Advanced Database & Client Server Introduction to MS SQL Server 2000 and Transact SQL -

Module Structure This part of the module consists of –3 lectures –3 lab sessions –The material gives an overview of Microsoft SQL Server 2000 –There are resources on Black Board for some of the lab activities

Assessment for this component Is based on the type of assessment used by Microsoft for their certification exams. There will be a Phase Test made up of multiple choice questions taken from a pool of questions in Blackboard. Mock Questions will be available. Questions used in the Mock may appear again in the Phase Test along with new questions. Students are asked to submit questions which may be added to the pool for use in the Mock & Phase Test.

An Introduction to : MS SQL Server Architecture Databases and Database Objects Database File Storage Database Security Using MS SQL Server

MS SQL Server 2000 Client Server Architecture Server –RDBMS for OLTP and OLAP –Meets many of the general requirements for any RDBMS e.g. Integrity, Relationships, Recovery Clients –Enterprise Manager –Query Analyser –Command line Interface Clients can use –Transact SQL –XML –MDX

The 3 Tier Architecture Data presentation –Browser –Custom application Data services –Data access –Data storage Application Logic –Data rules –Business rules

MS SQL Server 2000 Application OLEDB ODBC Transact SQL XML MDX Transact SQLADO ADO MD VB ASP VB Script

database1 database2 database4 database3 database5 database6 MS SQL Server 2000

MSSQLS Databases System : Master msdb model tempdb User : Pubs Northwind User1 User2.....

Types of Database Objects Tables Data types Constraints Defaults Rules Indexes Views User Defined Functions Stored Procedures Triggers

System Tables Meta Data –Table definitions including column names and data types, null, defaults –Constraints –Rules –Indexes –View definitions –User defined functions, Stored procedures and Triggers

Because meta data is stored in tables we access this data the same way as ordinary table data. Using : Information_Schema Views SELECT * FROM INFORMATION_SCHEMA.TABLES System Procedures EXEC SP_HELP objectName System Functions SELECT COL_LENGTH (columnName) System Tables

SQL Server Object Names Begin with a letter Delimited Identifiers: – are used when a name contains spaces or reserved words –[....] or "....." Special characters imply special types  a variable or parameter –#name  a temporary object

Naming Database Objects server.database.owner.object galba.dbcmssc.cmssc.staff galba.dbcmssc..staff galba.NorthWind.. [Order Details]

Physical Storage of Each Database is in 2 or more files Primary File.mdf Primary File.mdf Secondary.ndf Secondary.ndf Transaction Log.ldf Transaction Log.ldf Zero or many secondary files There must be one primary file There must be at least one log file

SQL Server Security Login authentication –to access the SQL Server Windows SQL Server Permissions –to access a specific database part of a database (e.g. a column) –to perform actions

Working with SQL Server Graphical tools (Enterprise Manager, Query Analyser) Wizards Command line scripts (osql and bcp) Access Web browser Help – Books on line

Data Manipulation Language SELECT SELECT FROM JOIN... ON WHERE GROUP BY HAVING ORDER BY

ADDITIONS –- TOP n SELECT TOP 10 staff_id, salary FROM staff ORDER BY salary; (10 rows returned) SELECT TOP 5 Percent staff_id, salary FROM staff ORDER BY salary; (1 row returned)

ADDITIONS –Joining Tables Inner Joins Cross Joins Outer Joins (Left, Right and Full)

Joining Tables S_ID Name DeptNo DeptNo D_Name Loc Staff S_ID Name Department DeptNo D_Name Location belongs to 1 0..* has

Inner Join SELECT staff_id, d_name FROM staff s, department d WHERE s.deptno = d.deptno; Legacy statement SELECT staff_id, d_name FROM staff s JOIN department d ON s.deptno = d.deptno; INNER JOIN department d

Cross Join SELECT staff_id, d_name FROM staff s, deptartment d; SELECT staff_id, d_name FROM staff s CROSS JOIN deptartment d;

LEFT OUTER JOIN SELECT staff_id, d_name FROM staff s LEFT OUTER JOIN department d ON s.deptno = d.deptno; All values in left table (staff) even if no matches in dept SELECT staff_id, d_name FROM staff s, department d where s.deptno *= d.deptno;

LEFT OUTER JOIN staff_ids.deptnod.deptnod_name 19622LIGHT NULL

RIGHT OUTER JOIN SELECT staff_id, d_name FROM staff s RIGHT OUTER JOIN department d ON s.deptno = d.deptno; All values in right table (dept) even if no matches in staff SELECT staff_id, d_name FROM staff s, department d where s.deptno =* d.deptno;

RIGHT OUTER JOIN staff_ids.deptnod.deptnod_name LIGHT.... NULL 4 VISION

FULL OUTER JOIN SELECT staff_id, d_name FROM staff s FULL OUTER JOIN department d ON s.deptno = d.deptno; All values in left table (emp) and all values in right table (dept)

FULL OUTER JOIN staff_ide.deptnod.deptnod_name 19622Light.... NULL 4Vision 566NULL

Dealing with Nulls Null is not the same as zero or space Processing columns that may contain nulls – may require outer joins – may return no results Calculation involving null always returns a null value. Use the function IsNull to convert

replacement value

Summary MS SQL Server Architecture Databases and Database Objects Database File Storage Database Security Using MS SQL Server Transact SQL Extensions –Top n –Joins –isnull