Question
Database systems: Triggers Problem: Character-based Primary Key including a sequence number (TRIGGER) Client ids C_ID are defined as a string of 10 characters. The first
Database systems: Triggers
Problem: Character-based Primary Key including a sequence number (TRIGGER)
Client ids C_ID are defined as a string of 10 characters. The first character is a letter C followed by 9 characters, which are created from a sequence left padded by zeros. Create a trigger to add automatically a new primary key for an INSERT on the Client table. Similar trigger must run on vehicle table to define vehicle Id as well as on the transaction table to have transaction id. Vehicle has the character V and transaction table do not have any code.
Problem: Preventing the client from the black list to rent a car (TRIGGER)
Write a trigger to stop an INSERT or UPDATE operation on transaction table for the blacklisted clients.
VEHICLE V ID VIN V MAKE COST_PER_DAY RESERVATION R ID START_DATE END_DATE C ID V ID TOTAL_COST CLIENT C ID Name1 Name Z F NAME L NAME DOB CITY GENDER ARCHIVED RESERVATION R ID START_DATE END DATE C ID V ID TOTAL_COST ADDED BY ADDED DATE BLACK LIST C ID F NAME L_NAME DOB CITY GENDER REASON ADDED BY ADDED_DATE STATS YEAR C ID AGE GENDER TOT RESERVATIONS TOT_DAYS_OF_RESERVATIONS TOT COST_OF_RESERVATIONSStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started