What is the name of a field in a table that relates to the identifier in another table?

A database is a structure that organizes and stores data electronically. The data is stored using a database management system (DBMS) such as Microsoft Access, MySQL or Microsoft SQL Server. Data is organized into rows, columns, and tables, so that it can be easily accessed, managed and updated.

Tables

A table is a set of data represented by columns and rows. A column is referred to as a field and a row is a combination of column values and is referred to as a record. Tables contain a unique set of characteristics and they store data of the same type in each row.

Data Fields

A data field which is one piece of information you track in your database. Each data field in the table can define the characteristics of its data as a string value, numeric value, date and/or time values.

Relationships

A relational database contains tables that relate to another table by using a relationship. The tables are connected by a common field. The relationships are defined as:

  • One to Many: this is the most common type of a table relationship. For every record in Table A, there are multiple records in Table B. 

Example: There is a one to many relationship between the Customers table and Orders table. A customer may have many orders in the Order table.

  • Many to Many: For every record in Table A, there are multiple records in Table B, and vice versa. In this case, a third table called a Join Table is created to which will contain only unique values

Example: Many to Many relationship between Orders and Products with the table ProductsOrders functioning as the Join Table. The table ProductsOrders holds all the details about each order and what products it contains. Its primary key is a combination of the primary key of the Orders and Products table.

  • One to One – the rarest type of a table relationship. It is used for security and organization to avoid empty fields that only apply to some records in a table.

Keys

Key fields are used to build the relationships between data in different tables.

  • Primary Key: Usually auto-numbered, unique ID for internal tracking and for matching records between related tables. Each value is unique to the table and cannot be null.
  • Foreign Key: A field in a related table pointing back to the Primary Key in another table. For auto-numbered fields it is defined as a number value.

Notes on Primary Keys

  • The Primary key should always be the first field in each table, followed by any foreign key(s).
  • There is only one Primary Key per table.
  • Primary keys should never be actual data – not even something unique like a Social Security number or Student ID. These values are obtained from an outside source and, while they seem unique and reliable, they could produce data entry errors.

  • Field names
  • Using domains to control field values
  • Using subtypes

Fields are the components that provide structure for a table. You can't have a table without fields. For instance, you can create an empty table that has fields defined but no rows (records).

In databases, fields are used to maintain relationships between tables. This is done by creating matching fields in two or more tables. For example, if you stored a table named toy_store in a database and you also stored a staff table to track the employees in each store, you would create a common field between the two tables that would be populated with, for instance, a store identifier. The store ID value for a specific toy store would be the same in both tables.

Below, a STORE_ID field has been added to the toy_store table:

What is the name of a field in a table that relates to the identifier in another table?
The toy store table with the STORE_ID field is shown.

The toy_store table is linked to an employee table by the store ID. The table below shows three employees of The Play House:

What is the name of a field in a table that relates to the identifier in another table?
The employee table is linked to the toy store table by the STORE_ID field.

Certain fields are also used to maintain relationships between tables and their attribute indexes.

Fields in a table store the same category of data in the same data type. For example, if you have a name field in a table of customers, the entries for this field are all customer names and are stored as text. You wouldn't mix the entries, that is, you wouldn't put a customer name in this field for one record and a product name in the same field for another record.

When you create a table or add fields to an existing table, you define the data type used to store the data in each field. In some cases, you also specify the length of the field.

Field names

Field names are the names you give to the columns in a table. The names should indicate what data is contained in each column. For example, when you create a feature class in ArcCatalog, the table is prepopulated with an Object ID field and a shape field. The Object ID field contains the unique ID number for each object in the feature class. The shape field defines the type of shape stored in the feature class: point, line, polygon, multipoint, or multipatch.

You can also use set phrases to indicate the type of column. For example, if you create a separate unique ID on a table that you will use for indexing purposes, you might name the field ID_UK, with UK indicating this is a unique key.

Field names in the same table must be unique; for instance, you can't have two columns with the name ObjectID. Field names must also start with a letter and cannot contain spaces or reserved words. See File geodatabase size and name limits or Database data and ArcGIS for more information about database specific limitations.

Certain field names appear in ArcGIS with their fully qualified names for tables stored in an enterprise geodatabase. For example, if you create or import a polygon feature class that contains a field named Area, the database, schema, and table name are appended to it. This is the name you see in the attribute table of the feature class. That means for a polygon feature class named archsites, stored in the prof schema of the museum database, the Area field would be MUSEUM.PROF.ARCHSITES.AREA.

