SlideShare a Scribd company logo
1 of 21
Relational Databases
CIS-182
What is a database?
• Database: Collection of related data and the tools
to manage and use that data
• Collection refers to a group of like things
– Students at SPSCC represent a collection
• What belongs in the group is determined by a
purpose, task or need:
– What will the data be used for?
– Provides the ability to determine what specific data is
needed to complete a task, satisfy the stated purpose
Manage & Use Data
• Add new data
• Edit existing data
• Remove data
• Find data
– Filtering: limit by characteristics
– Sorting: order by value
Database Tools
• How data is stored doesn’t matter
– May be a list
– May be post-it notes
• Tools may be simple or complex
– Piece of paper and pencil
– Spreadsheet
• A Grocery List is a database
– Using pen/paper, can add items to buy, change items
to buy, remove items to buy
– Use a different list for different days or stores
What is a relational database?
• Incorporates basic definition of a database
• Data organized in a set of tables, where the data and
relationships between data are modeled based on
the real world
– Table: Group of records about one kind of
thing (entity)
– Record: Entry for one entity (row)
– Field: Single value describing characteristic of one entity
(column)
• Reduces data entry, size of files, number of errors
• Helps to ensure the accuracy and validity of data
Relationships – 1:1
• One to one: for each record in one table there is a
single corresponding record in a second table
• Similar to splitting a table in two:
– If have a persons table (name, address) could have a
students table (school ID, major); each person can
only be a single student
Relationships – 1:M
• One to many: for each record in one table, there
can be one or more related records in a second
table
• In simplest form, represents ownership
– One student completes many assignments
• Each assignment “belongs” to a single student, and only that
student
Relationships – M:N
• Many to many: for each record in both
tables, there can be many matching records in
the other table
• Most common kind of relationship
– One student takes many classes, each class has many
students
• Requires a third table to create relationship
– Third table “joins” entries in original table
• An Enrollments table would identify which student is in
which class
– Join table has at least two foreign keys
Primary Keys
• Keys provide a means to find specific rows
• Primary key defines unique, required value in a
table
– Provides a way to get one row in the table
– May be one or more columns
• Column(s) in primary key must have a value
• Value(s) must be different for each row
• Table can have only one primary key
• Student ID represents a value that is different
(unique) for each student in the Students table
Foreign Keys
• Foreign key is a value in one table that refers to a
unique value in a different table
– “Foreign” means outside
• A student ID in enrollments refers to an entry in the Students
table
– Usually refers to primary key, but can use any unique
index
• Foreign key must “look like” related primary
key
– Same number of fields
• Field names don’t have to match
– Data types must match
Referential Integrity
• Ensures that data is consistent
– Value in foreign key must exist in related primary key
– Prevents “orphans”, records on many side without a
valid “parent”
• Creates limits on both tables
– Can’t enter a row in the many side with a foreign key
that doesn’t exist
– Can’t remove a row on the one side if there are
related rows in the many side
Cascade Update/Delete
• Can implement referential integrity to help
manage changes automatically
• Cascade update passes changes to primary key
values to the related rows on the many side
– If student ID is changed in students, change the
student ID in related rows in Enrollments to match
the new value
• Cascade delete deletes related rows from the
many table when a row from the one-side is
deleted
– If a student is deleted from Students table, delete
related rows in Enrollments
Normalizing a database
• Process of organizing data in database to:
– Reduce redundancy: don’t repeat values
• Some repetition is needed for primary keys/foreign keys
– Reduce inconsistent dependencies: changing one
value shouldn’t require a change to a second value
• Rather than store Price, Quantity, Total Price (which is Price *
Quantity), store Price, Quantity and calculate Total Price
when needed
• Helps to ensure each table is about one thing
Using Normalization
• Different degrees of normalization are referred
to as “forms”
• Database designer determines how far to
normalize
– Most relational databases are in 3rd normal form
– Some “de-normalization” is common
• Each higher level of normalization leads to more tables with
fewer columns
• More joins in queries are required to make data
useful, understandable
First Normal Form
• First Normal Form is most basic level
• Each row/column combination has only one
value
– Address should be broken up to
Street, City, State, Zip
• Eliminate repeating groups
– Don’t have multiple phone number columns in a
Students table
First Normal Form Example
• Example: Instead of using a single field for all
items purchased, each item is unique, as is
quantity
OrderID
CustomerID
OrderDate
Items Purchased
Not Normalized OrderID
CustomerID
OrderDate
ItemID
Quantity
ItemName
1st Normal Form
Second Normal Form
• Remove fields that are not fully dependent on
the key, and place in separate table(s)
– Each row should be about just one thing
– Listing the grades a student receives doesn’t help
describe a student – grades belong in a different table
Second Normal Form Example
• Example: ItemID is not dependent on the
Customer and OrderID; it is dependent on
OrderID (an order can include many different
things)
OrderID
CustomerID
OrderDate
ItemID
Quantity
ItemName
1st Normal Form
OrderID
CustomerID
OrderDate
2nd Normal Form
OrderID
ItemID
Quantity
ItemName
Third Normal Form
• All non-key columns are mutually independent
– A change in one field does not require a change in
another field in the table (i.e. no calculations)
• All fields contribute to describing the key
(making the record unique)
• There are limits to how far to go:
– A change in city could require a change in state and
zip code
– Need to either add many small tables or some level of
not being normalized
Third Normal Form Example
• If the ItemID that’s part of an order changes, that
means that item name should change too; break
out Products into it’s own table
OrderID
CustomerID
OrderDate
2nd Normal Form
OrderID
ItemID
Quantity
ItemName
OrderID
CustomerID
OrderDate
3rd Normal Form
OrderID
ItemID
Quantity
ItemID
ItemName
Normalization Summary
• A change in one field should not require change
in another field in the table
– No calculations
• All fields help describe the key
– Each record is unique
– Each table stores information about one “thing”

