Skip to Content
Fuzzy Data Matching with SQL
book

Fuzzy Data Matching with SQL

by Jim Lehmer
October 2023
Intermediate to advanced
282 pages
6h 32m
English
O'Reilly Media, Inc.
Content preview from Fuzzy Data Matching with SQL

Appendix. The Data “Model”

I put “model” in quotes because it is so simple I am almost embarrassed. Almost. But I dislike those tech books that build some huge, fake application that you have to understand as well as the subject itself, so I chose to go simple to keep the actual topic in the forefront:

Customer Table

Customer is the main “production” table in our crm system (see Table A-1):

SELECT TOP 10 * FROM crm.Customer;

NormalizedCustomer View

This view implements some of the data normalization techniques used in the book (see Table A-2):

SELECT TOP 10 * FROM crm.NormalizedCustomer;

PotentialMatches Table

This is an “import” table that is used in various examples to attempt to match against the CRM data (see Table A-3):

SELECT TOP 10 * FROM dbo.PotentialMatches;
Table A-1. Customer
  id first​_name last​_name company​_name address city county state zip country phone1 phone2 email web​_address
0 1 NULL NULL Acme Corp 123 Snell Ave Jefferson City Cole MO 65101 U.S.A. NULL 573-555-3256 NULL www​.acme​.test
1 2 NULL NULL Foo, Inc. 457 Prairie View St Boulder Boulder CO 80301 US NULL 303-555-5623 NULL www​.foo​.test
2 3 NULL NULL Snedley & Sons, L.L.C. 443 Arroyo Rd Raton Colfax NM 87740 U.S. NULL 575-555-0956 NULL www​.snedley​.test
3 4 Johnetta Abdallah NULL 1088 Pinehurst St Chapel Hill Orange NC 27514 United States 919-555-9345 919-555-3791 johnetta​_abdallah​@example​.com NULL
4 5 Geoffrey Acey NULL 7 West Ave #1 Palatine Cook IL 60067 USA 847-555-1734 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

SQL for Data Analysis

SQL for Data Analysis

Cathy Tanimura

Publisher Resources

ISBN: 9781098152260Errata Page