subject

Below is an ER model for some toy database.
(a) Implement this model in workbench and use your model to create the database.
(b) Write a stored procedure that inserts 3 rows of data into any one of these three tables. Your stored procedure should have condition handling capability for the following issues (i) insertion of a data record with a null value for the primary key, (ii) insertion of a record which duplicates a primary key that is already in the database. Feel free to use either a CONTINUE or EXIT handler for this.
(c) Consider the scenario where a realtor wants to see the viewing details (i. e., property number, view date) and property details (street, city, type, rooms, rent) for each property. For some reason you want this user to only ever see these details and to NEVER see the full details of the 2 underlying tables. You have decided to use a view for this - i. e., to give the user access to a view that exposes these details while denying this same user access to the underlying tables. Create a view that presents this information (Don't mind about the user access privileges configurations. Simply create this view).
(d) Create a trigger that enters a record into some log table whenever a client is deleted from the client table. The log table should contain two fields: the clientNo, and, date of deletion.
(e) Briefly discuss use-case scenarios in which one might use, (i) transactions, (ii) triggers, (iii) stored functions
DELIVERABLES:
A document that includes well labelled screenshots of your ER model in workbench, database, and images of all your results (e. g., when you run the stored procedure in (b), include screen shots to show the results for relevant use-cases that prove your procedure works as needed). Submit well labelled code for each of the tasks above (Any special instructions on how I can run your code must be included).

Client
clientNo {PK}
Name
IName
telNo
prefType
maxRent
↓ 1..1
Requests
↓ 0..*
Viewing
clientNo {PK, FK}
property No {PK, FK}
view Date
comment
↑ 0..*
Takes
↑ 1..1
Property For Rent
property No {PK}
Street
city
postcode
type
rooms
rent
ownerNo {FK}
staffNo
branchNo {FK}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, uh8hardiek
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
image
Computers and Technology, 22.06.2019 19:30, Jbutler15
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, ghari112345
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
image
Computers and Technology, 24.06.2019 00:00, babysisjessica1
For the following example of making a peanut butter and jelly sandwich, identify which are inputs, processes, or outputs: bread scooping and spreading peanut butter plate scooping and spreading jelly finished sandwich putting two pieces of covered bread together dirty plate crumbs
Answers: 2
You know the right answer?
Below is an ER model for some toy database.
(a) Implement this model in workbench and use you...

Questions in other subjects: