Get a FREE Microsoft Access 2019 Introductory Course here ►https://theskillstream.com/access-2019-intro-course
In this video tutorial, learn how to define relationships of each table in a database in Access 2013.
Get the full course on Access 2013 course here: https://www.simonsezit.com/courses/microsoft/learn-microsoft-access-2013-training-tutorials/
View the entire Access 2013 video playlist: https://www.youtube.comhttp://www.youtube.com/playlist?list=PLzj7TwUeMQ3hFA4R_5Z1Fc2HZX8C2O1YV
Stay in touch:
SimonSezIT.com: https://www.SimonSezIT.com/
StreamSkill.com: https://StreamSkill.com/
YouTube Channel: https://www.youtube.com/user/simonsezittraining
Facebook: https://www.facebook.com/SimonSezIT/
If you enjoyed the video, please give a "thumbs up" and subscribe to the channel -)
Hello again and welcome back to our course on Access 2013. In the previous section we looked at setting up relationships between tables in an Access 2013 database and in particular we looked at recording the genre for a movie in our movie database. In this section we’re going to look at setting up the relationship between a movie and the actors in it.
Now to some extent this is a similar exercise to the one where we setup the genre but there are a couple of important differences. One of them is that when we define the actors that appear in a movie, we define some other information, notably for example their role in the movie. This is not the actors name but the name of the character played by the actor, so some of this is pretty much the same procedure. We’re going to create a new table. So we can click on Create. We’ll go into table design.
We’ll start off with an ID field. Note that when you go into table design you don’t get one of these by default but we are going to have one. So you can define it yourself if it’s not already there. ID defined as AutoNumber. The next thing we’re going to want will be the movie. So we put in here movie. Now we know that the movie is the foreign key pointing to the primary key in the movie table so we know that this needs to be a long integer. So type is number, check we get long integer down there which we do by default, that’s fine.
The next thing is the actor. Basically for the actor table the actor ID is also an AutoNumber field. So again this will need to be a number and a long integer so that’s fine. But now I’m going to add an additional field for this one and this field for the moment we’re just going to put in the role, the role of the actor in the movie. This will be short text, normally the name of the character. So I’m just about ready to save that. Note that if I’ve manually added an AutoNumbered ID field to act as the unique key, I need to mark it as the primary key. So let me just click there, click on primary key, and then in order to save it with the name that I want if I right click on the tab, table 1 in this case, and click on Save. Type in my table name MovieActor, click on OK, and then I’m going to close that. Let’s now setup the relationship.
So we go to database tools, click on relationships, that’s the diagram that we drew before. Now we need to show another table so we click on Show table. We want to show actor and we want to show MovieActor. Close again. Now you can arrange these boxes representing these tables in any way you like. You just drag them round by their headers. I normally try to arrange them in such a way that they’re easy to read through the relationships. You could put, for instance, the movie table on here twice if you wanted to. There’s nothing to stop you having the same table several times. But while this database is not yet particularly complicated, let’s just stick with one movie table and what we really need to do now is to do the link from movie to MovieActor which will be movie ID to movie, referential integrity yes, click on Create. And then the link from actor, actor ID to actor there, enforce referential integrity, Create. So we’ve now got our next relationship defined.
Sorry, we couldn't fit the entire video transcription here since YouTube only allows 5000 characters. Get 10+ MS Access courses at Simon Sez IT here ️ https://www.simonsezit.com/course-category/access/