Database Relationships
4.3 (141 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
4,365 students enrolled

Database Relationships

Let this course take you from knowing nothing about databases all the way to structuring tables like a professional!
4.3 (141 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
4,365 students enrolled
Created by Caleb Curry
Last updated 4/2015
English [Auto]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Create correct Database Relationships
  • Design databases with referential integrity
  • Design primary keys and foreign keys
  • Use gained skills to correct bad designs in database structures
  • Decide which tables should be parents and which tables should be children
  • A notepad and pencil for drawing out database designs and taking notes

The hardest part about databases is that there is a huge mountain of knowledge needed before even beginning to understand how to design and create them. It doesn't have to be this way. This course will take you from knowing nothing about databases to being able to decisively design relationships between tables. Now, if you're a beginner, you might be asking..."What are database relationships and why do they matter?" The answer is simple, every database is built off the fundamentals of database relationships.

If you want to really understand what a database is, how it works, and how to design your very first set of database tables, this course is for you.

Every lecture is taught in an easy to follow method using on-screen illustrations, drawings, and examples. This course will bring you to a level of understanding that will allow you to develop skills quickly and use them at home, in school, and even in the work setting. These are practical skills. The skills learned in this course are skills that can help you get a job in IT or Database design.

Do you want even better news? These skills are easy. No more confusion, no more fright, no more being a step behind everybody else in database technology. Here is just some of the information you will learn in this course:

  • The basics of databases - what they are, how they work, and how they structure data.
  • Data management - How do we keep millions of pieces of information organized and up-to-date?
  • Data structure - How do we organize data so that our database is protected from anomalies?
  • How to structure the three types of relationships between tables - one-to-one, one-to-many, and many-to-many. Each with practical examples.

I didn't create this course to sell you something that's going to waste your time. I created this course because I have a passion for databases and I love teaching in a fun way. This course is fun, easy to follow, and worth every penny.

Who this course is for:
  • This Database Design course is for beginners who have no prior experience with databases or database design. This course will only go over designing. Avoid this course if you are more experienced or are looking to actually use SQL to program a database.
Course content
Expand all 22 lectures 01:43:48
+ Introduction
1 lecture 00:50

Welcome to this course! It will be an introductory course to database concepts! Don't expect to be a master after this course. On the bright side though, this course will have a lot of useful content!

Preview 00:50
+ Introduction to Database Concepts
6 lectures 22:24

Entities are what we store Data about, Attributes are the things we store about the entity.
Every type of entity in a database will have its own table. Each attribute about that entity will have its own column.

Preview 03:16

Relations are tables. This comes from algebra, but we don't need to worry too much about that for beginning database design.

Preview 05:31

It is important to have data integrity within our database. Data integrity is protecting the structure of our database and keeping our data up-to-date and accurate.

Data Integrity

When things are atomic they only contain one thing. They can no longer be broken up into smaller groups of data.
In our database we want our tables, columns, and data to be atomic.

Primary and Foreign Keys

A relationship is when we have a foreign key in one table that references a primary key in another table.

Keep in mind that a relational database management system is not called relational because it has relationships, it's called relational because tables are known as relations (see previous video).

Preview 03:02
+ Let's Conceptualize!
5 lectures 15:27

There is a difference between conceptual and physical relationship design.

When we design conceptually, we are thinking of how the entities are related in real world situations.
When we design physically, we are thinking of how we take that real world relationship and turn it into tables with primary keys and foreign keys.

Conceptual Vs. Physical Relationships

A one-to-one relationship exists when an entity is in an exclusive relationship with one other entity. No other entities allowed.

The example given was of a marriage where the husband and wife were not allowed to marry anybody else.

One-to-One Relationships (Conceptual)

A one-to-many relationship exists when an entity can be in a relationship with multiple other entities but each of the other entities can only be in a relationship with the original entity exclusively.

The example I gave was a jelous king we marries unlimited wives but each wife was to only be in a relationship with that king.

One-to-Many Relationships (Conceptual)

A many-to-many relationship exists when any number of entities have relationships with any number of entities. There is no limit.

There is no practical way to store this in a database so we'll learn a trick in future videos.

Many-to Many-Relationships (Conceptual)

Sometimes you will have to decide the relationship.

Relationships are not always set in stone. You must decide the best way to design a database. This could either be by your own intellect or rules given to you by a boss or team leader. These rules are called business rules.

Preview 02:39
+ Foreign keys in More Detail
3 lectures 20:50

Referential integrity goes hand in hand with data integrity. In fact, referential integrity is only one kind of data integrity. There are many more types!

Referential Integrity

Whenever you have a foreign key referencing a primary key you will have a parent table and a child table. The primary key is the parent and the foreign key is the child.

Parent and Child Tables

NOT NULL is a column characteristic that prevents that column from being left empty.

+ The Relationships!
6 lectures 42:53

To model one-to-one relationships we have two tables where one is given the foreign key that references the other table. It usually will not matter which one you put the foreign key in because the relationship is exclusive.

How to Structure One-to-One Relationships

If you are struggling to understand these examples, watch the previous video or do some extra research.

One-to-One Examples

To model one-to-many relationships we will give a foreign key to each row in the child table that references the parent. We will not put any information about the child in the parent table.

How to Structure One-to-Many Relationships

If you are struggling to understand these examples, watch the previous video or do some extra research.

One-To-Many Examples

To structure many-to-many relationships we need to break the relationship up into 2 one-to-many relationships. This means that we will have a total of 3 tables, 2 parents and 1 child (the intermediary table).

Each connection between the two parents within the intermediary table will be the primary key. So they will have to be unique.

How to Structure Many-to-Many Relationships

If you are struggling to understand these examples, watch the previous video or do some extra research.

Many-to-Many Examples

This is a quick quiz that will give you some questions on structuring the 3 types of relationships. Good luck!

Think you can structure relationships?
9 questions
+ Conclusion
1 lecture 01:24

Thank you for using my course as a learning tool! We've covered a lot in this quick course. If you have any questions do not hesitate to contact me. I'm sure that the content you learned in this course will help you advance on to more advanced database concepts.