Question

In: Computer Science

This is all one question: 1.   Given the following table that is used by an investment...

This is all one question:

1.   Given the following table that is used by an investment firm to keep track of stock transactions (buy/sell) for clients

Transaction (Stock Symbol, StockName, Trans-Date, Trans-time, Number_of_Shares, Transaction_type, Trans-Price, AccountNo, ClientName)  

Note,

The investment firm have many clients who may have multiple accounts. But each account only associates with one client. An account includes multiple stocks.  

On a trading day, a client can buy or sell any number of stock in his/her account. A client can only do a one tranction in one account at a time. Transactions from different clients may happen at the same time.

-List all FD, including Multi-valued Dependency (MVD)

-What is the KEY of Transaction table?

-What normal form this table is in? (Note, only if you have all FDs and know the key/candidate key, you can then answer this question).

-How many THEMES are in this table and what are they?

- Normalize this table, show the result of normalization. Note. The resulting tables must have KEY and FK so that the information carried in original table is kept by the resulting tables.

Solutions

Expert Solution

Transaction (Stock Symbol, StockName, Trans-Date, Trans-time, Number_of_Shares, Transaction_type, Trans-Price, AccountNo, ClientName)  

The functional dependencies in the given relation are

StockSymbol --> StockName

AccountNo -->  ClientName

Trans-Date, Trans-time , AccountNo --> StockSymbol

AccountNo , StockSymbol, Trans-Date, Trans-time --> Number_of_Shares, Transaction_type, Trans-Price

The Key of the Transaction table is

A composite key which is:

(StockSymbol, AccountNo, Trans-Date, Trans-time)

These four attributes combinedly identify each row of the Transaction table uniquely. Also each row contains atomic values.

Hence the given relation is in 1NF.

The table is not in 2NF (or higher normal forms). Since from the above lists of functional dependencies we observe that there exist functional dependencies in the table where LHS of the dependency is a subset of the primary key.

There are three different themes in the given table. In the given table they are Stock, Transaction, and Client

The given table can be decomposed as follows for the purpose of normalization without loss of information

Stock(StockSymbol, StockName)

Primary key: StockSymbol

Client(AccountNo, ClientName)

Primary key: AccountNo

Transaction(Transaction_id, Trans-Ddate, Trans-time, AccountNo, StockSymbol)

Primary key: Transaction_id

Foreign Key: AccountNo references Client(AccountNo)

Foreign Key: StockSymbol references Stock(StockSymbol)

TransactionDetails(Transaction_id, Number_of_Shares, Transaction_type, Trans-Price)

Primary key: Transaction_id,

Foreign Key: Transaction_id references Transaction(Transaction_id)

N.B: For any further clarification please contact through comments. Thak you.


Related Solutions

