Question: This is php programming Using either MariaDB or MySQL, complete the below assignment. MariaDB was installed as part of XAMPP. The class web server is

This is php programming

Using either MariaDB or MySQL, complete the below assignment. MariaDB was installed as part of XAMPP. The class web server is running a MySQL server. Both MariaDB and MySQL use the exact same SQL commands.

In this project, you will create a database to contain tables of batting statistics for major league baseball teams. You will then create a table named teamstatistic in the baseballteams database and add records to the new table.

1. Log in to MySQL or MariaDB Database server on your local computer with the root account.

Open the XAMPP Control Panel

Start the MySQL Server

Open Shell from XAMPP Control Panel

Type In: mysql -u root -p

Press Enter

2. Enter the following command to create a database named baseballteams:

CREATE DATABASE baseballteams;

3. After you see the Query OK message, enter the following command to select the baseballteamsdatabase:

USE baseballteams;

4. After you see the Database changed message, type the following command to ensure that you selected the baseballteams database:

mysql> SELECT DATABASE();

5. Now create the team create the team statistic table using the below table fields and data types. Optional: Additional baseball team statistics fields can be added (Runs, HomeRun, AtBat, Players, etc)

TeamName - VARCHAR data type.

Game - INT data type

Wins - INT data type

Loses - INT data type

Pnnts - INT data type

CREATE TABLE teamstatistic (TeamName VARCHAR(50), Game INT, Wins INT, Loses INT, Pnnts INT);

6. After you see the Query OK message, enter the following command to display the structure of the new table:

mysql> DESCRIBE teamstatistic;

7. Insert 10 records of Baseball Team statistics. Check https://www.baseball-reference.com/teams/ (Links to an external site.)Links to an external site. for current baseball team statics.

Example:

INSERT INTO teamstatistic (TeamName, Game, Wins, Loses, Pnnts) VALUES ("Boston Red Sox", 18295, 9429, 8783, 13);

8. View all records in table teamstatistic

SELECT * FROM teamstatistic;

Submit a screenshot of Step 8 output after 10 records have been added

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!