ECX5240 Mini Proj2011

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

The Open University of Sri Lanka

Department of Electrical and Computer Engineering


ECX 5240 - Information Systems
Mini Project
Due Date 02.01.2012
_____________________________________________________________________________

Instructions
You have to submit a complete report including the design, the problems Iaced and how you
solved them. Finally, you have to demonstrate the implementation oI your program at the viva.

Mini Project


Consider the Iollowing relations in a movie database.


Movie (title:char(25), year:int, length:Iloat, language:char(15), Iilmtype:char(1))
MovieStar (name: char(15), address:varchar(40), gender:char(1), birthdate: date)
StarsIn (movieTitle:char(25), movieYear:int, starname:char(15), role:varchar(15))


The attributes oI the Movie relation are title oI the movie, year it was made, length oI the movie,
language, and filmtype which may be F` or D` Ior Ieature or documentary respectively. The
MovieStar relation has attributes to record the name, address, gender (M` or F`), and birthday
oI stars. StarsIn relation associates the movie with stars that acted in them and contains the role
(lead`, support`, or other`) they played. The primary keys oI all relations are underlined.


a) Develop a database in MySQL Ior the above database schema.

b) Insert sample dataset to the database developed.

c) For each English language Ieature movie, get the title, year, and the number oI stars who
acted in the movie.

d) Display the names oI stars who have acted in 5 or more movies in any year between 2006
and 2011. Display the names without duplicates.


e) It has been decided to introduce a rating system Ior the movie stars. A star gets one point Ior
each support role and no points Ior any other roles. Do the Iollowing to implement it.

i. To the MovieStar table, add a new attribute named rating oI Iloat type with a deIault
value oI zero.

ii. Write a T-SQL procedure to update the rating oI all movie stars.


iii. Write a trigger to update the rating whenever a new tuple is added to the StarsIn
table.

Note: It is important to attached snapshots oI your own work to the report oI this work.

Help: http://www.roseindia.net/mysql/mysql5/index.shtml

You might also like