Question

Create a new MySQL database called "players". Create a user for your database named "Jane". Jane...

Create a new MySQL database called "players". Create a user for your database named "Jane". Jane is a new employee who, in your challenge, will create a new table called "phillies". This table will hold 1 record only. This record is a description of Jane's favorite sports team, the Philadelphia Phillies. She needs to input the following data for her favorite player, Cole Hamels: Be sure to consider which data types you should use for each data point that needs to be saved into the new database table.

  • Player's name
  • Player's number (#35)
  • Player's position (starting left-handed pitcher)
  • Player's ERA (3.6)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is how I have done this.

1.Using the phpmyadmin interface of the xampp tool , I have created a new MySQL database and named "players".

2. To add a new user, go to the database-> Privileges->new->Add user and then add user by providing the name , password and specifying his privileges. In this case, the username is Jane and the password can be anything of your choices. Check the boxes you wish to grant the permissions for.

3. Next, we go to the newly created database and add a table named "phillies" with number of columns as 4.

I have chosen the data types as shown in the figure. Note that the player number is the primary key over here

Table name: phillies Add 1 Name Type Length/Values VARCHAR 30 name INT number VARCHAR position 50 DOUBLE ERA

After creating the table, you can now insert the values into the table either by using the GUI or the SQL code.The code for the create table and insert statement has been provided below:

CREATE TABLE IF NOT EXISTS `phillies` (
`name` varchar(30) NOT NULL,
`number` int(11) NOT NULL,
`position` varchar(50) NOT NULL,
`ERA` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `phillies`
--

INSERT INTO `phillies` (`name`, `number`, `position`, `ERA`) VALUES
('Cole Hamels', 35, 'starting left-handed pitcher', 3.6);

Add a comment
Know the answer?
Add Answer to:
Create a new MySQL database called "players". Create a user for your database named "Jane". Jane...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write code for mySQL 1) create a new one database ; to create your table 2)...

    Write code for mySQL 1) create a new one database ; to create your table 2) Every table should have a primary key 3) Table relationship has to be based on foreign key and shown within your physical table 4) Insert 5 data records in every table 9) Create a database view that return result set of all record and all columns within all 6 table

  • Using the MySQL Workbench create a new database using your design specifications Add at least 10...

    Using the MySQL Workbench create a new database using your design specifications Add at least 10 records to your tables. Note: Certain tables may not require 10 records and that is ok as long as your main tables have 10 or more Create MySQL statements that will retrieve all records or rows from the tables in your database Create 10 MySQL statements that will retrieve specified records or rows from one table in your database Create 10 MySQL statements that...

  • Your team of consultants has been hired to create a database for MD Employment Agency (MDEA)....

    Your team of consultants has been hired to create a database for MD Employment Agency (MDEA). MDEA is an employment agency that contracts with the city of Miami, FL to assist displaced workers in finding new career opportunities and to help workers currently collecting unemployment benefits. Up to this point MDEA has been using standalone PCs to handle data entry of new clients and to update their status. The company also has relationships with local government agencies that have openings...

  • SQL: The schema name should be mxxws, where mxx is your MySQL user name. To refresh...

    SQL: The schema name should be mxxws, where mxx is your MySQL user name. To refresh your memory – here is the schema for that database: Create the rest of the contact management database by writing the statements that do each of the following items below. For each one: (1) execute them on your copy of the database, and (2) write the statements in the space: Statement to create the Contact table (one statement) Statement to create the Employee table...

  • Create three or more MySQL Data Control language (DCL) Statements using the Youth League Database. 1....

    Create three or more MySQL Data Control language (DCL) Statements using the Youth League Database. 1. A Create new user statement for the database 2. A statement that grants privileges to the new user 3. A statement that revokes privileges 1. A SQL Text File containing the SQL commands to create the database, create the table, and insert the sample test data into the table. 2. A SQL Text File containing the DCL SQL Statements. eted hemas Untitled Limit to...

  • And there was a buy-sell arrangement which laid out the conditions under which either shareholder could...

    And there was a buy-sell arrangement which laid out the conditions under which either shareholder could buy out the other. Paul knew that this offer would strengthen his financial picture…but did he really want a partner?It was going to be a long night. read the case study above and answer this question what would you do if you were Paul with regards to financing, and why? ntroductloh Paul McTaggart sat at his desk. Behind him, the computer screen flickered with...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT