Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago