Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for A Quick Intro to Relational Database Components
Esther Adebayo
Esther Adebayo

Posted on

     

A Quick Intro to Relational Database Components

Databases store and organize data. So, think of relational databases (RDB) as a type of database that organizes data into tables and establishes the relationships between these tables.

But the goal of having a database is more than just to store data.

You'd also need to access the stored data and perform various operations. That's where SQL comes in.Structured Query Language allows you to manage and manipulate the data stored in a relational database.

It's no wonder why relational databases are also calledSQL databases.

RDB showing how to use SQL

In a RDB,tables are like smaller containers that hold similar pieces of information. For example, you could have a customer management database containing two tables. The first table stores customer information, and the second stores order info.

Every table has columns and rows (similar to spreadsheets). Columns contain specific information about the data. In our customer example, columns could be name, contact info, or address.

Rows contain all the information about a specific record or customer. In order to retrieve a record or row in our table, we need a primary key. As a result, a primary key has to be unique for every record in a table.

Components of a Relational Database

To link these tables in a RDB together, we use foreign keys.

Aforeign key is a field in one table that references the primary key of another table. In this case, the orders table would have a foreign key referencing the customer table's primary key.

Relational Databases and components

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Developer Advocate | Technical Content Creator
  • Location
    United Kingdom
  • Education
    Lambda school
  • Work
    Developer Advocate
  • Joined

More fromEsther Adebayo

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp