Question: Write a PL/SQL procedure called LIST_STOCK which will be used when stock is listed on a stock exchange. -Input parameters: stock_id, stock_ex_id, stock_symbol. -The stock_id,
- Write a PL/SQL procedure called LIST_STOCK which will be used when stock is listed on a stock exchange. -Input parameters: stock_id, stock_ex_id, stock_symbol. -The stock_id, stock_ex_id and stock_symbol must be recorded in the stock_listing table. -The starting price from company must be copied to the stock price table for the stock exchange. The current system date/time will be used for the time_start and the time_end will be null. The procedure must be able to convert currencies as needed.
Currency PK currency id H- Shareholder Place PK shareholder id U1 name U2 symbol Current_Shareholder_Shares shareholder_id type stock_id shares PK place id -H EH- type city country Conversion PK,FK1 from currency_id PK,FK2 to currency_id Current_Stock_Stats stock_id current_authorized total_outstanding exchange_rate Trade PK trade id Stock_Exchange PK stock ex id HO name symbol FK2 currency_id FK1 place_id FK2 stock_id transaction_time shares FK1 stock_ex_id price_total FK4 buyer_id FK5 seller_id FK3 buy_broker_id FK6 sell_broker_id Company PK,FK2 company id Direct_Holder PK,FK1 direct holder id >O-H- U2 FK1 U1 first_name last_name Broker name place_id stock_id starting_price currency_id PK broker id first_name last_name Stock_Listing PK,FK2 stock ex id PK,FK1 stock id Shares Authorized stock_symbol PK,FK1 stock id PK time start Broker_Stock_EX PK,FK1 stock ex id PK,FK2 broker id time_end authorized Stock_Price PK,FK1 stock ex id PK,FK2 stock id PK time start time_end price Currency PK currency id H- Shareholder Place PK shareholder id U1 name U2 symbol Current_Shareholder_Shares shareholder_id type stock_id shares PK place id -H EH- type city country Conversion PK,FK1 from currency_id PK,FK2 to currency_id Current_Stock_Stats stock_id current_authorized total_outstanding exchange_rate Trade PK trade id Stock_Exchange PK stock ex id HO name symbol FK2 currency_id FK1 place_id FK2 stock_id transaction_time shares FK1 stock_ex_id price_total FK4 buyer_id FK5 seller_id FK3 buy_broker_id FK6 sell_broker_id Company PK,FK2 company id Direct_Holder PK,FK1 direct holder id >O-H- U2 FK1 U1 first_name last_name Broker name place_id stock_id starting_price currency_id PK broker id first_name last_name Stock_Listing PK,FK2 stock ex id PK,FK1 stock id Shares Authorized stock_symbol PK,FK1 stock id PK time start Broker_Stock_EX PK,FK1 stock ex id PK,FK2 broker id time_end authorized Stock_Price PK,FK1 stock ex id PK,FK2 stock id PK time start time_end price
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
