Menu

[Solved]Given Relations Accounts Aid Integer Balance Double Type String Type Must One Credit Check Q37291681

Given these relations:

Accounts( aid: integer, balance: double, type: String ) [

type must be one of credit, checking, or cash ]

Customers( name: String, address: String, aid: integer )

Employees( eid: integer, name: String, position: String, salary:double )

Employs( store: String, eid: integer )

Inventory( name: String, item: String, quantity: integer )

Items( item: String, brand: String, price: double )

Stores( name: String, location: String )

Transactions( tid: integer, store: String, item: String,customer: String, date: Date )

3)

A) Create a trigger that identifies when an insert into theInventory items list does not exist in the Items table. In thiscase, insert this new item into the Items table with the brand“generic” and the price found by the average price of all the itemscurrently in the Items table.

B) Implement trigger(s) that will respond to any update orinsertion into the database that would give an account type anyvalue other than credit, checking, or cash. As a default, set thetype to cash in these cases.

Expert Answer


Answer to Given these relations: Accounts( aid: integer, balance: double, type: String ) [ type must be one of credit, checking, o… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *