Using Northwind Mysql : https://mega.nz/#!w2YhibDI!DOf6WnahRRSPC0Y5wkYKu9FRQXPwl
ID: 3887806 • Letter: U
Question
Using Northwind
Mysql : https://mega.nz/#!w2YhibDI!DOf6WnahRRSPC0Y5wkYKu9FRQXPwlmANqvxGQ9UosCo
sql server : https://mega.nz/#!gqpRjLjQ!qdRvcO1jdzpbiHWwgqBuShqT_iCSWQIsPtpyz-_U6sU
Comment each query
1.Create a customer contacts table that lists customer employees, their job titles, email addresses, phone numbers, twitter handles, and linked-in profile. Create a primary key constraint and a foreign key constraint and on delete cascade
2.Populate the customer contacts table
3.Create a new table for customer interactions where you will keep track of all customer contacts showing the customer contact, the date, the method of contact, a memo of what happened, and a future action with a date, if appropriate. Limit the method of contact to a list.
4.Populate the table with at least 20 contacts with 5 of them requiring future actions.
5.Show a list of past contacts by customer
6.Show a list of future actions required
7.Show a list of orders with shipper's name.
8.show a list of orders with employee names
9.show a list of orders with the highest revenue product (name the product)
10.show a list of employees with sales amounts and customer names
Explanation / Answer
[CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name, ...) REFERENCES tbl_name (index_col_name,...) [ON DELETE reference_option] [ON UPDATE reference_option] reference_option: RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.