Chapter 46. Using Identifiers and Keys in Data

As mentioned in multiple previous chapters, databases are designed as powerful, performant, and secure locations to store and work with data. Two concepts at the heart of most databases you will use in your organization are keys and identifiers (IDs). Databases that utilize these concepts are known as relational databases, because keys and ID fields create relationships between the various data tables. In this chapter, we will look at ID fields, how they can be used as keys between tables, and how to create them in Prep Builder.

What Is an Identifier?

As in most computing software, numbers in databases are processed more efficiently than other characters. When working with data, you’ll often need to process large volumes of data, so any method you can use to make processing more efficient can make a significant difference in the time it takes to prepare your data or conduct your analysis. This is where identifier fields come into play for databases. Rather than repeatedly storing names, addresses, or other long string values, a relational database architect will use separate look-up tables to store those values just once and associate an ID to the value. This purchases table shown in Figure 46-1 has a number of ID fields that we can use to link together other reference tables with the names of customers or products. Tables containing lists of transactions or similar metrics are often referred to as fact tables.

Figure 46-1. The ...

Get Tableau Prep: Up & Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.