CIS 331 – Database Management Using SQL
Week 6 Homework - Due: Week 7
Name ¬¬¬
1. Review Questions – page 207 (A Guide to MySQL – Chapter 7)
Questions 1 - 19 (type out the answers)
2. Premier Products – pages 207 - 209 (A Guide to MySQL – Chapter 7) Exercises 1 – 9 (create in MySQL)
Except where indicated, use MySQL Query Browser to perform each operation and print the results.
3. Henry Books – pages 209 (A Guide to MySQL – Chapter 7) Exercises 1 – 9 (create in MySQL)
Except where indicated, use MySQL Query Browser to perform each operation and print the results.
Estimated Completion Time: ___________ Comments: _______________________________
Lab Assignment Grade:
…show more content…
NUM = ORDER_LINE.ORDER_NUM AND PRICE > 100;
+----------+----------------+-----------+--------------+
| PART_NUM | DESCRIPTION | ORDER_NUM | QUOTED_PRICE |
+----------+----------------+-----------+--------------+
| DR93 | Gas Range | 21610 | 495.00 |
| DW11 | Washer | 21610 | 399.99 |
| KL62 | Dryer | 21613 | 329.95 |
| KT03 | Dishwasher | 21614 | 595.00 |
| BV06 | Home Gym | 21617 | 794.95 |
| CD52 | Microwave Oven | 21617 | 150.00 |
| DR93 | Gas Range | 21619 | 495.00 |
| KV29 | Treadmill | 21623 | 1290.00 |
+----------+----------------+-----------+--------------+
8 rows in set (0.00 sec)
mysql> CREATE VIEW ORDER_TOTAL AS -> SELECT ORDERS.ORDER_NUM, SUM(NUM_ORDERED * QUOTED_PRICE) AS TOTAL_AMOUNT FROM ORDERS, ORDER_LINE WHERE ORDERS.ORDER_NUM = ORDER_LINE.ORDER_NUM GROUP BY ORDERS.ORDER_NUM -> ORDER BY ORDER_NUM;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT ORDER_NUM, TOTAL_AMOUNT FROM ORDER_TOTAL WHERE TOTAL_AMOUNT > 1000;
+-----------+--------------+
| ORDER_NUM | TOTAL_AMOUNT |
+-----------+--------------+
| 21613 | 1319.80 |
| 21614 | 1190.00 |
| 21617 | 1589.90 |
| 21623 | 2580.00 |
+-----------+--------------+
4 rows in set (0.00 sec)
mysql> SELECT ORDERS.ORDER_NUM, SUM(NUM_ORDERED * QUOTED_PRICE) AS T.TOTAL_AMOUNT FROM
Step 2. Data Analysis: The data will be analyzed to determine database modeling. Step 3. Database normalization: Fields and
Q 1: Perform Verify and Count Commands for all three tables and identify any exceptions.
In order to complete this task, I will need the data that needs to be inserted into the table, and how the information will be used.
- Tables are useful in showing relationships and making comparisons. They should have title, row, column headings, population, source and explanations.
The lab begins with a simple example of query development using Access; then, evolves to more complex queries which the student should perform after completing the first exercise. The student can create a query with the wizard, with query design view, or with SQL statements. The Northwind database will be used again in this lab.
in the tables. I then came to a solution that worked for most tables but not all,
To answer each question, darken the circle corresponding to your answer using a pencil. If you decide to change your answer, please erase your original answer completely and darken your new answer.
Database interface's SQL editor provides an easy and efficient way to write and test scripts and queries. And its powerful data grid provides an easy way to view and edit data related to any DBMS/RDBMS tools.
After above 5 steps are done, create/initialize the database by adding tuples in appropriate fields.
format and submit it to the course canvas. This covers SQL Part A (Chapters 2,8&
|Company |Symbol |# of shares purchased |Total Value at Purchase ($) |Current Total Value ($) |Net + or - ($) |
The database I made is pretty much error free.
With advances in technology constantly happening, it can be hard to keep up with all of the latest trends. If organizations cannot keep up with the latest trends, it can lead to flaws in their security. Any flaws in security can have a detrimental effect on an organization’s database. Almost every organization has some sort of database, whether it is for maintaining customers, inventory, or vital information.
Select one or more tables or queries and then click Add. After you have finished adding tables and queries to the Relationships document tab, click Close.