A Database Attribute Defines the Properties of a Table

A Database Attribute Defines the Properties of a Table

A Database Attribute Defines the Properties of a Table GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > Apps 105 105 people found this article helpful

A Database Attribute Defines the Properties of a Table

Think of an attribute as a characteristic

By Mike Chapple Mike Chapple Writer University of Idaho Auburn University Notre Dame Former Lifewire writer Mike Chapple is an IT professional with more than 10 years' experience cybersecurity and extensive knowledge of SQL and database management. lifewire's editorial guidelines Updated on June 3, 2021 Reviewed by Jessica Kormos Reviewed by Jessica Kormos Saint Mary-of-the-Woods College Jessica Kormos is a writer and editor with 15 years' experience writing articles, copy, and UX content for Tecca.com, Rosenfeld Media, and many others. lifewire's editorial guidelines Tweet Share Email Tweet Share Email

In This Article

Expand Jump to a Section Attributes Describe Entities Is an Attribute a Field Defining Attributes A database consists of tables, each of which has columns and rows. Each row (called a tuple) is a data set that applies to a single item, and each column contains characteristics that describe the rows. In database lingo, these columns are called attributes. A database attribute is a column name and the content of the fields under it in a table.

Attributes Describe Entities

If you sell products and enter them into a table with columns for ProductName, Price, and ProductID, each of those headings is an attribute. In each field under those headings, you'd enter the product names, prices, and product IDs, respectively. Each one of the field entries is also an attribute. This makes sense, given that the nontechnical definition of an attribute is that it describes a characteristic or quality of something. Here's an example of the often-cited Northwinds database. This database includes tables (also called entities by database designers) for Customers, Employees, and Products, among others. The Products table defines the characteristics of each product. These include a product ID, name, supplier ID (used as a foreign key), quantity, and price. Each of these characteristics is an attribute of the table (or entity) named Products. An attribute is a single piece of data in the tuple to which it belongs. Each tuple is a data set that applies to one item. The column names are the attributes of a product, and entries in the columns are also attributes of a product. Ready-made sample databases, like MySQL Sample Database from MySQL, are available for free download on the web. Working with one of these is a great way to learn how databases work. ​

Is an Attribute a Field

Sometimes, the terms "field" and "attribute" are used interchangeably, and for most purposes, they are the same. However, field describes a particular cell in a table found on any row, and attribute describes an entity characteristic in a design sense. In the table above, the ProductName in the second row is Chang. This is a field. When discussing products in general, ProductName is the product's column. This is the attribute.

Defining Attributes

Attributes are defined in terms of their domain. A domain defines the allowable values that an attribute can contain. This includes its data type, length, values, and other details. For example, the domain for an attribute ProductID might specify a numeric data type. The attribute can be further defined to require a specific length or specify whether an empty or unknown value is allowed. Want to know more about the essentials of databases? Our Databases for Beginners guide is a good place to start. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit More from Lifewire An Introduction to Databases for Beginners How to Use the Excel INDEX Function How to Insert a Table in Microsoft Word 2013 A Guide to Understanding Database Dependencies How to Highlight and Find Duplicates in Google Sheets How to Remove Duplicates in Google Sheets Full Functional Dependency in Database Normalization Definition of Database Relation Defining a Database Domain Entity-Relationship Diagram Definition What Is the Primary Key in a Database? Glossary of Common Database Terms How to Print Labels from Excel What Is the Definition of a Database Query? How to Sort Data in Excel The Basics of Database Normalization Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookies Settings Accept All Cookies
Share:
0 comments

Comments (0)

Leave a Comment

Minimum 10 characters required

* All fields are required. Comments are moderated before appearing.

No comments yet. Be the first to comment!