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...


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<br>default character. What SQL statement should you use to create the database?<br>2. You are creating a table in a MYSQL database from previous number. The table is<br>named Bikes and includes two columns: BikelD and BikeName. The BikelD<br>column must uniquely identify each row in the table, and values must be<br>automatically assigned to each row. The BikeName column must include a<br>descriptive name for each model of bike. The names vary in length but should<br>never exceed 40 characters. What SQL statement should you use to create the<br>table?<br>3. Write a SQL statement to insert the given data into the table countries against each<br>column.<br>Id<br>Country<br>1 Malaysia<br>2<br>Thailand<br>3<br>Mongolia<br>4<br>Georgia<br>5<br>Turkmenistan<br>95<br>6 Philippines<br>7<br>Israel<br>Here in the following is the structure of the table

Extracted 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<br>table. Your query results should include values from the CDName, InStock,<br>OnOrder, and Reserved columns. In addition, the results should include all<br>rows in the table. What SELECT statement should you create?<br>2. You want to modify the SELECT staternent that you created in Assessment<br>No. 1 so that the result set includes an additional column. The column<br>should add the values of the InStock and OnOrder columns and then<br>subtract the value in the Reserved column. You want to assign the Total<br>alias to the new column. What SELECT statement should you create?<br>3. Your next step is to modify the SELECT statement that you created in<br>Assessment No. 2. You plan to limit the rows returned to those rows that<br>121<br>have a Department value of Classical and an InStock value less than 20.<br>What SELECT statement should you create?<br>4. You now want to create a SELECT statement that summarizes data in the<br>CDs table. The result set should include data that is grouped together by<br>the Department column and then by the Category column. The summary<br>information should include the number of rows for each category, as well as<br>totals for all categories in each department. In addition, the summary<br>column in the result set should be assigned the alias Total, and all grouped<br>columns should be sorted in ascending order. What SELECT statement<br>should you create?<br>5. You now want to modify the SELECT statement that you created in<br>Assessment No. 4 to limit the rows returned to those with a Total value less<br>than 3. What SELECT statement should you create?<br>6. You are creating a SELECT statement that retrieves data from the CDs<br>table. Your query results should include values from the CDName column.<br>The values should be sorted in descending order. What SELECT statement<br>should you create?<br>

Extracted 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?
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here