Consider the following relational schema, representing five relations describing shopping transactions and information about credit cards generating them [the used notation is explained above]. SHOPPINGTRANSACTION (TransId, Date, Amount, Currency, ExchangeRate, CardNbrCREDITCARD, StoreIdSTORE) CREDITCARD (CardNbr, CardTypeCARDTYPE, CardOwnerOWNER, ExpDate, Limit) OWNER (OwnerId, Name, Surname, BirthDate, Job, IncomeLevel, Level) CARDTYPE (CardType, Circuit, Issuer, Address, Country, CardName, Color) STORE (StoreId, Name, Address, Country, Zone, Web, Email, Type) 1) Answer the following questions considering the domain described by the previous relational schema: 1.1. How many transactions can be generated by a given credit card? (provide the minimum and the maximum number) 1.2. How many shopping transactions occurred in the same store can be associated with a given identifier? (provide the minimum and the maximum number) 2) Write the SQL query representing the following request: 2.1. Determine the total number of shopping transactions, performed during the last validity day of a credit card, whose amount coincides with the credit card limit.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.