Data Modeling - Attribute
Table of Contents
1 - About
The values for each attribute are defined in terms of properties.
Attribute and column are relative to structured data (generally a column) whereas variable or field doesn't refers to any data structure.
Dimension tables have many columns or attributes. These attribute describe the rows in the dimension table. Dimension table attributes serve as the primary source of query constraints, grouping and reporting labels.
In a query or a report request, attributes are identified as the “by” words. For example, when a user states that he or she wants to see dollar sales by week by brand, week and brand must be available as dimension attributes.
The best attributes are textual and discrete. Attributes should consist of real words rather than cryptic abbreviations.
2 - Articles Related
3 - Example
Typical attributes for a product dimension :
- short description (10 to 15 characters)
- long description (30 to 50 characters)
- a brand name
- a category name
- packaging type
- size (It's a number but it behaves more like a textual descriptor, Size is a discrete and constant descriptor of a specific product)
- square footage in store dimension. One might be tempted to place it in the fact table. However, it's clearly a constant attribute of a store and is used as report constraint.
- numerous other product characteristic.
4 - Properties
Each attribute are defined in terms of properties (metadata attributes):
- Attribute Source Category: Basic, Derived, Designed
- Data type (what class of data can be stored in that attribute)
- Length and/or precision
- Domain: enumeration, range of permitted, legal values / Format patterns (what values an attribute can legitimately take on)
- Default value or algorithm (what default value are recorded if not specified by the user)
- Optionality: Mandatory or optional
5 - Attribute Source Categories
5.1 - Basic
An Attribute Value that cannot be deduced or calculated. Examples:
- Student name
5.2 - Derived / calculated
5.3 - Designed
The Attribute is created to overcome the system constraints. The value of a Designed Attribute does not change. Attribute does not change.
- Student ID,
- Course number.