100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

INF3707 Assignment 1 solution 2025

Rating
5,0
(1)
Sold
9
Pages
6
Uploaded on
15-03-2025
Written in
2024/2025

Question 1 First things first, before you start with your assignment, make sure that your MySQL server and MySQL Workbench are installed and working. The prescribed book provides the procedures for doing this in appendix A (Windows) and B (macOS). The appendices were uploaded to Additional Resources on myUnisa. Secondly, on myUnisa, under Additional Resources, download the folder mgs_ex_starts, it contains some script files that you need for this assignment and other assignments, 2, 3 and 4. In the mgs_ex_starts folder, use the script file create_my_guitar_ to create the My Guitar Shop database. After running the scripts, the Output window displays messages that indicate whether the script was executed successfully. Take the screenshot, and paste it on your answer sheet to show that the database is installed correctly. The screenshot should show the My Guitar Shop database schema on your Workbench. View the data contained in the Categories table. To view the Categories table data, run a select query. Take the screenshot of the query and the output, and paste it on your answer sheet. Navigate through the database objects and view the column definition for the Categories table. Take the screenshot of the column definition and paste it on your answer sheet. Write a SELECT statement that returns four columns from the Products table: product_code, product_name, list_price, and discount_percent. Add an ORDER BY clause to this statement to sort the result by list_price in descending order. Take the screenshot of the query and the output and paste it on your answer sheet. Write a SELECT statement that returns the product_name and list_price columns from the Products table. Return one row for each product that has the same list price as another product. Hint: Use a self-join to check that the product_id columns aren't equal but the list_price columns are equal. Order the output by the product_name column. Take the screenshot of the query and the output and paste on your answer sheet

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
March 15, 2025
Number of pages
6
Written in
2024/2025
Type
Other
Person
Unknown

Subjects

Content preview

INF3707 ASSIGNMENT 1 2025
SOLUTION

, Question 1
First things first, before you start with your assignment, make sure that your MySQL
server and MySQL Workbench are installed and working. The prescribed book provides
the procedures for doing this in appendix A (Windows) and B (macOS). The appendices
were uploaded to Additional Resources on myUnisa. Secondly, on myUnisa, under
Additional Resources, download the folder mgs_ex_starts, it contains some script files
that you need for this assignment and other assignments, 2, 3 and 4. In the
mgs_ex_starts folder, use the script file create_my_guitar_shop.sql to create the My
Guitar Shop database. After running the scripts, the Output window displays messages
that indicate whether the script was executed successfully. Take the screenshot, and
paste it on your answer sheet to show that the database is installed correctly. The
screenshot should show the My Guitar Shop database schema on your Workbench. (10
marks)




Explanation of what the script does:
This script creates the my_guitar_shop database in these steps:
1.​ Database Initialization
Drops any existing database named my_guitar_shop to start fresh.
Creates a new database my_guitar_shop and selects it for use.
2.​ Table Creation with the following tables:
Categories: Stores product categories (e.g., Guitars, Basses).
Products: Lists items for sale, linked to categories via category_id.
Customers: Contains customer details, including email and passwords (hashed).
Addresses: Stores customer addresses, linked to customers.

Reviews from verified buyers

Showing all reviews
8 months ago

5,0

1 reviews

5
1
4
0
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CrystalIndigo University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
486
Member since
5 year
Number of followers
226
Documents
73
Last sold
2 months ago
CrystalIndigo Solutions

providing all solutions to all computer science modules

4,1

51 reviews

5
27
4
13
3
6
2
1
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions