Question

Through the remaining assignments due in this course, you will be creating a simple database for...

Through the remaining assignments due in this course, you will be creating a simple database for tracking information about volunteers working and raising money for a community organization. This assignment requires that you create the initial table, called PERSON, to hold basic information about volunteers. You will be redefining the design and building the database in the upcoming unit assignments.

1.Use the mysqldump.exe command line tool to backup the data in your volunteer database.

  • To access the mysqldump.exe tool, start the MySQL command line tool.
  • Use the quit command to exit to the system command prompt.
  • Run mysqldump.exe and direct the output of the backup to an appropriately named file.
  • Create a new database and restore the database from the backup to the new database. Submit a screenshot to document the restoration of the data to a new database.

2. Write SQL CREATE TABLE statements and run them to create three new tables (ADDRESS, PHONE, AND EMAIL) to split out the contact information for your volunteers that is currently contained in the PERSON table.

  • Each table should have a unique primary key and foreign key constraint reference to the PERSON table.

3.After creating the new tables (in Step 2), write and run SQL to insert the relevant data for the volunteers in the new tables.

4.Modify the PERSON table using the ALTER TABLE statement to remove the columns for the data moved to the new tables.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

2.) CREATE TABLE phno(
firstname varchar[30],
phoneno int NOT NULL,
primary key (phoneno));
CREATE TABLE address (
apartmentno int,
line1 varchar[30],
line2 varchar[30],
landmark varchar[30],   
pin int,
foreign key (phoneno) references phno (phoneno) );
CREATE TABLE email (
fname varchar[30],
email varchar[40],
foreign key (phoneno) references phno (phoneno) );
3.) for table person
insert into person values('Rahul','sharma','Male',9139876587);
insert into person values ('James','charles','Male',8976057768);
insert into person values ('Surbhi','Jyoti','Female',7094351762);
OUTPUT:
Rahul|9139876587
James|8976057768
Surbhi|7094351762
for table address
insert into address values(20,'Shantivan Society','Lonavala','Railway Crossing',410401,8976057768);
insert into address value(42,'XYA housing society','Mumbai','near infinity mall',410099,9139876587);
insert into address values(72,'Bagh no 3','Lucknow','Hyundai showroom',226023,7094351762);
OUTPUT:
20|Shantivan Society|Lonavala|Railway Crossing|410401|8976057768
42|XYA housing society|Mumbai|near infinity mall|410099|9139876587
72|Bagh no 3|Lucknow|Hyundai showroom|226023|7094351762
for table email
insert into email values ('rahul','rahul123',9139876587);
insert into email values ('Surbhi','sjyoti45',7094351762);
insert into email values('james','jc5647',8976057768);
OUTPUT:
rahul|rahul123|9139876587
Surbh|sjyoti45|7094351762
james|jc5647|8976057768
4.) Alter table person
drop column col1,col2,.....;
(Please write the column names in the database to be deleted in place of col1,col2.... Since I don't know the column name in person table so I couldn't write them).

Add a comment
Know the answer?
Add Answer to:
Through the remaining assignments due in this course, you will be creating a simple database for...
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
  • Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y dat...

    Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y database (based on the homework assignment 2) 3 IPage 1. For each department whose average employee salary is more than $30,000, write a SQL statement to retrieve the department name and the number of employees working for that department 2. Write a SQL statement to retrieve first name, last name, and address of each employee who lives in Houston, TX. 3. Write a...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

  • A Pages entity in a relational database for tracking web browsing has the following attributes: PageID (the primary key, an integer number, required), PageURL (text, maximum 255 characters, required),...

    A Pages entity in a relational database for tracking web browsing has the following attributes: PageID (the primary key, an integer number, required), PageURL (text, maximum 255 characters, required), IPAddress (text, maximum 15 characters, required), ViewDateTime (date and time the page was viewed, required). (a) Write an SQL Data Definition Language command to create the table for this entity. (b) Write an SQL Data Definition Language command to add a column for a new attribute to this table: ViewDuration (duration...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

  • For this hands-on project, you will use the SQL Server named instance SQLSERVERHOA, and the HandsOnOne...

    For this hands-on project, you will use the SQL Server named instance SQLSERVERHOA, and the HandsOnOne database and tables you created in previous chapters. The objective of this activity is to practice generating keys and encrypting/decrypting data. Document each step by taking a screen shot of the Query Editor window after successfully executing each SQL query. 1.In SQL Server Management Studio, open a new Query Editor window, which you will use for completing all steps in this activity. 2.Create a...

  • Questions: Assume you are creating a database for IS paint store. Suppose you have an ER diagram ...

    Questions: Assume you are creating a database for IS paint store. Suppose you have an ER diagram like the following: Please answer the following questions. Explain your answer. 1. Convert the ER diagrams to relational tables. 2. Specify primary keys and foreign keys in each table. For foreign keys, specify which primary key it references to. 3. Please create the tables in SQL for the relational tables in our ER diagrams. You also need to define primary keys and foreign...

  • IN THE PREVIOUS CHAPTER WE MADE A DATABASE USING OUR LAST NAME AS ITS NAME. QUESTION...

    IN THE PREVIOUS CHAPTER WE MADE A DATABASE USING OUR LAST NAME AS ITS NAME. QUESTION 1 STATES THIS. PLEASE TYPE WHAT NEEDS TO BE TYPED FOR ALL STEPS. THIS USES CODIO a. 1. Connect to the database you created and named in Module One (for example, Jetson). Type after the prompt mysql> a. use (table you named); i. Example: mysql> use Jetson; 2. Create the Employee table using the SQL statement shown here. Press Return after each line. CREATE...

  • Q.1] Write SQL statements based on the tennis database schema (practice homework 5) Get all the different tow...

    Q.1] Write SQL statements based on the tennis database schema (practice homework 5) Get all the different town names from the PLAYERS table. 2. For each town, find the number of players. 3. For each team, get the team number, the number of matches that has been played 'for that team, and the total number of sets won. 4. For each team that is captained by a player resident in "Eltham", get the team number and the number of matches...

  • database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED...

    database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED BELOW CREATE TABLE Department ( DECIMAL(5) VARCHAR(30) CHAR(5) DATE NOT NULL NOT NULL NOT NULL * Department number /*Department name * Department manager number */ /Manager start date DNumber DName Manager MSDate CONSTRAINT Department_PK PRIMARY KEY(DNumber) CONSTRAINT Department_CK UNIQUE(DName) CREATE TABLE DeptLocation DECIMAL(5) VARCHAR(50) NOT NULL NOT NULL DNumber * Department number */ * Department location */ Address CONSTRAINT DeptLocation_PK PRIMARY KEY(DNumber, Address) CONSTRAINT...

  • Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to...

    Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to retrieve all the data field from db_pvfc12_std in table CUSTOMER_T 2.- Run a query to retrieve record --> CustomerID = 11, How many records did you get and why? 3.- Run a query to retrieve all the data field from table Order_T               Once retrieved:                              3.1.- Please name the fields showing: Primary Key, Foreign Key and other fields                              3.2.- What type of...

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