View the step-by-step solution to:

Problems - Create rules in the database to solve each of the following : a. In which year was a specific movie released?

Problems - Create rules in the database to solve each of the following:

    a. In which year was a specific movie released?
        year_released(Movie, Year):-
    b. Find all movies released in a given year.
        movies_released_in_year(Movies, Year):-
    c. Find all movies released AFTER a given year.
        movies_released_before_year(Movies, Year):-
    d. Find all movies released BEFORE a given year.
        movies_released_after_year(Movies, Year):-
    e. Find all actors and actresses who also directed a movie, the movie, and the role they played.
        star_who_directed(Star, Movie, Role):-
    f. Find all co-stars of an actor.
        co_star(Star, Costar).
	
*/

/* DATABASE

    movie(M, Y) <- movie M came out in year Y
    director(M, D) <- movie M was directed by director D
    actor(M, A, R) <- actor A played role R in movie M
    actress(M, A, R) <- actress A played role R in movie M

in prologue

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question