A continuation of my previous question: Part 1 Use the mysqldump command line to
ID: 3716492 • Letter: A
Question
A continuation of my previous question:
Part 1
Use the mysqldump command line tool to backup the data in your database.
To access the mysqldump tool, start the mysql client command line tool.
Use the quit command to exit to the system command prompt.
Run mysqldump and direct the output of the backup to an appropriately named file on the U: drive (mapped to the My Files folder). Data saved to other locations will be lost!
Use the File Transfer button on the top side of the Toolwire desktop window to download the backup file for submission with your assignment.
Create a new database and restore the database from the backup to the new database. Submit a screen shot to document the restoration of the data to a new database.
This part might not be doable but I'm hoping it is because I am completely lost and just need to get through 2 more weeks and this class will be over
Normalizing Data for Data Entry Assume the following table structure MariaDB [ (none) ]> describe test.members; I Fielcd | Type | Null I Key I Default l Extra I I int (11) I varchar (30) I YESI IDNumber I NO I PRI | NULL LastName | FirstName Ivarchar (30) YES | Emai.1 | MemberSince date NULL NULL NULL NULL I varchar (50) IYES I YES I 5 r?ws in set (0.01 sec) You should create this table using the following SQL: CREATE TABLE members ( IDNumber LastName FirstName Email MemberSince DATE INT PRIMARY KEY VARCHAR (30), VARCHAR (30), VARCHAR (50), You should clean up and normalize the following data found in various sources. After normalizing the data, write and run SQL INSERT statements to enter the rows into the database table that you created above. In a brief paper, describe the process for normalizing the data and why you made the changes that you did.Explanation / Answer
1. To access the mysqldump tool, start the mysql client command line tool.
locate the mysql installation directory and go into the bin and trigger below command
mysql -u root -p [For login into mysql]
2. Use the quit command to exit to the system command prompt.
quit
3. Run mysqldump and direct the output of the backup to an appropriately named file on the U: drive (mapped to the My Files folder). Data saved to other locations will be lost!
mysqldump -uroot -p database -r U:database-dump.sql [For taking a backup/dump of database into a file. I have taken database name as database as it is not mentioned in the question.]
4. Use the File Transfer button on the top side of the Toolwire desktop window to download the backup file for submission
Use the File transfer application Toolwire to download the backup file[Not mentioned what to do in the question]
5. Create a new database and restore the database from the backup to the new database. Submit a screen shot to document the restoration of the data to a new database.
CREATE DATABASE new_database; [Create a new database with name as new_database as nothing ismentioned in question]
mysql -u username -p new_database < database-dump.sql [dumping the sql file into the new database]
Part 2
Create 3 new tables for your volunteer database to hold the street address, phone number, and email address for each volunteer. Insert the relevant data for the volunteers in these tables. Modify the Person table to remove the columns for the data moved to separate tables.
[Creating the new tables as mentioned in question for volunteer database]
use volunteer;
create table Address
(
houseNo number,
streetName varchar(20),
city varchar(20),
state varchar(20),
pincode number
)
create table PhoneDetails
(
phoneNumber number
)
create table email
(
emailAddress
)
alter table Person drop column Address,Phone,Email; [Removing the columns from Person table]
Part 3
In a brief (2–3-page) paper, discuss why the tables created above for addresses, phone numbers, and email addresses are a better way to organize the data. Describe the structure of the tables that you added
[This will remove composite attributes from our existing table and help us in normalizing the table further helping in efficiency in handling the SQL queries.]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.