Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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.
Step by Step Solution
★★★★★
3.45 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
I can provide you with SQL statements for creating tables and queries but I cant generate actual screenshots for you You can execute these SQL statements in your preferred database management system t...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started