
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!
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.
Relations are tables. This comes from algebra, but we don't need to worry too much about that for beginning database design.
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.
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.
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).
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.
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.
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.
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.
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.
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!
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.
NOT NULL is a column characteristic that prevents that column from being left empty.
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.
If you are struggling to understand these examples, watch the previous video or do some extra research.
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.
If you are struggling to understand these examples, watch the previous video or do some extra research.
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.
If you are struggling to understand these examples, watch the previous video or do some extra research.
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.
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:
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.