The Elements of a Database | Developer.com (2024)

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

What elements comprise a database? This article deals mainly with the objects that comprise a database. Several concepts are worthy of coverage within the scope of the database as it relates to database design. As you work with data and databases, you will see how the origination of business information and databases is formulated into database elements. The intent here is to provide a brief coverage of basic database elements to provide you with a basic understanding of the elements found in a database.

Learn more about Databases at TechRepublic Academy!

Several topics are discussed in the following sections. These topics include:

  • The database schema
  • Schema objects
  • Indexes
  • Tables
  • Fields and columns
  • Records and rows
  • Keys
  • Relationships
  • Data types

Database Schema

A schema is quite simply a group of related objects in a database. Within a schema, objects that are related have relationships to one another, as discussed earlier. There is one owner of a schema, who has access to manipulate the structure of any object in the schema. A schema does not represent a person, although the schema is associated with a user account that resides in the database.

The three models associated with a schema are as follows:

  • The conceptual model, also called the logical model, is the basic database model, which deals with organizational structures that are used to define database structures such as tables and constraints.
  • The internal model, also called the physical model, deals with the physical storage of the database, as well as access to the data, such as through data storage in tables and the use of indexes to expedite data access. The internal model separates the physical requirements of the hardware and the operating system from the data model.
  • The external model, or application interface, deals with methods through which users may access the schema, such as through the use of a data input form. The external model allows relationships to be created between the user application and the data model. Figure 1 depicts a schema in a relational database.

Figure 1 – Collection of objects that comprise a database schema.

The Elements of a Database | Developer.com (1)

NOTE

A schema object is an object that resides within a schema. The most typical object found in a database is a table. Other types of objects can reside in a schema, such as indexes, constraints, views, and procedures.

The table is the most fundamental element found in a database schema. Columns and rows are associated with tables. Tables, columns, and rows are discussed in the following subsections.

Table

A table is the primary unit of physical storage for data in a database. When a user accesses the database, a table is usually referenced for the desired data. Multiple tables might comprise a database, therefore a relationship might exist between tables. Because tables store data, a table requires physical storage on the host computer for the database.

Figure 2 illustrates tables in a schema. Each table in the figure is related to at least one other table. Some tables are related to multiple tables.

Figure 2 – Database tables and their relationships.

The Elements of a Database | Developer.com (2)

Four types of tables are commonly used:

  • Data tables store most of the data found in a database.
  • Join tables are tables used to create a relationship between two tables that would otherwise be unrelated.
  • Subset tables contain a subset of data from a data table.
  • Validation tables, often referred to as code tables, are used to validate data entered into other database tables.

Tables are used to store the data that the user needs to access. Tables might also have constraints attached to them, which control the data allowed to be entered into the table. An entity from the business model is eventually converted into a database table.

Columns

A column, or field, is a specific category of information that exists in a table. A column is to a table what an attribute is to an entity. In other words, when a business model is converted into a database model, entities become tables and attributes become columns. A column represents one related part of a table and is the smallest logical structure of storage in a database. Each column in a table is assigned a data type. The assigned data type determines what type of values that can populate a column. When visualizing a table, a column is a vertical structure in the table that contains values for every row of data associated with a particular column.

In Figure 3, columns within the Customers table are shown. Each column is a specific category of information. All of the data in a table associated with a field is called a column.

Figure 3 – Columns in a database table.

The Elements of a Database | Developer.com (3)

Rows

A row of data is the collection of all the columns in a table associated with a single occurrence. Simply speaking, a row of data is a single record in a table. For example, if there are 25,000 book titles with which a bookstore deals, there will be 25,000 records, or rows of data, in the book titles table once the table is populated. The number of rows within the table will obviously change as books’ titles are added and removed. See Figure 4 for an illustration of a row of data in a table.

Figure 4 – Row of data in a database table.

The Elements of a Database | Developer.com (4)

Data Types

A data type determines the type of data that can be stored in a database column.

Although many data types are available, three of the most commonly used data types are

  • Alphanumeric
  • Numeric
  • Date and time

Alphanumeric data types are used to store characters, numbers, special characters, or nearly any combination. If a numeric value is stored in an alphanumeric field, the value is treated as a character, not a number. In other words, you should not attempt to perform arithmetic functions on numeric values stored in alphanumeric fields. Design techniques such as this will be discussed in more detail throughout the book. Numeric data types are used to store only numeric values. Date and time data types are used to store date and time values, which widely vary depending on the relational database management system (RDBMS) being used.

Keys

The integrity of the information stored in a database is controlled by keys. A key is a column value in a table that is used to either uniquely identify a row of data in a table, or establish a relationship with another table. A key is normally correlated with one column in table, although it might be associated with multiple columns. There are two types of keys: primary and foreign.

Primary Keys

A primary key is the combination of one or more column values in a table that make a row of data unique within the table. Primary keys are typically used to join related tables. Even if a table has no child table, a primary key can be used to disallow the entry of duplicate records into a table. For example, an employee’s social security number is sometimes considered a primary key candidate because all SSNs are unique.

Foreign Keys

