1. You are creating a database named NewDB. The database uses the server's default character. What SQL statement should you use to create the database? 2. You are creating a table in a MYSQL database from previous number. The table is named Bikes and includes two columns: BikelD and BikeName. The BikelD column must uniquely identify each row in the table, and values must be automatically assigned to each row. The BikeName column must include a descriptive name for each model of bike. The names vary in length but should never exceed 40 characters. What SQL statement should you use to create the table? 3. Write a SQL statement to insert the given data into the table countries against each column. Id Country Malaysia 1 2 Thailand 3 Mongolia Georgia Turkmenistan 4 5 6 Philippines 7 Israel Here in the following is the structure of the table "countries". | Field I Type | Null | Key | Default | Extra | | COUNTRY_ID | COUNTRY_NAME | varchar(40) | VES I | VES I varchar(2) | MULL NULL

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 10E
icon
Related questions
Question

SUBJECT/TOPIC: MySQL Database Management System (xampp)

PLEASE ANSWER THIS WITH COMPLETE EXPLANATION AND SOLUTION. 

ASSESSMENT TASK MySQL Database Management System (xampp)

1. You are creating a database named NewDB. The database uses the server's
default character. What SQL statement should you use to create the database?
2. You are creating a table in a MYSQL database from previous number. The table is
named Bikes and includes two columns: BikelD and BikeName. The BikelD
column must uniquely identify each row in the table, and values must be
automatically assigned to each row. The BikeName column must include a
descriptive name for each model of bike. The names vary in length but should
never exceed 40 characters. What SQL statement should you use to create the
table?
3. Write a SQL statement to insert the given data into the table countries against each
column.
Id
Country
1 Malaysia
2
Thailand
3
Mongolia
4
Georgia
5
Turkmenistan
95
6 Philippines
7
Israel
Here in the following is the structure of the table "countries".
| Field
1 Туре
| Null | Key | Default | Extra |
| COUNTRY_ID
COUNTRY_NAME | varchar(40)
| varchar(2)
| VES I
YES |
NULL
NULL
Transcribed Image Text:1. You are creating a database named NewDB. The database uses the server's default character. What SQL statement should you use to create the database? 2. You are creating a table in a MYSQL database from previous number. The table is named Bikes and includes two columns: BikelD and BikeName. The BikelD column must uniquely identify each row in the table, and values must be automatically assigned to each row. The BikeName column must include a descriptive name for each model of bike. The names vary in length but should never exceed 40 characters. What SQL statement should you use to create the table? 3. Write a SQL statement to insert the given data into the table countries against each column. Id Country 1 Malaysia 2 Thailand 3 Mongolia 4 Georgia 5 Turkmenistan 95 6 Philippines 7 Israel Here in the following is the structure of the table "countries". | Field 1 Туре | Null | Key | Default | Extra | | COUNTRY_ID COUNTRY_NAME | varchar(40) | varchar(2) | VES I YES | NULL NULL
1. You are creating a SELECT statement that retrieves data from the CDs
table. Your query results should include values from the CDName, InStock,
OnOrder, and Reserved columns. In addition, the results should include all
rows in the table. What SELECT statement should you create?
2. You want to modify the SELECT staternent that you created in Assessment
No. 1 so that the result set includes an additional column. The column
should add the values of the InStock and OnOrder columns and then
subtract the value in the Reserved column. You want to assign the Total
alias to the new column. What SELECT statement should you create?
3. Your next step is to modify the SELECT statement that you created in
Assessment No. 2. You plan to limit the rows returned to those rows that
121
have a Department value of Classical and an InStock value less than 20.
What SELECT statement should you create?
4. You now want to create a SELECT statement that summarizes data in the
CDs table. The result set should include data that is grouped together by
the Department column and then by the Category column. The summary
information should include the number of rows for each category, as well as
totals for all categories in each department. In addition, the summary
column in the result set should be assigned the alias Total, and all grouped
columns should be sorted in ascending order. What SELECT statement
should you create?
5. You now want to modify the SELECT statement that you created in
Assessment No. 4 to limit the rows returned to those with a Total value less
than 3. What SELECT statement should you create?
6. You are creating a SELECT statement that retrieves data from the CDs
table. Your query results should include values from the CDName column.
The values should be sorted in descending order. What SELECT statement
should you create?
Transcribed Image Text:1. You are creating a SELECT statement that retrieves data from the CDs table. Your query results should include values from the CDName, InStock, OnOrder, and Reserved columns. In addition, the results should include all rows in the table. What SELECT statement should you create? 2. You want to modify the SELECT staternent that you created in Assessment No. 1 so that the result set includes an additional column. The column should add the values of the InStock and OnOrder columns and then subtract the value in the Reserved column. You want to assign the Total alias to the new column. What SELECT statement should you create? 3. Your next step is to modify the SELECT statement that you created in Assessment No. 2. You plan to limit the rows returned to those rows that 121 have a Department value of Classical and an InStock value less than 20. What SELECT statement should you create? 4. You now want to create a SELECT statement that summarizes data in the CDs table. The result set should include data that is grouped together by the Department column and then by the Category column. The summary information should include the number of rows for each category, as well as totals for all categories in each department. In addition, the summary column in the result set should be assigned the alias Total, and all grouped columns should be sorted in ascending order. What SELECT statement should you create? 5. You now want to modify the SELECT statement that you created in Assessment No. 4 to limit the rows returned to those with a Total value less than 3. What SELECT statement should you create? 6. You are creating a SELECT statement that retrieves data from the CDs table. Your query results should include values from the CDName column. The values should be sorted in descending order. What SELECT statement should you create?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning