CC Data Base Management Project
Description
Part 3 – Create a single SQL script file that will create your database in MySQL and meet the following criteria:
- Name your database: a00254112case2 (replace a00000000 with your student number.)
- Delete your database if it exists before beginning.
- Create the database, tables, columns, primary keys, foreign keys, relationships, and constraints.
- Your database must utilize appropriate data types, relationships, and constraints.
- All tables must start with a primary key that is an auto-incrementing integer.
- All foreign keys must be integers with appropriate relationship constraints.
- Tables and columns should use camel case, no underscores, spaces, etc… as well as follow the instructions from Case 1.
- Tables should be plural.
- Table columns should begin with a primary key, followed by foreign keys, and then remaining columns after that.
- Example of capitalization / naming: A table named Employees would have a primary key of EmployeeId.
Part 4 – Create a single SQL script file that populates your database with realistic sample data.
- Your database should contain at least ten records of equipment / items that have actually been featured on the YouTube channel.
- The equipment / items table must contain at minimum, real and accurate data for at least the following attributes:
- Product name.
- Manufacturer name.
- Date of manufacturer.
- Original retail sale price at time of manufacturer.
- URL of the TechMoan YouTube video in which the item was featured.
- All remaining tables should contain at least five rows of data each and the information contained within these rows must seem as realistic / plausible as possible, but they do not need to be entirely accurate (realistic examples).
- All rows must have an auto-incremented integer primary key.
- All foreign keys must have appropriate and valid values as per the relationships you have defined.
Part 5 – Create a single SQL script file that contains THREE (3) separate SQL SELECT queries that meet the following requirements.
- Each of the queries must be useful to the YouTube channel’s creator in a realistic way.
- Each of the queries must be accompanied by a 50 word description that explains the purpose of the query and how the use of the query will positively benefit the YouTube creator TechMoan. The description should be included inside the SQL script file as a multi-line comment (https://www.w3schools.com/sql/sql_comments.asp).
You may create your queries as you see fit using your own creativity. However, they must meet the following minimum criteria:
- Query 1
- Include at least six columns that are selected from at least two different tables using an inner or an outer join.
- Display a date in the following format: January 1, 2020.
- Use aliases for all tables.
- Sort the results by one of the columns in ascending order.
- Query 2
- Include at least eight columns that are selected from at least three different tables using an inner or an outer join.
- All eight columns must use an alias that would be appropriate for a professional looking report. Example: FirstName AS “First Name”
- Use the ROUND function at least once.
- Use at least one additional non-aggregate function of your choice (excluding functions whos purpose is to round a number or format a date).
- Sort the results by one of the columns in descending order.
- Query 3
- Include at least four columns that are selected from at least two different tables using an inner or an outer join.
- All four columns must use an alias that would be appropriate for a professional looking report. Example: FirstName AS “First Name”
- Use at least two non-aggregate functions of your choice (excluding functions whos purpose is to round a number or format a date).
- Use at least one aggregate function in combination with a GROUP BY.
- Sort the results by one of the columns in ascending order.
Submission
Your diagram should be submitted as a PDF, PNG, or JPEG file that looks professional, visually appealing, and meets the criteria listed above. You can use any diagram tool / software you want to use.
You should submit three separate SQL script files that have the following file names and contain the SQL code described by its file name.
- A00254112 – Case 2 – Part 3.sql
- A00254112 – Case 2 – Part 4.sql
- A00254112 – Case 2 – Part 5.sql
When executed in the order shown above, each SQL file should execute properly without errors.
Marks
Marks will be awarded on your ability to meet the criteria of the details listed above. Marks will also be awarded based on the professionalism, visual appeal, accuracy, and completeness of your submissions.
.
References
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."