A foreign key is the combination of one or more column values in a table that reference a primary key in another table. Foreign keys are defined in child tables. A foreign key ensures that a parent record has been created before a child record. Conversely, a foreign key also ensures that the child record is deleted before the parent record.

Figure 5 illustrates how a foreign key constraint is related to a primary key constraint. The Auth_id column in the Booklist table references the Auth_id in the Authors table. Authors is the parent table and Booklist is the child table. If a record for Auth_id=3 needs to be created, the record must be inserted into the Authors table first. If an author needs to be removed from the database, all references to the author must first be deleted in Booklist, the child table.

Figure 5 – Referential integrity, or parent/child relationships.

The Elements of a Database | Developer.com (5)

Relationships

Most databases are divided into many tables, most of which are related to one another. In most modern databases, such as the relational database, relationships are established through the use of primary and foreign keys. The purpose of separating data into tables and establishing table relationships is to reduce data redundancy. The process of reducing data redundancy in a relational database is called normalization and is discussed in detail in Chapter 8 Of our book, Database Design.

Three types of table relationships that can be derived are as follows:

  • One-to-one–One record in a table is related to only one
    record in another table.
  • One-to-many–One record in a table can be related to many
    records in another table.
  • Many-to-many–One record in a table can be related to one or
    more records in another table, and one or more records in the second table
    can be related to one or more records in the first table.

Figure 6 briefly illustrates table relationships in a relational database. A relational database allows parent tables to have many child tables, and child tables to have many parent tables. The figure shows two tables. Table 1 has an ID column (primary key) and Table 2 has an FK column (foreign key). In the one-to-one relationship example, notice that for every ID in Table 1, there is only one ID in Table 2. In the one-to-many relationships example, notice that the ID of 1 has many occurrences in Table 2. In the many-to-many relationship example, notice that the ID in Table 1 might occur multiple times in Table 2 as a foreign key, and the ID in Table 2 might occur multiple times in Table 1.

Figure 6 – Available table relationships in the relational model.

The Elements of a Database | Developer.com (6)

Conclusion

The intent of this article was to provide a brief coverage of basic database elements to provide you with a basic understanding of the elements found in a database. While it may not seem like a lot has been covered, you have actually now been exposed to the key topics involved in working with databases. As you continue to work with databases, you will find that you will continually be confronted with the above terms and concepts, including schemas, tables, columns, rows, and keys.

Featured Partners: BI Software

Yellowfin

Visit website

Yellowfin is an embedded analytics and BI platform that combines action based dashboards, AI-powered insight, and data storytelling. Connect to all of your data sources in real-time. Robust data governance features ensure compliance. Our flexible pricing model is simple, predictable and scalable. Easily configure Yellowfin to allow multiple tenants within a single environment. Bring your data to life with beautiful, interactive visualizations that improve decision-making.

Learn more about Yellowfin

Zoho Analytics

Visit website

Finding it difficult to analyze your data which is present in various files, apps, and databases? Sweat no more. Create stunning data visualizations, and discover hidden insights, all within minutes. Visually analyze your data with cool looking reports and dashboards. Track your KPI metrics. Make your decisions based on hard data. Sign up free for Zoho Analytics.

Learn more about Zoho Analytics

About the Authors

Ryan K. Stephens and Ronald R. Plew are the authors of Database Design (ISBN: 0-672-31758-3), a book by Sams Publishing. Ryan is president and CEO of Perpetual
Technologies, Inc. a database company specializing in Oracle consulting and
training. Ron is vice president and CIO of Perpetual Technologies, Inc. Both
have numerous years of experience training and consulting at the DBA level.

This article is based on techniques presented in Database Design (ISBN: 0-672-31758-3), which is available
by clicking on the title.

&copy Copyright Sams Publishing, All Rights Reserved

The Elements of a Database | Developer.com (2024)

FAQs

The Elements of a Database | Developer.com? ›

Database elements are the group of objects or entities that makes up a database. They include tables, indexes, data elements, database schemas, fields, columns, records, rows, keys, relationships, and data types.

What are the basic elements of a database? ›

Database elements are the group of objects or entities that makes up a database. They include tables, indexes, data elements, database schemas, fields, columns, records, rows, keys, relationships, and data types.

What are the four primary elements of a database? ›

The critical elements for creating a database environment are (1) data administration, (2) data-planning and modeling methodology, (3) database technology and management, and (4) users.

What are the data elements in a database? ›

Definitions: A basic unit of information that has a unique meaning and subcategories (data items) of distinct value. Examples of data elements include gender, race, and geographic location.

What are the 4 main components of a database? ›

Components of DBMS (Database Management System) · Hardware · Software · Data · Procedures · Database Access Language · People.. DBMS exists to collect, store, process and access data, the most important component. The database contains both the actual or operational data .

What are the 4 main objects of a database explain? ›

All of these items — tables, queries, forms, and reports — are database objects. Note: Some Access databases contain links to tables that are stored in other databases.

What are the three things that are essential in a database? ›

  • A database management system is comprised of three components: a data definition language, data dictionary, and data manipulation language.
  • A logical design helps to analyze and understand the data from a business perspective, while physical design shows how the database is arranged on direct access storage devices.