The following list contains all the field names that are fully qualified in an enterprise geodatabase:

  • FID
  • AREA
  • LEN
  • POINTS
  • NUMOFPTS
  • ENTITY
  • EMINX
  • EMINY
  • EMAXX
  • EMAXY
  • EMINZ
  • EMAXZ
  • MIN_MEASURE
  • MAX_MEASURE

For cases such as this, you might consider using a different field name or a field alias.

Renaming fields

You can rename fields in a table or feature class on the Fields tab on the Properties dialog box. Fields in a geodatabase from the ArcGIS 10 release and later support renaming, and fields in database tables can be renamed.

To rename a field, right-click the feature class or table in the Catalog tree and click Properties. Click the Fields tab to see a list of fields in that table or feature class. Click the text of the field you want to rename and type a new name. Click OK to apply your changes and close the Properties dialog box.

The following fields cannot be renamed:

  • ObjectID and globalID fields
  • Any shape-related field; Shape, shape length, shape area
  • The enabled, ancillary role or network weight fields of a network feature class
  • Representation fields
  • Fields in a feature class participating in a network dataset, terrain, or parcel fabric
  • Fields used for editor tracking
  • Relationship class primary key and foreign key fields
  • The subtype field
  • Raster fields

Field name rules and limitations

The following table lists the supported field name character rules:

CharacterStart of nameOther positionIn alias

Letters (A–Z)

What is the name of a field in a table that relates to the identifier in another table?
What is the name of a field in a table that relates to the identifier in another table?
What is the name of a field in a table that relates to the identifier in another table?

Underscore ( _ )

What is the name of a field in a table that relates to the identifier in another table?
What is the name of a field in a table that relates to the identifier in another table?

Digits (0–9)

What is the name of a field in a table that relates to the identifier in another table?
What is the name of a field in a table that relates to the identifier in another table?

Spaces

What is the name of a field in a table that relates to the identifier in another table?

Symbols (other than underscore)

What is the name of a field in a table that relates to the identifier in another table?

Superscript letters and digits

What is the name of a field in a table that relates to the identifier in another table?

Subscript letters and digits

What is the name of a field in a table that relates to the identifier in another table?

Additional field name rules and limitations are as follows:

  • Field names cannot contain reserved words, such as all or result.

    Consult your database management system (DBMS) documentation for additional reserved words.

  • The length of field (column) names depends on the underlying database.

    See File geodatabase size and name limits or Database data and ArcGIS for more information about database-specific limitations.

Field aliases

Field aliases allow you to assign an alternate name for a field. You typically use field names that are as short as possible to convey what data is stored in that field. You also cannot use spaces or special characters in the field name, and as shown above, certain fields appear in the table with their fully qualified names. In these cases, you can use a field alias to give the field a more descriptive name. For example, if you have a field named ST_SUFX that stores the type of street, which is indicated by the suffix used on the street name, you can give this field an alias of Street name suffix.

Learn how to set a field alias

Using domains to control field values

Attribute domains are rules that indicate valid values for a field in a table in a geodatabase. They enforce data integrity by restricting the data values a user can add to a specific field.

You can apply attribute domains to fields only if there was a definable set or range of specific values possible for that field. For example, a field that stores the answer to the survey question What is your favorite food? is difficult to apply a domain to, since there are a large number of responses that can be given. However, a field storing data on eye color can have an attribute domain assigned to it, because there are only a few possible valid values.

  • Black
  • Brown
  • Blue
  • Green
  • Hazel
  • Gray
  • Violet

Using an attribute domain for a field storing eye color data would ensure consistency of the values. If data collectors were allowed to type any color into a text field for eye color, you might end up with any of the following for blue eyes:

  • Azure
  • Navy
  • Sky blue
  • Cobalt
  • Aquamarine

Attribute domains also prevent misspellings or typographical errors. Even if data collectors knew to only use the term blue for blue eyes, they might misspell the word (bleu) or mistakenly strike the wrong key when typing the word (vlue) in a text field.

Types of attribute domains

There are two types of attribute domains you can use to restrict field values: coded value domain and range domain.

A coded value domain uses codes to define a set of allowed values for a field that stores discrete data.

You can use a coded value domain for any data type. For the eye color field, you could create a coded domain using one of the following example code sets:

  • Example 1
    • Blk = Black
    • Brn = Brown
    • Blu = Blue
    • Grn = Green
    • Hzl = Hazel
    • Gra = Gray
    • Vlt = Violet
  • Example 2
    • 1 = Black
    • 2 = Brown
    • 3 = Blue
    • 4 = Green
    • 5 = Hazel
    • 6 = Gray
    • 7 = Violet

A range domain defines a range of allowed numeric values for a field.

The field must be a numeric or date data type to use a range domain. For example, you can apply a range domain to a field that stores data on birth weights for single live births of western lowland gorillas in zoos. The range can run from the lowest weight (1 kg) to the highest (2.5 kg).

For additional information on attribute domains, see A quick tour of attribute domains.

To learn how to create an attribute domain, see Creating a new attribute range domain and Creating a new coded value domain.

Using subtypes

Subtypes are classifications in a feature class or table in a geodatabase. They allow you to logically group features based on a unique characteristic or behavior of the data. This characteristic or behavior is represented by the values of one field in the table. For example, for a table of hydrology, you can have subtypes for types of waterways, such as creeks, streams, channels, canals, and rivers. For each of these subtypes, you can apply different topology rules, connectivity rules, default values, and relationship rules.

Using subtypes to store groups of related features can improve query performance. If you stored the different types of data in separate feature classes instead of using subtypes, you have a greater number of feature classes in the database, and it can take longer to search.

The following rules apply when using subtypes:

  • Only one field in a table or feature class can have subtypes applied to it.
  • The field on which you base the subtype must be a long or short integer field.
  • You can apply different topology and relationship rules to different subtypes.
  • You can apply different attributes or coded domains to other fields in the table based on subtypes.

Complete the following steps to apply subtypes:

  1. Ensure that the field to which the subtype will be applied is a short or long integer field. If it is not, add a short or long integer field to the table or feature class. In most cases, short integer should suffice. However, if there is any possibility your subtype values will exceed 32,767, use a long integer field.

    For example, for a feature class of rivers, you can add a short integer field named Watershed to create subtypes based on the watershed to which the river contributes.

  2. On the Subtypes tab of the Properties dialog box for the table or feature class, specify the subtype field by choosing it from the first drop-down list.

    For the rivers example, choose the Watershed field from the Subtype Field list.

    A new subtype is automatically added to the Subtypes table. This default subtype has a code of 0 and a description of New Subtype.

  3. Double-click in each of these fields and type the subtype code and description.

    For example, change the first code to 1 and the description to the name of the first watershed.

  4. Optionally continue adding subtype codes and descriptions to the Subtypes table.

    In the field below code 1, you could add a code 2 with a corresponding watershed name in the Description field, and below that, add a code 3 with a corresponding watershed name, and so on, until you have created codes and descriptions for all the watersheds represented in your rivers feature class.

  5. To specify different default values or domains per subtype, click a subtype in the Subtypes list. In the Default Values and Domains list, optionally type a default value for any of the fields in the list. To apply a coded or attribute domain to fields in the list, click in the Domain field and choose a domain from the drop-down list. If no domains exist, create one by clicking the Domains button at the bottom of the Properties dialog box, which takes you to the Workspace Domains dialog box.

    The default values and domains you specify apply only to the subtype you chose from the Subtypes list. If you click another subtype in the Subtypes list, the default values and domains are either empty (if you haven't specified default values and domains for this subtype) or contain different values.

Learn more about subtypes

  • Defining tables
  • File geodatabase size and name limits
  • Enterprise geodatabase size and name limits

What is the name for a field used to relate tables in a database?

A primary key is used to relate a table to foreign keys in other tables.)

What are the field names in the table?

Field names are the names you give to the columns in a table. The names should give an indication of what data is contained in that particular column. For example, when you create a new feature class in ArcCatalog, the table is already populated with an ObjectID field and a shape field.

What is the name of the field that serves as a unique identifier of records within an Access table?

A primary key is a field or set of fields with values that are unique throughout a table. Values of the key can be used to refer to entire records, because each record has a different value for the key. Each table can only have one primary key.

What is the name of an identifier that is placed into another table to create a relationship between the two tables?

Foreign Keys A foreign key column in a table points to a column with unique values in another table (often the primary key column) to create a way of cross-referencing the two tables.