More Related Content

Similar to 1 Relational Databases

Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelKunal Anand
 
Reviewing basic concepts of relational database
Reviewing basic concepts of relational databaseReviewing basic concepts of relational database
Reviewing basic concepts of relational databaseHitesh Mohapatra
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems incMuthu Natarajan
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Eddyzulham Mahluzydde
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMSPadamNepal1
 
ADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database SystemsADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database SystemsJoshua Costa
 

Similar to 1 Relational Databases (8)

Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
Reviewing basic concepts of relational database
Reviewing basic concepts of relational databaseReviewing basic concepts of relational database
Reviewing basic concepts of relational database
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
computer-210809080138.pdf
computer-210809080138.pdfcomputer-210809080138.pdf
computer-210809080138.pdf
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
ADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database SystemsADBMS - Joins , Sorting , Distributed Database Systems
ADBMS - Joins , Sorting , Distributed Database Systems
 

More from Randy Riness @ South Puget Sound Community College

More from Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS 245 Final Review
CIS 245 Final ReviewCIS 245 Final Review
CIS 245 Final Review
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
Cis245 Midterm Review
Cis245 Midterm ReviewCis245 Midterm Review
Cis245 Midterm Review
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

1 Relational Databases

  • 2. What is a database? • Database: Collection of related data and the tools to manage and use that data • Collection refers to a group of like things – Students at SPSCC represent a collection • What belongs in the group is determined by a purpose, task or need: – What will the data be used for? – Provides the ability to determine what specific data is needed to complete a task, satisfy the stated purpose
  • 3. Manage & Use Data • Add new data • Edit existing data • Remove data • Find data – Filtering: limit by characteristics – Sorting: order by value
  • 4. Database Tools • How data is stored doesn’t matter – May be a list – May be post-it notes • Tools may be simple or complex – Piece of paper and pencil – Spreadsheet • A Grocery List is a database – Using pen/paper, can add items to buy, change items to buy, remove items to buy – Use a different list for different days or stores
  • 5. What is a relational database? • Incorporates basic definition of a database • Data organized in a set of tables, where the data and relationships between data are modeled based on the real world – Table: Group of records about one kind of thing (entity) – Record: Entry for one entity (row) – Field: Single value describing characteristic of one entity (column) • Reduces data entry, size of files, number of errors • Helps to ensure the accuracy and validity of data
  • 6. Relationships – 1:1 • One to one: for each record in one table there is a single corresponding record in a second table • Similar to splitting a table in two: – If have a persons table (name, address) could have a students table (school ID, major); each person can only be a single student
  • 7. Relationships – 1:M • One to many: for each record in one table, there can be one or more related records in a second table • In simplest form, represents ownership – One student completes many assignments • Each assignment “belongs” to a single student, and only that student
  • 8. Relationships – M:N • Many to many: for each record in both tables, there can be many matching records in the other table • Most common kind of relationship – One student takes many classes, each class has many students • Requires a third table to create relationship – Third table “joins” entries in original table • An Enrollments table would identify which student is in which class – Join table has at least two foreign keys
  • 9. Primary Keys • Keys provide a means to find specific rows • Primary key defines unique, required value in a table – Provides a way to get one row in the table – May be one or more columns • Column(s) in primary key must have a value • Value(s) must be different for each row • Table can have only one primary key • Student ID represents a value that is different (unique) for each student in the Students table
  • 10. Foreign Keys • Foreign key is a value in one table that refers to a unique value in a different table – “Foreign” means outside • A student ID in enrollments refers to an entry in the Students table – Usually refers to primary key, but can use any unique index • Foreign key must “look like” related primary key – Same number of fields • Field names don’t have to match – Data types must match
  • 11. Referential Integrity • Ensures that data is consistent – Value in foreign key must exist in related primary key – Prevents “orphans”, records on many side without a valid “parent” • Creates limits on both tables – Can’t enter a row in the many side with a foreign key that doesn’t exist – Can’t remove a row on the one side if there are related rows in the many side
  • 12. Cascade Update/Delete • Can implement referential integrity to help manage changes automatically • Cascade update passes changes to primary key values to the related rows on the many side – If student ID is changed in students, change the student ID in related rows in Enrollments to match the new value • Cascade delete deletes related rows from the many table when a row from the one-side is deleted – If a student is deleted from Students table, delete related rows in Enrollments
  • 13. Normalizing a database • Process of organizing data in database to: – Reduce redundancy: don’t repeat values • Some repetition is needed for primary keys/foreign keys – Reduce inconsistent dependencies: changing one value shouldn’t require a change to a second value • Rather than store Price, Quantity, Total Price (which is Price * Quantity), store Price, Quantity and calculate Total Price when needed • Helps to ensure each table is about one thing
  • 14. Using Normalization • Different degrees of normalization are referred to as “forms” • Database designer determines how far to normalize – Most relational databases are in 3rd normal form – Some “de-normalization” is common • Each higher level of normalization leads to more tables with fewer columns • More joins in queries are required to make data useful, understandable
  • 15. First Normal Form • First Normal Form is most basic level • Each row/column combination has only one value – Address should be broken up to Street, City, State, Zip • Eliminate repeating groups – Don’t have multiple phone number columns in a Students table
  • 16. First Normal Form Example • Example: Instead of using a single field for all items purchased, each item is unique, as is quantity OrderID CustomerID OrderDate Items Purchased Not Normalized OrderID CustomerID OrderDate ItemID Quantity ItemName 1st Normal Form
  • 17. Second Normal Form • Remove fields that are not fully dependent on the key, and place in separate table(s) – Each row should be about just one thing – Listing the grades a student receives doesn’t help describe a student – grades belong in a different table
  • 18. Second Normal Form Example • Example: ItemID is not dependent on the Customer and OrderID; it is dependent on OrderID (an order can include many different things) OrderID CustomerID OrderDate ItemID Quantity ItemName 1st Normal Form OrderID CustomerID OrderDate 2nd Normal Form OrderID ItemID Quantity ItemName
  • 19. Third Normal Form • All non-key columns are mutually independent – A change in one field does not require a change in another field in the table (i.e. no calculations) • All fields contribute to describing the key (making the record unique) • There are limits to how far to go: – A change in city could require a change in state and zip code – Need to either add many small tables or some level of not being normalized
  • 20. Third Normal Form Example • If the ItemID that’s part of an order changes, that means that item name should change too; break out Products into it’s own table OrderID CustomerID OrderDate 2nd Normal Form OrderID ItemID Quantity ItemName OrderID CustomerID OrderDate 3rd Normal Form OrderID ItemID Quantity ItemID ItemName
  • 21. Normalization Summary • A change in one field should not require change in another field in the table – No calculations • All fields help describe the key – Each record is unique – Each table stores information about one “thing”