Question: Consider the following simplified data model: - Transactions table called TRADES. It contains the following fields: NB : Transaction number ( unique identifier for each
Consider the following simplified data model:
Transactions table called TRADES. It contains the following fields:
NB : Transaction number unique identifier for each transaction
FAMILY : Transaction family there are such families, eg FOREIGN EXCHANGE, STOCKS, COMMODITIES, etc.
TYPE : Transaction type several types can be attached to a given family
STATUS : Transaction status LIVE or DEAD
CURRENCY : Transaction currency code eg USD, EUR, etc.
Table of prices, called TRADEP, which contains the following fields:
NB : Transaction number
PRICE : Transaction price
Table of currencies, called CURRENCIES, which contains the following fields:
CURRENCY : Currency code eg USD, EUR, etc.
AREA : Code of the geographical zone ASIA NORTHAMERICA, EUROPE,
Table of prices which are imported from an external system. This table is called IMPORT and contains the following fields:
NB : Transaction number
PRICE : Transaction price
Question :
Write a query which returns the number of transactions effected in the ASIA geographical zone and having a zero price.
Question :
How could you optimize the previous query
Question :
Write a query to update the transaction prices with the values of the table of prices imported from the external data feed. This query will apply only to the transactions effected in the ASIA geographical zone and having a zero price.
Question :
Please criticize this data model.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
