Answer:
Customer Table
- Customer name
- Customer id
Product Table
- Product id/number (primary key, auto increment)
- Product name
- Product sale price
Transactions Table
- Transaction Id
- Customer Id
- Product id
- Quantity
- Price
- Date
Explanation:
Natalie wants to fetch following information from database
- Look up customer name and sale price
- Sort items in db by product number
To lookup customer name and sale price perform a join on Transactions table and Customer table.Assuming database is build in mysql the query to fetch required results would be
select transction.productId,transaction.customerid,customer.customername from transactions join customer ON
customer.customerid=transcation.customerid
where productid="user provided product id of returned product"
For sorting products by number set produc number in product table a auto increment primary key
Answer:
(a) What is the best case time complexity of the algorithm (assuming n > 1)?
Answer: O(1)
(b) What is the worst case time complexity of the algorithm?
Answer: O(n^4)
Explanation:
(a) In the best case, the if condition will be true, the program will only run once and return so complexity of the algorithm is O(1)
.
(b) In the worst case, the program will run n^4 times so complexity of the algorithm is O(n^4).
Answer:
d. It is assumed that the search pool is ordered.
Explanation:
A binary search/logarithimic search/half interval search/binary chop refers to search algorithm in computer science that sorts data in array in key:value arrangements. In order to locate a value in binary search, the key to the value in a sorted array is located. A binary search is characterized by an ascending, descending order arrangement of the array.
Answer: Hello the options related to your question is missing attached below are the options
answer : unlimited computing capacity for a low monthly fee ( A )
Explanation:
Since Thomas plans to develop a new service that will require his computing capacity to either double or triple, The best way of transitioning to the public cloud that might help Thomas meet up the requirement is Using unlimited computing capacity for a low monthly fee