Question: 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

 Problem: Character-based Primary Key including a sequence number (TRIGGER) Client ids

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.

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_RESERVATIONS 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_RESERVATIONS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!