Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me with SQL commands please Create a script called database.sql This script will create a database with the following naming convention USERNAME_NODE i.e roary001_node001

Help me with SQL commands please

  1. Create a script called database.sql
  2. This script will create a database with the following naming convention USERNAME_NODE i.e roary001_node001

MariaDB> show databases; +--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| roary001_node001 |

+--------------------+

  1. Create a script called tables.sql

  1. This script will create the following tables [ countries, sports, athletes ] with the following naming convention USERNAME_NODE_TABLE_NAME i.e roary001_countries MariaDB> show tables; +------------------------------------+

| Tables_in_roary001_node001 |

+------------------------------------+

| roary001_node001_athletes |

| roary001_node001_countries |

| roary001_node001_sports |

+------------------------------------+

  1. Each of the tables must contain a single column with the following convention USERNAME_name i.e roary001_name. You must configure column USERNAME_name data type to be varchar(50). No additional requirements or indexes are to be added to the table. The command below shows the end product of the countries table. MariaDB> describe roary001_countries; +----------------------+--------------+------+-----+---------+------+

| Field | Type | Null | Key | Default | Extra|

+----------------------+--------------+------+-----+---------+------+

| roary001_sports_name | varchar(50) | YES | | NULL | |

+----------------------+--------------+------+-----+---------+------+

  1. Create the following scripts countries.sql, athletes.sql** and sports.sql
  2. Each script will populate the corresponding table with the data from your CSV.
  3. Data needs to be sorted alphabetically and can not contain duplicates.
  4. Data will be broken by the following filter so that each node contains different records.

CentOS

olympic

Ubuntu

All 1k Users

Fedora

paralympic

* For the athletes.sql script make sure to combine firstname+' '+lastname into the roary001_atheletes_name column

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

Does it use a maximum of two typefaces or fonts?

Answered: 1 week ago