Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do not copy from others just answer for qb and c 1. (total marks 20) Given the same simple SalesRep-Worksin-SalesArea database schema you worked on

do not copy from others just answer for qb and c

image text in transcribed

1. (total marks 20) Given the same simple SalesRep-Worksin-SalesArea database schema you worked on in assignment 1, which contains three files described as follows: SalesRep (SRid: integer, SRname: string, SRage: integer, salary: real) Worksin (SRid: integer, Arid: integer, hours: integer) SalesArea (Arid: integer, Aname: string, city: string, budget: real, managerid: integer) Note : SRid, SRname, SRage, salary are the sales rep id, name, age and salary respectively. Also, hours is the number of hours worked by sales rep in the sales area. The rest of the attributes Arid, Aname, city, budget and managerid are the area id, name, location, budget and managerid respectively. A manager is a sales rep. Assume that an update operation (a general term in this chapter, for an insert, a modify or a delete operation) is to be made to this database to enter information about a new Salesrep who is now the new manager of an existing SalesArea (replacing the old manager) and although he is new, he has worked some hours in another existing SalesAres. Answer the following questions on what specific relations, attributes and operations (eg. insert, modify, delete) that need to be done for this update to be implemented in the entire database. This is not SQL query yet Provide your answers both in descriptive sentence and using the formal (not SQL) database operations of INSERT, MODIFY, DELETE as used in Chapter 5 of book with specific attributes and relations when possible. An example formal insert of a Salesrep record into the Salesrep table is: INSERT into SalesRep // for new SalesRep record And an example descriptive sentence of the formal operation above is: do an insert operation for a new SalesRep record into the SalesRep table. (a) Give the set of needed insert, modify or delete operations for this update. 5 marks (6) What types of constraints (explain with data) would you expect to check for this update to be done? 5 marks ) Which of the constraints of key, entity integrity and referential integrity constraints are checked by each of your operations (e. g.. Insert) and which are not? 5 marks (d) Specify all the referential integrity (foreign key) constraints on this database. 5 marks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

Discuss the steps used in strategic planning.

Answered: 1 week ago

Question

Comprehend the concept of the "psychological contract."

Answered: 1 week ago