Dec 8, 2021

What is the primary key in a database? ›

A primary key is the column or columns that contain values that uniquely identify each row in a table. A database table must have a primary key for Optim to insert, update, restore, or delete data from a database table. Optim uses primary keys that are defined to the database.

What are the four features of a database? ›

  • Data sharing. The integration of all the data, for an organization, within a database system has many advantages. ...
  • Data independence. Another advantage of a database management system is how it allows for data independence. ...
  • Transaction processing. ...
  • Provision for multiple views of data. ...
  • Backup and recovery facilities.

What is the most basic element of useful data in the database? ›

The useful data's most essential element in a database is the attribute. It is the column or field of every table in the database, including the header and its values. A key is either an attribute or a set of that, while a record is a data group for one item, object, or others.

What are the three fundamental elements of a database management system? ›

The DBMS manages the data; the database engine allows data to be accessed, locked and modified; and the database schema defines the database's logical structure. These three foundational elements help provide concurrency, security, data integrity and uniform data administration procedures.

What are the four basic operations of database? ›

CRUD is the acronym for CREATE, READ, UPDATE and DELETE. These terms describe the four essential operations for creating and managing persistent data elements, mainly in relational and NoSQL databases.

What are the six major elements of a database? ›

The Elements of a Database
  • The database schema.
  • Schema objects.
  • Indexes.
  • Tables.
  • Fields and columns.
  • Records and rows.
  • Keys.
  • Relationships.
Mar 2, 2003

What are elements and attributes in database? ›

Elements contains information as an independent field, while attributes are those which contains data about that element means its meta data.

What is key data element? ›

In the context of the Food and Beverage (F&B) industry, a key data element (KDE) refers to a critical piece of information or a data point that holds significant importance in the operational and decision-making processes within F&B establishments.

What are the basics of a database? ›

A database is designed, built and populated with data for a specific purpose. Each data item is stored in a field. A combination of fields makes up a table. For example, each field in an employee table contains data about an individual employee.

What are the basic features of a database? ›

Database management system has the following objectives:
  • Elimination of redundant data.
  • Enabling data access easy for the user.
  • Providing a source of mass storage of data.
  • Allowing multiple users to access the database at the same time.
  • Providing appropriate and quick response to user queries.

What is the basic element of data? ›

Data Elements Basics

The data element includes the data element name (which is the reference found in the database—i.e. “field name”), a data definition source (which dictates what kind of field—picker, text box, etc.), and a Form Label—which is what displays in the input form.

Top Articles
Buying a New Car In the Easing Chip Shortage: What You Need to Know - Kelley Blue Book
Is Computer Science Hard? Learn Your Education and Career Options
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Euro (EUR), aktuální kurzy měn
Western Union Mexico Rate
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
Trade Chart Dave Richard
Mawal Gameroom Download
Tamilblasters 2023
Craigslist Pets Southern Md
Nonuclub
How to find cash from balance sheet?
Bad Moms 123Movies
Unlv Mid Semester Classes
Moviesda3.Com
Eva Mastromatteo Erie Pa
Blackwolf Run Pro Shop
Lancasterfire Live Incidents
The Ultimate Style Guide To Casual Dress Code For Women
TBM 910 | Turboprop Aircraft - DAHER TBM 960, TBM 910
Wnem Tv5 Obituaries
Raw Manga 1000
Il Speedtest Rcn Net
Prep Spotlight Tv Mn
Telegram Voyeur
The Collective - Upscale Downtown Milwaukee Hair Salon
Ncal Kaiser Online Pay
Srjc.book Store
1964 Impala For Sale Craigslist
Helpers Needed At Once Bug Fables
Dailymotion
Emily Katherine Correro
Giantess Feet Deviantart
Tendermeetup Login
Junior / medior handhaver openbare ruimte (BOA) - Gemeente Leiden
Tds Wifi Outage
Raisya Crow on LinkedIn: Breckie Hill Shower Video viral Cucumber Leaks VIDEO Click to watch full…
7543460065
Cdcs Rochester
Craigslist Free Manhattan
Tryst Houston Tx
How to Quickly Detect GI Stasis in Rabbits (and what to do about it) | The Bunny Lady
FREE - Divitarot.com - Tarot Denis Lapierre - Free divinatory tarot - Your divinatory tarot - Your future according to the cards! - Official website of Denis Lapierre - LIVE TAROT - Online Free Tarot cards reading - TAROT - Your free online latin tarot re
LumiSpa iO Activating Cleanser kaufen | 19% Rabatt | NuSkin
✨ Flysheet for Alpha Wall Tent, Guy Ropes, D-Ring, Metal Runner & Stakes Included for Hunting, Family Camping & Outdoor Activities (12'x14', PE) — 🛍️ The Retail Market
Tlc Africa Deaths 2021
From Grindr to Scruff: The best dating apps for gay, bi, and queer men in 2024
26 Best & Fun Things to Do in Saginaw (MI)
Craigslist Sarasota Free Stuff
Laurel Hubbard’s Olympic dream dies under the world’s gaze
Escape From Tarkov Supply Plans Therapist Quest Guide
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 5915

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.