Given the following database (the solid-underline fields indicate primary keys, dotted-underline fields indicate foreign keys) ...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Given the following database (the solid-underline fields indicate primary keys, dotted-underline fields indicate foreign keys) • San_Pham (Ma SP. Ten_SP, Don_Gia, Ma KH) • Khach_Hang (Ma KH. Ten_KH, Phone_No, Ghi_Chu) Don_Hang (Ma DH. Ngay_DH, Ma SP. So_Luong) Write SQL statements for following activities & print out respectively the screenshots to show test data (the table data that you create to test each query) & query results: 1. Create the tables (with the most appropriate field/column constraints & types) and add at least 3 records into each created table. 2. Create an order slip VIEW which has the same number of lines as the Don_Hang, with the following information: Ten_KH, Ngay_DH, Ten_SP, So_Luong, Thanh_Tien Question 2 Given the following database (the solid-underline fields indicate primary keys, dotted-underline fields indicate foreign keys) Employee Table (Employee Number, Employee Name, Department Number) Employee Skill Table (Employee Number, Skill Code, Date Registered) Department (Department Number, Department_Name) Let write SQL statements for following activities & print out respectively the screenshots to show test data (the table data that you create to test each query) & query results: 1. Create the tables (with the most appropriate field/column constraints & types) and add at least 3 records into each created table. 2. Specify the names of the employees whore have skill of 'Java' - give >=2 solutions: a. Use JOIN selection, b. Use sub query. 3. Specify the departments which have >=3 employees, print out the list of departments employees right after each department. 4. Use SUB-QUERY technique to list out the different employees (include employee number and employee names) who have multiple skills. 5. Create a view to show different employees (with following information: employee number and employee name, department name) who have multiple skills. Given the following database (the solid-underline fields indicate primary keys, dotted-underline fields indicate foreign keys) • San_Pham (Ma SP. Ten_SP, Don_Gia, Ma KH) • Khach_Hang (Ma KH. Ten_KH, Phone_No, Ghi_Chu) Don_Hang (Ma DH. Ngay_DH, Ma SP. So_Luong) Write SQL statements for following activities & print out respectively the screenshots to show test data (the table data that you create to test each query) & query results: 1. Create the tables (with the most appropriate field/column constraints & types) and add at least 3 records into each created table. 2. Create an order slip VIEW which has the same number of lines as the Don_Hang, with the following information: Ten_KH, Ngay_DH, Ten_SP, So_Luong, Thanh_Tien Question 2 Given the following database (the solid-underline fields indicate primary keys, dotted-underline fields indicate foreign keys) Employee Table (Employee Number, Employee Name, Department Number) Employee Skill Table (Employee Number, Skill Code, Date Registered) Department (Department Number, Department_Name) Let write SQL statements for following activities & print out respectively the screenshots to show test data (the table data that you create to test each query) & query results: 1. Create the tables (with the most appropriate field/column constraints & types) and add at least 3 records into each created table. 2. Specify the names of the employees whore have skill of 'Java' - give >=2 solutions: a. Use JOIN selection, b. Use sub query. 3. Specify the departments which have >=3 employees, print out the list of departments employees right after each department. 4. Use SUB-QUERY technique to list out the different employees (include employee number and employee names) who have multiple skills. 5. Create a view to show different employees (with following information: employee number and employee name, department name) who have multiple skills.
Expert Answer:
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these computer network questions
-
Jamie Jones is a resident at Miller's Retirement Center. She has dementia. Some days she seems without ailment. Dr. Smith needs her permission for a minor surgery. Is there any way to get Ms. Jones'...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A WiFi router transmits 800mW power from its antenna. How much this power in dBW and dBm? if a partition wall introduces 10dB power loss then how much power available to the other side of the wall
-
Explain what you would assume the yield curve would look like during economic expansion and why.
-
The histographic results of steady load tests on 237 rolling-contact bearings are: Where L is the life in millions of revolutions and f is the number of failures. Fit a lognormal distribution to...
-
The following is taken from the Colaw SA statement of financial position. Interest is payable annually on January 1. The bonds are callable on any annual interest date. Colaw uses straight-line...
-
Event C: rolling a number less than 3 A probability experiment consists of rolling a 12-sided die, numbered 1 to 12. Find the probability of the event.
-
1. What type of organizational structure does LMVH have? 2. What is the role of SBUs in the organizational structure of LVMH? What problems might arise if each SBU were run independently? 3. Compare...
-
If the expected rate of return on the market portfolio is 18% and T-bills yield 4%, what must be the beta of a stock that investors expect to return 8%?
-
Because Natalie has had such a successful first few months, she is considering other opportunities to develop her business. One opportunity is the sale of fine European juicing machines. The owner of...
-
Al-Khaled Trading Company for Office Furniture started on the first of September of the year 2011 with a capital of 25,000 dinars, presented as follows: 12000 dinars for the bank, 7000 dinars for...
-
A surveillance satellite is placed into a circular orbit at 500 km altitude at 55 inclination. Its telescope has a field of view of 2 along-track and 2 cross-track. The ground resolution is 0.2 m per...
-
Far Rockaway Manufacturing, a manufacturer of parts for diesel engines, provides the following financial information for the most recent fiscal year. Inventories: As of January 1 : Direct materials 8...
-
Solve the logarithmic equation. Show all algebraic work, including the check for extraneous solutions in the original equation. log,(x+4)+log,(x-4)= log79
-
A 2.3 cm-high object is placed 4.8 cm in front of a concave mirror, that has a radius of curvature of 16.0 cm. (You may use cm throughout this question.) (a) Calculate the focal length of the mirror,...
-
1. Find the Gross Debt Service Ratio for the following situations, and state whether these houses are affordable. a) The monthly mortgage payment is $805, monthly property taxes are $110, monthly...
-
1. Which of the following least acidic? (a) COOH CD 3 (b) COOH CH3 (c) COOH CD (d) COOH CH3
-
Which provision could best be justified as encouraging small business? a. Ordinary loss allowed on $ 1244 stuck. b. Percentage depletion. c. Domestic production activates deductions. d. Interest...
-
You need to delete the Order Line table from the TAL Distributors database. Will the following command work? Why or why not?
-
When do you use a make-table query?
-
Describe the purpose of the PROJECT command in relational algebra.
-
1. Describe the bases of power held by Dr. Jamie Thompson. Describe the bases of power held by Dr. Elizabeth Clarke. 2. What activities and people have contributed to Jaime Thompsons power? What...
-
What is the current in the wire in Figure Q22.1? 1.0 VR + 1.0-1.0V + FIGURE Q22.1
-
Electroplating uses electrolysis to coat one metal with another. In a copper-plating bath, copper ions with a charge of +2e move through the electrolyte from the copper anode to the cathode the metal...
Study smarter with the SolutionInn App