Database

profilesam83
respno2.docx

Write a description for a scalar function that would be useful in your database.

1. A scalar function to change the names of Movie actors to uppercase • In this scalar function I will use the inbuilt function UPPER

2. A function to determine the last time a person logged into the database • I will use the timestamp already in the database

3. A scalar function to determine the number of times a certain movie has been rated • In this I will use a function with the keyword COUNT

Write a description for a stored procedure that would be useful in your database

4. Return all the number of movies available in the database at a single time • In my stored procedure I will include COUNT keyword

5. Delete all the movies which have stayed in the database where MovieYear is 2000 and below • This I will use the general syntax of stored procedure and include the DELETE keyword

6. Edit the column name ‘MovieID’ to ‘MovieNo’ • In this stored procedure I will use the ALTER command