questionconfiguring a databasethere are two parts


Question

Configuring a Database

There are two parts to this work. The first part is to generate a database and some tables which will be appropriate for Batty League Flea Market. That portion of the assignment has to be completed from MySQL console command line. The second part of the assignment is to write down a PHP script which will show information about the database tables created in the first part and save that information in a file. A complete submission will include both the script - solution07.php - and the text file generated by the script - solution07.txt.

Use command-line interface to create a new user named "script" for your database. Grant that user all permissions on everything controlled by DBMS.

Create a database named "fleamarket".

Within that database, create two tables:

The first table should be named "items". Give it three fields:

VARCHAR of length 10 named "itemID"
FLOAT named "itemPrice"
VARCHAR of length 30 named "description"
The second table should be named "sales". Give it five fields:
VARCHAR of length 10 named "itemID"
FLOAT named "itemPrice"
VARCHAR of length 10 named "firstName"
VARCHAR of length 10 named "lastName"
DATE named "purchaseDate"

generate a script file named solution07.php. Within that script, connect to your DBMS using the "script" identity. Select the "fleamarket" database, and then obtain a listing of tables.

Apply the file-creation techniques we learned in previous classes to save the results of your queries into a file named solution07.txt.

Submit both solution07.php and solution07.txt.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: questionconfiguring a databasethere are two parts
Reference No:- TGS0445007

Expected delivery within 24 Hours