Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INTRODUCTION You will be writing another SQL script. The script should work with the BabyName database, so it will need the appropriate USE statement. Test

image text in transcribed

INTRODUCTION You will be writing another SQL script. The script should work with the BabyName database, so it will need the appropriate USE statement. Test each of the SQL statements required for the below, and then put them into the script, making sure to comment each one. Include your name, zid, and section in each of the files you submit. This is a fairly large database, so it is recommended that you add LIMIT 50 to your SQL statements when testing, to prevent a nigh-neverending cascade of text from needing to be downloaded. Your script must do each of the following: 1 Select the BabyName database. 2 Show all of the tables in the database. * Show all of the columns and their types for each table in the database. Show all of the names from your birth year. Each name must be shown only once. Show all of the years (once only) where your first name appears. Some people's names may not be present in the database. If your name is one of those, then use Chad' if you are male, or Stacy' if you are female. If you don't feel you fit into one of those, feel free to use 'Pat'. Display the most popular male and female names from the year 1984. List how many different names there are for each place. Show all the information available about names similar to your name (or the one you adopted from above), sorted in alphabetical order by name, then, within that, by count, and finally, by the year. Show how many names there were in the year 1974. 10 Show how many rows there are in the table. 11 Show how many names are in the table for each sex from the year 1962. WHAT TO TURN IN? Submit, through Blackboard, the following: The SQL script that accomplishes the above task. (You can run scripts in MariaDB using the \. command in the client.) The output yielded by having MariaDB run the script, in a text file. (You can log the output using the \t command in the MariaDB client.) INTRODUCTION You will be writing another SQL script. The script should work with the BabyName database, so it will need the appropriate USE statement. Test each of the SQL statements required for the below, and then put them into the script, making sure to comment each one. Include your name, zid, and section in each of the files you submit. This is a fairly large database, so it is recommended that you add LIMIT 50 to your SQL statements when testing, to prevent a nigh-neverending cascade of text from needing to be downloaded. Your script must do each of the following: 1 Select the BabyName database. 2 Show all of the tables in the database. * Show all of the columns and their types for each table in the database. Show all of the names from your birth year. Each name must be shown only once. Show all of the years (once only) where your first name appears. Some people's names may not be present in the database. If your name is one of those, then use Chad' if you are male, or Stacy' if you are female. If you don't feel you fit into one of those, feel free to use 'Pat'. Display the most popular male and female names from the year 1984. List how many different names there are for each place. Show all the information available about names similar to your name (or the one you adopted from above), sorted in alphabetical order by name, then, within that, by count, and finally, by the year. Show how many names there were in the year 1974. 10 Show how many rows there are in the table. 11 Show how many names are in the table for each sex from the year 1962. WHAT TO TURN IN? Submit, through Blackboard, the following: The SQL script that accomplishes the above task. (You can run scripts in MariaDB using the \. command in the client.) The output yielded by having MariaDB run the script, in a text file. (You can log the output using the \t command in the MariaDB client.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions