Module 8: Querying Full-Text Indexes. Overview Introduction to Microsoft Search Service Microsoft Search Service Components Getting Information About.

Slides:



Advertisements
Similar presentations
Denny Cherry Manager of Information Systems MVP, MCSA, MCDBA, MCTS, MCITP.
Advertisements

Database management system (DBMS)  a DBMS allows users and other software to store and retrieve data in a structured way  controls the organization,
Module 6: Working with Subqueries. Overview Introduction to Subqueries Using a Subquery as a Derived Table Using a Subquery as an Expression Using a Subquery.
Project Management Database and SQL Server Katmai New Features Qingsong Yao
Working with SQL Server Database Objects
Module 4: Creating Data Types and Tables. Overview Creating Data Types Creating Tables Generating Column Values Generating Scripts.
Module 10: Implementing User-defined Functions. Overview What Is a User-defined Function? Defining Examples.
Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Designing and Implementing Databases with Microsoft SQL Server 2000 Enterprise Edition MCP Exam
Chapter 3 An Introduction to Relational Databases.
Indexes Rose-Hulman Institute of Technology Curt Clifton.
Introduction to Full-Text Searching in SQL Server 2012 Adolfo J. Socorro, Ph.D. IT Impact, Inc.
Databases Tutorial 2 Further Select Statements. Objectives for Week Data types Sort retrieved data Formatting output.
Denny Cherry twitter.com/mrdenny.
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.
SQL Basics. SQL SQL (Structured Query Language) is a special-purpose programming language designed from managing data in relational database management.
Searching Binary Data in SQL Server 2012 Steve Jones SQLServerCentral.com.
Using XML in SQL Server 2005 NameTitleCompany. XML Overview Business Opportunity The majority of all data transmitted electronically between organizations.
Module 8 Improving Performance through Nonclustered Indexes.
XML in SQL Server Overview XML is a key part of any modern data environment It can be used to transmit data in a platform, application neutral form.
Module 20 Working with Full-Text Indexes and Queries.
Data-mining & Data As we used Excel that has capability to analyze data to find important information, the data-mining helps us to extract information.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Company LOGO 1 Database Creation and Maintenance Jorge G. Martinez.
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.
Module 9: Introduction to Programming Objects. Overview Displaying the Text of a Programming Object Introduction to Views Advantages of Views Creating.
Best Practices Transact-SQL Cont....  Combining Data from Multiple Tables Introduction to Joins Using Inner Joins Using Outer Joins Using Cross Joins.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
ISM 4212 Lab Creating DB Tables 02 copyright Lars Paul Linden 2007.
Module 3 Designing a Physical Database Model. Module Overview Selecting Data Types Designing Database Tables Designing Data Integrity.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
PL/SQL vs. Transact-SQL. Transact-SQL Central to the use of Microsoft® SQL Server™. All applications that communicate with SQL Server do so by sending.
Table Indexing for the.NET Developer Denny Cherry twitter.com/mrdenny.
Chapter 5: Part 1: DDL STRUCTURED QUERY LANGUAGE (SQL)
Course 2071B: Querying Microsoft ® SQL Server ™ 2000 with Transact-SQL.
Using Microsoft Access 56:150 Information System Design.
Module 3: Creating Data Types and Tables. Overview Working with Data Types Working with Tables Generating Column Values Generating Scripts.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Unit 4 Queries and Joins. Key Concepts Using the SELECT statement Statement clauses Subqueries Multiple table statements Using table pseudonyms Inner.
Full Text Search. Some Info  An optional component  Much faster and complex than the previous version  Allow you to search for words and tokens in.
Module 4 Designing and Implementing Views. Module Overview Introduction to Views Creating and Managing Views Performance Considerations for Views.
Denny Cherry twitter.com/mrdenny.
Indexes / Session 2/ 1 of 36 Session 2 Module 3: Types of Indexes Module 4: Maintaining Indexes.
SQL Server 2005 Implementation and Maintenance Chapter 3: Tables and Views.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
22nd International Unicode Conference San Jose, CA September Going Global With SQL Server 2000 Beverly Sherry Program Manager Global Release Services.
SQL SERVER DAYS 2011 Table Indexing for the.NET Developer Denny Cherry twitter.com/mrdenny.
Session 1 Module 1: Introduction to Data Integrity
Module 2: Querying and Filtering Data. Using the SELECT Statement Filtering Data Working with NULL Values Formatting Result Sets Performance Considerations.
Analyzing Text with SQL Server 2014, R, AND Azure ML Dejan Sarka.
Module 6: Creating and Maintaining Indexes. Overview Creating Indexes Understanding Index Creation Options Maintaining Indexes Introducing Statistics.
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
Module 9: Implementing User-Defined Functions. Overview Introducing User-Defined Functions Implementing User-Defined Functions.
Module 5: Joining Multiple Tables. Overview Using Aliases for Table Names Combining Data from Multiple Tables Combining Multiple Result Sets.
Microsoft SQL Server 7.0 Full-Text Search What is full-text search and how do I troubleshoot it? John Kane, MCSE PSS SQL Server Support Microsoft Corporation.
Module 1: SQL Server Overview
Adam Koehler Index Speed Demons - How To Turbo-Charge Your Text Based Queries Using Full-Text Indexing.
Module 8: Querying Full-Text Indexes
Lesson 7 Managing Data Creating a database with Web Matrix.
Module 4: Creating and Tuning Indexes
Structured Query Language – The Basics
What is that service I never turn on?
David M. Kroenke and David J
STRUCTURED QUERY LANGUAGE
Table Indexing for the .NET Developer
Introduction To Structured Query Language (SQL)
C1. SQL BAsic.
Introduction To Structured Query Language (SQL)
SQL Server Indexing for the Client Developer
Presentation transcript:

Module 8: Querying Full-Text Indexes

Overview Introduction to Microsoft Search Service Microsoft Search Service Components Getting Information About Full-Text Indexes Writing Full-Text Queries

Introduction to Microsoft Search Service Provides Text-based Searches in SQL Server Complex searches on unstructured text data for words and phrases More powerful than LIKE operator and wildcards Available in Other Microsoft Products Indexing Service, Exchange 2000, Commerce Server

Microsoft Search Service Components Search Service Structures Full-text index Keeps track of significant words used in a table Requires unique key column or primary key Full-text catalog Is a collection of full-text indexes Microsoft Search Service Functions Indexing Querying

Getting Information About Full-Text Indexes Using System Stored Procedures sp_help_fulltext_catalogs sp_help_fulltext_tables sp_help_fulltext_columns Using Transact-SQL Functions Use Transact-SQL functions to obtain information about full-text properties USE northwind SELECT DATABASEPROPERTY('Northwind','IsFullTextEnabled') GO USE northwind SELECT DATABASEPROPERTY('Northwind','IsFullTextEnabled') GO

 Writing Full-Text Queries CONTAINS Predicate FREETEXT Predicate CONTAINSTABLE and FREETEXTTABLE Functions Using Full-Text Keywords

CONTAINS Predicate Inflectional Form of a Specific Word Word or Phrase Beginning with Specific Text Word or Phrase near Another Word or Phrase One or More Specific Words and Phrases Words or Phrases with Weighted Values SELECT plant_id, common_name, price FROM plants WHERE CONTAINS( *, ' "English Thyme" ' ) GO SELECT plant_id, common_name, price FROM plants WHERE CONTAINS( *, ' "English Thyme" ' ) GO Example 1

FREETEXT Predicate Searches on Words, Phrases, and Sentences Extracted from Initial Query Less Precise Than the CONTAINS Predicate SELECT * FROM news_table WHERE FREETEXT( description, '"The Fulton County Grand Jury said Friday an investigation of Atlanta‘s recent primary election produced no evidence that any irregularities took place."') GO SELECT * FROM news_table WHERE FREETEXT( description, '"The Fulton County Grand Jury said Friday an investigation of Atlanta‘s recent primary election produced no evidence that any irregularities took place."') GO

CONTAINSTABLE and FREETEXTTABLE Functions Using CONTAINSTABLE and FREETEXTTABLE Return a table Return column that contains full-text key values top_n_by_rank argument Choosing Which Search Condition or Function to Use Use the CONTAINS and FREETEXT predicates in any search condition Use the CONTAINSTABLE and FREETEXTTABLE functions in the FROM clause

Using Full-Text Keywords USE pubs SELECT T.title, P.pub_name FROM publishers AS P INNER JOIN titles AS T ON P.pub_id = I.pub_id WHERE P.pub_id = (SELECT pub_id FROM pub_info WHERE CONTAINS (pr_info, ' moonbeam AND ontario AND "flying saucer" ')) GO USE pubs SELECT T.title, P.pub_name FROM publishers AS P INNER JOIN titles AS T ON P.pub_id = I.pub_id WHERE P.pub_id = (SELECT pub_id FROM pub_info WHERE CONTAINS (pr_info, ' moonbeam AND ontario AND "flying saucer" ')) GO USE northwind SELECT Description FROM Categories WHERE CategoryName <> 'Seafood‘ AND CONTAINS(Description, ' sauces AND seasonings ') GO USE northwind SELECT Description FROM Categories WHERE CategoryName <> 'Seafood‘ AND CONTAINS(Description, ' sauces AND seasonings ') GO CONTAINS and FREETEXT Predicates CONTAINS Within a Subquery

Use Full-Text Indexes on CHAR, NCHAR, VARCHAR, NVARCHAR, TEXT, NTEXT and IMAGE Data Types Use Full-Text Indexes on CHAR, NCHAR, VARCHAR, NVARCHAR, TEXT, NTEXT and IMAGE Data Types Use the Full-Text Index and Catalog Properties for Troubleshooting Use the top_n_by_rank Argument to Restrict Result Set Size Recommended Practices

Lab A: Querying Full-Text Indexes

Review Introduction to Microsoft Search Service Microsoft Search Service Components Getting Information About Full-Text Indexes Writing Full-Text Queries