Metadata Metadata is information about data or other information.

Slides:



Advertisements
Similar presentations
Chapter 4 Joining Multiple Tables
Advertisements

Creating Tables. 2 home back first prev next last What Will I Learn? List and provide an example of each of the number, character, and date data types.
Basic SQL Introduction Presented by: Madhuri Bhogadi.
Structure Query Language (SQL) COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Chapter 8 Special-Purpose Languages. SQL SQL stands for "Structured Query Language". Allows the user to pose complex questions of a database. It also.
Introduction to Structured Query Language (SQL)
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
View and Materialized view. What is a view? Logically represents subset of data from one or more table. In sql, a view is a virtual relation based on.
Introduction to Structured Query Language (SQL)
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Module 3: Changes to Transact-SQL. Overview Accessing Object Information New Transact-SQL Syntax Changes to Objects Distributed Queries.
Database Lecture # 1 By Ubaid Ullah.
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.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
Learningcomputer.com SQL Server 2008 – Introduction to Transact SQL.
Functions Lesson 10. Skills Matrix Function A function is a piece of code or routine that accepts parameters and stored as an object in SQL Server. The.
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
DATA MANIPULATION andCONTROL
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
08 | Retrieving SQL Server Metadata and Improving Query Performance Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft.
Chapter 4Introduction to Oracle9i: SQL1 Chapter 4 Joining Multiple Tables.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
SQL Unit – 2 Base Knowledge Presented By Mr. R.Aravindhan.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
CHAPTER 9 Views, Synonyms, and Sequences. Views are used extensively in reporting applications and also to present subsets of data to applications. Synonyms.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Visual Programing SQL Overview Section 1.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Database Basics BCIS 3680 Enterprise Programming.
Working with SQL Server Database Objects Faculty: Nguyen Ngoc Tu.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
SQL.. AN OVERVIEW lecture3 1. Overview of SQL 2  Query: allow questions to be asked of the data and display only the information required. It can include.
INFANL01-3 ANALYSE 3 WEEK 3 March 2015 Institute voor Communication, Media en Informatietechnology.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
SQL Server 2012 Session: 1 Session: 12 Triggers Data Management Using Microsoft SQL Server.
Stored Procedures / Session 4/ 1 of 41 Session 4 Module 7: Introducing stored procedures Module 8: More about stored procedures.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
Advanced Database & Client Server Introduction to MS SQL Server 2000 and Transact SQL -
Views / Session 3/ 1 of 40 Session 3 Module 5: Implementing Views Module 6: Managing Views.
COM621: Advanced Interactive Web Development Lecture 11 MySQL – Data Manipulation Language.
SQL Introduction SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English.
SQL Environment.
Query Methods Where Clauses Start ….
© 2016, Mike Murach & Associates, Inc.
Database Systems: Design, Implementation, and Management Tenth Edition
CSCI 2141 – Intro to Database Systems
Managing Objects with Data Dictionary Views
Chapter 4 Indexes.
CH 4 Indexes.
Managing Objects with Data Dictionary Views
Introduction To Structured Query Language (SQL)
Database systems Lecture 3 – SQL + CRUD
INTRODUCING DATABASES
CH 4 Indexes.
HAVING,INDEX,COMMIT & ROLLBACK
SQL .. An overview lecture3.
Chapter 7 Using SQL in Applications
Access/SQL Server Eliminate Duplicates with SELECT DISTINCT
Introduction To Structured Query Language (SQL)
Chapter 7 Using SQL in Applications
Database Management System
Database Systems: Design, Implementation, and Management Tenth Edition
Objectives In this lesson, you will learn to:
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
Using MySQL Meta Data Effectively
Presentation transcript:

Metadata Metadata is information about data or other information.

Data Dictionary A Data dictionary may cover the whole organisation, a part of the organisation or a database. In its simplest form, the data dictionary is a collection of data object definitions More advanced data dictionary contains database schemas and entity-relationship models

SQL Server metadata Microsoft® SQL Server™ provides two methods for obtaining metadata: Using system stored procedures Examining information schema views. These views provide an internal, system table-independent view of the SQL Server metadata.

Information schema views allow applications to work properly even though significant changes have been made to the system tables. The information schema views included in SQL Server conform to the SQL-92 Standard definition for the INFORMATION_SCHEMA.

System Stored Procedures sp_tables Returns a list of objects that can be queried in the current environment (any object that can appear in a FROM clause). e.g. EXEC sp_tables Syntax sp_tables =] 'name'] =] 'owner'] =] 'qualifier'] =] "type"]

e.g. EXEC sp_tables customer, u878776, Company, “’TABLE'" Returns information about the customer table owned by u in the Company database type could be TABLE, SYSTEM TABLE, and VIEW

Result Set Column nameDescription TABLE_QUALIFIERdatabase name TABLE_OWNERTable owner name TABLE_NAMETable name. TABLE_TYPETable, system table, or view. REMARKS Detail of the numerous stored procedures can be found in the Transact*SQL Help system

sp_columns This example returns column information for a specified table. EXEC = 'customers' Syntax sp_columns =] object =] owner] =] qualifier] =] column] =] ODBCVer]

INFORMATION_SCHEMA These views are defined in a special schema named INFORMATION_SCHEMA, which is contained in each database. Each INFORMATION_SCHEMA view contains metadata for all data objects stored in that particular database. ·CHECK_CONSTRAINTS ·COLUMN_DOMAIN_USAGE ·COLUMN_PRIVILEGES ·COLUMNS ·CONSTRAINT_COLUMN_USAGE ·CONSTRAINT_TABLE_USAGE ·DOMAIN_CONSTRAINTS ·DOMAINS ·KEY_COLUMN_USAGE ·REFERENTIAL_CONSTRAINTS ·SCHEMATA ·TABLE_CONSTRAINTS ·TABLE_PRIVILEGES ·TABLES ·VIEW_COLUMN_USAGE ·VIEW_TABLE_USAGE ·VIEWS

INFORMATION_SCHEMA.TABLES Contains one row for each table in the current database for which the current user has permissions. To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA view_name. e.g. Select * from information_schema.tables; Column nameDescription TABLE_CATALOG Table qualifier. TABLE_SCHEMA Table owner. TABLE_NAME Table name. TABLE_TYPE Type of table. Can be VIEW or BASE TABLE.

INFORMATION_SCHEMA.VIEWS Contains one row for views accessible to the current user in the current database.. Column nameDescription TABLE_CATALOG View qualifier. TABLE_SCHEMA View owner. TABLE_NAMEView name. VIEW_DEFINITION view definition text. CHECK_OPTIONType of WITH CHECK OPTION. IS_UPDATABLE whether the view is updatable.