(d) A database, FILMS, stores information about films and actors. Part of the databaseis shown:ACTOR (ActorID, FirstName, LastName, DateOfBirth)FILM_FACT (FilmID, FilmTitle, ReleaseDate, Category)FILM_ACTOR (ActorID, FilmID)(i) A composite primary key consists of two or more attributes that together form theprimary key. Explain why the table FILM_ACTOR has a composite primary key.
Question
(d) A database, FILMS, stores information about films and actors. Part of the databaseis shown:ACTOR (ActorID, FirstName, LastName, DateOfBirth)FILM_FACT (FilmID, FilmTitle, ReleaseDate, Category)FILM_ACTOR (ActorID, FilmID)(i) A composite primary key consists of two or more attributes that together form theprimary key. Explain why the table FILM_ACTOR has a composite primary key.
Solution
The FILM_ACTOR table has a composite primary key because it is a linking table that connects the ACTOR table and the FILM_FACT table. The primary key for this table is a combination of ActorID and FilmID.
This is necessary because neither ActorID nor FilmID alone would be unique in this table. An actor can play in multiple films, so there could be multiple entries with the same ActorID. Similarly, a film can have multiple actors, so there could be multiple entries with the same FilmID.
However, the combination of ActorID and FilmID should be unique, as it would not make sense for the same actor to be linked to the same film more than once. Therefore, the combination of these two attributes forms a composite primary key, ensuring the uniqueness of each record in the FILM_ACTOR table.
Similar Questions
.A primary key which is imported from another table is called a foreign key.b.Foreign key is essential for each tuple.c.Composite attribute can not divide to sub partsd.In a formal relational model data are stored in tables.e.Age is derived by date of birth attribute
What is the primary key used for in a relational database?Select one:a. To link tables togetherb. To perform data aggregationc. To enforce referential integrityd. To uniquely identify each record in a table
n a table, which of the following should be identified as the primary key? 1. field 2. query 3. record 4. object
A composite key is used when _____________*1 pointmore than one key is needed to identify a recordit is difficult to identify a primary keymore than two keys are needed to identify a recordit is difficult to identify a secondary key
. What is a Primary key?*1 pointA. Foreign KeyB. Unique KeyC. Database keyD. format key
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.