Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(4 Points) If I asked you to get rid of the View “NewEmployees”, how would you d

ID: 3710513 • Letter: #

Question

(4 Points) If I asked you to get rid of the View “NewEmployees”, how would you do this?  Show the code

(4 Points) Since you just removed the “NewEmployees” View, what happened to the data in this View?

A. It has been deleted along with the View

B. Some data was deleted and some other data is still in the underlying tables

C. The data is still in the underlying tables and has not been deleted

D. None of the above

(4 Points) The “Create View” command is part of which SQL Sub Language set?

A. DCL

B. DML  

C. DSL

D. DDL

Accounts

acctNo

owner

userid

password

balance

365556

Tony Jones

tjones

456

819.37

499872

Frank Smith

fsmith

123

590.81

761112

George Powers

gpowers

geo

239.41

765552

Betty Davis

bdavis

atl

356.21

872221

Suzanne Austin

suze

suze

622.22

899900

Mary Wilson

mwilson

mary

772.12

Customers

cid

cName

cAddr

cPhone

cEmail

tjones

Tony Jones

Miami, Fl

514-999-2131

tjones@yahoo.com

fsmith

Frank Smith

Dallas, Tx

616-423-1717

fsmith@haotmail.com

gpowers

George Powers

Chicago, Il

612-901-2312

gpowers@bellsouth.net

bdavis

Betty Davis

Nashville, Tn

909-367-9485

bdavis@yahoo.com

suze

Suzzane Austin

San Diego, Ca

201-565-1902

suze@yahoo.com

mwilson

Mary Wilson

Atlanta, Ga

405-787-2911

mwilson@hotmail.com

(10 Points) Given the above 2 tables, please create a Viewcalled “CustAccounts” that will include the Customer’s Name, Address and Phone, as well as their AccountNo and balance.(You will need to do a Join to get all this info.)

(4 Points) Did you notice a mistake in the database above.  “Suzanne Powers” name is different in the second table. What changes could you make to prevent an error like this from occurring again?

(10 Points) Write an “Update” statement that will change the cName for “suze” in the Customers table to match the owner in the Accounts table(Use a SubQuery) à

grant all

on students

to public

(3 Points) What does the above code do?

(2 Points) To take away permissions you would à

A. Drop permissions

B. Delete permissions

C. Revoke permissions

D. None of the above

(3 Points) What does the Transaction Log do? Explain à

(2 Points) Which of the following are true?

A. Constraints help with data Integrity

B. Indexes help with performance

C. Both a. and b.

D. Neither a. nor b.

Accounts

acctNo

owner

userid

password

balance

365556

Tony Jones

tjones

456

819.37

499872

Frank Smith

fsmith

123

590.81

761112

George Powers

gpowers

geo

239.41

765552

Betty Davis

bdavis

atl

356.21

872221

Suzanne Austin

suze

suze

622.22

899900

Mary Wilson

mwilson

mary

772.12

Explanation / Answer

drop view query will delete the view from the database schema.

Because view is just used to combine the data from the multiple tables or to give the access to the particular data of table without giving the table full access we create a view for that particular data and we will give the access to the user for that view. So even if we delete the view nothing will be happened to the data underlying in the base tables.

DDL means Data Definition Language which means it is used in sql to create or restructure the objects in the database. So in this case we are using create view which is nothing but the restructering the table. So we call it as DDL Command.

The above query will create the view with the given fields and more over as we need to include attributes of 2 tables we have used join condition on the cid and userid columns . So that the respective data of each customer will be retrieved.

As per the chegg policy i am allowed to anser these questions only . please understnad and repost the remaining questions.