Question One Given the following table from a study of a sample of homes in the...
Question One Given the following table from a study of a sample of homes in the three largest cities in Canada, fill in the blanks accompanying several statements listed below with the correct answers. If your answer requires you to calculate a percentage, calculate that percentage to 2 decimal places (e.g., 23.72%) and show your calculations. City type of home Toronto Montreal Vancouver Grand Total condo 8 6 6 20 multistory 12 7 5 24 ranch 3 6 1 10...
q: Given the following HTML for a table, put all these questions into one application (use...
q: Given the following HTML for a table, put all these questions into one application (use css) a)   Modify the html to create another column called Assessment, and then modify the html to extend the data in the rows ( you may use arbitrary numbers for the data items in the td elements) b)   Make all table text elements blue using either css or html modification c)   Make the background color of the columns alternate between pink and yellow, <!DOCTYPE...
Question 1. Given the following table answer the questions.                           Score Respondent   &nb
Question 1. Given the following table answer the questions.                           Score Respondent          X            Y         x-x       (x-x) 2         y-y      ( y-y) 2     ( x-x) ( y-y) A. Rose                 18          92    B. Bush                 36          65     C. Novicevic         24          91 D. Vitell                28          85                                                                        E. Walker              25          70     a. Calculate Pearson’s Product Movement Correlation Coefficient (r). Show your work. b. Based on the correlation coefficient which you calculated, in two words how would you describe the relationship between the two variables in the “test”? Question 2. PHR Score                Score Respondent        X             Y         x-x       (x-x) 2         y-y      ( y-y) 2     ( x-x) ( y-y) A....
This is all one question: A theater uses the following table/sheet to manage ticket sales, which...
This is all one question: A theater uses the following table/sheet to manage ticket sales, which turned out to be a very bad practice. The manager of theater hires you to design a database to manage the ticket sale information.    TICKET-SALES (InvoiceNumber, CustomerID, ShowTitle, SeatType, SeatLocation, TicketPrice, CustomerName, CustomerCell, ShowTime, Director_of_Show) Note: A customer can purchase multiple seats in one order (with one InvoiceNumber). It is also the common sense that the price of a ticket/seat depends on the show,...
Question 1 Given an example on any one of the following sampling techniques (one example on...
Question 1 Given an example on any one of the following sampling techniques (one example on only one technique).  Simple random sampling  Stratified random sampling  Cluster sampling Question 2 What is the difference between sampling error and non-sampling error? Give an example on each part. Question 3 B1 B2 A1 0.12 0.31 A2 0.08 0.49 a. Find P(A1) b. Find P(A1 and B2) c. Find P(A1|B2) d. Find P(A2 or B1) e. Find (B1 and B2) Question...
Answer the next question on the basis of the information given in the following table.                            &
Answer the next question on the basis of the information given in the following table.                                                                                     2 points Employment Total Product Product Price 0   0 $3 1 12 3 2 22 3 3 30 3 4 36 3 5 40 3 6 42 3 If the firm is hiring workers under purely competitive conditions at a wage rate of $22, it will employ
QUESTION A. Fair, Inc. is considering an investment in one of two common stocks. Given the...
QUESTION A. Fair, Inc. is considering an investment in one of two common stocks. Given the information that follows, which investment is better, based on risk (as measured by the standard deviation) and return? Stock A Stock B Probability Return Probability Return .30 12% .20 15% .40 16% .30 6% .30 18% .30 13% .20 21% B. ‘Understanding the relationship between risk and return and how it’s affected by time is probably one of the most important aspects of investment’...
Consider the investment projects given in Table P7.19. Assume that MARR = 13% in the following...
Consider the investment projects given in Table P7.19. Assume that MARR = 13% in the following questions: (a) Identify the i*('s) for each investment. If the project has more than one i*, identify all of them. (b) Which project(s) is(are) a mixed investment? (c) Compute the IRR for each project. (d) Determine the acceptability of each project. Table P.719 n Project 1 Project 2 Project 3 0 -$8,500 -$5,000 -$1,500 1 10,000 10,000 6,000 2 10,000 30,000 -6,000 3 0...
QUESTION 1 Pearson’s Product-Moment Correlation Coefficient 1. Given the following table answer the questions.                        &nb
QUESTION 1 Pearson’s Product-Moment Correlation Coefficient 1. Given the following table answer the questions.                           Score Respondent          X            Y         x-x       (x-x) 2         y-y      ( y-y) 2     ( x-x) ( y-y) A. Rose                 18          92    B. Bush                 36          65     C. Novicevic         24          91 D. Vitell               28          85                                                                        E. Walker              25          70                                                                                         a. Calculate Pearson’s Product Movement Correlation Coefficient (r). (2 points) b. Based on the correlation coefficient which you calculated, in two words how would you describe the relationship between the two variables in the “test”? (2 points) 2. PHR Score                           Score Respondent       X             Y         x-x       (x-x) 2         y-y      (...
QUESTION 1 Pearson’s Product-Moment Correlation Coefficient 1. Given the following table answer the questions.                        &nb
QUESTION 1 Pearson’s Product-Moment Correlation Coefficient 1. Given the following table answer the questions.                           Score Respondent          X            Y         x-x       (x-x) 2         y-y      ( y-y) 2     ( x-x) ( y-y) A. Rose                 18          92    B. Bush                 36          65     C. Novicevic         24          91 D. Vitell               28          85                                                                        E. Walker              25          70 a. Calculate Pearson’s Product Movement Correlation Coefficient (r). (2 points) b. Based on the correlation coefficient which you calculated, in two words how would you describe the relationship between the two variables in the “test”? (2 points) 2. PHR Score                           Score Respondent       X             Y         x-x       (x-x) 2         y-y      ( y-y)...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT