Your mydb schema should be similar to this design: Department table: deptNumber, deptName Employee table: employeeSSN, empName,
Fantastic news! We've Found the answer you've been seeking!
Question:
Your mydb schema should be similar to this design:
Department table: deptNumber, deptName
Employee table: employeeSSN, empName, address, birthday, salary, deptNumber Dependent table:dependentSSN, name, sex, birthday, employeeSSN
Project table: projectID, projName, deptNumber
employeeProject table: employeeSSN, projectID
Transcribed Image Text:
Add referential integrity between: a. Department table and Employee table, add foreign key constrsint in the Employee table. b. Employee table and Dependent table, add foreign key constrint in the Dependent table c. Department table and Project table, add foreign key constraint in the Project table. d. Employee table and EmployeeProject table, add foreign key constraint in the EmployeeProject table. e. Project table and EmployeeProject table, add foreign key constraint in the EmployeeProject table. 2. Add a domain constraint to the Salary field of the Employee table: Salary is between 500000 and 10000. 3. Add a domain constraint to the Sex field of the Dependent table: valid sex code; F, M (you may add other valid sex codes) 4. Test the constraints by trying to add a record that violates the constraints: a. Add a new employee record with a duplicated employeeSSN. b. Add a new employee record where the deptNumber does not exist in the Department table. c. Add a new dependent record where the employeeSSN does not exist in the Employee table. d. Add a new employee record with $5,000 salary. e. Add a new dependent record with an invalid sex code. f. Change one department's number, deptNumber, in the department table, and see the changes of deptNumber in the employee table. Add referential integrity between: a. Department table and Employee table, add foreign key constrsint in the Employee table. b. Employee table and Dependent table, add foreign key constrint in the Dependent table c. Department table and Project table, add foreign key constraint in the Project table. d. Employee table and EmployeeProject table, add foreign key constraint in the EmployeeProject table. e. Project table and EmployeeProject table, add foreign key constraint in the EmployeeProject table. 2. Add a domain constraint to the Salary field of the Employee table: Salary is between 500000 and 10000. 3. Add a domain constraint to the Sex field of the Dependent table: valid sex code; F, M (you may add other valid sex codes) 4. Test the constraints by trying to add a record that violates the constraints: a. Add a new employee record with a duplicated employeeSSN. b. Add a new employee record where the deptNumber does not exist in the Department table. c. Add a new dependent record where the employeeSSN does not exist in the Employee table. d. Add a new employee record with $5,000 salary. e. Add a new dependent record with an invalid sex code. f. Change one department's number, deptNumber, in the department table, and see the changes of deptNumber in the employee table.
Expert Answer:
Answer rating: 100% (QA)
The image you provided contains instructions regarding the creation of a database schema and various constraints that should be implemented within tha... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
Assuming you are not using the Loan Manager to record your loan payments, what is the best way to record loan payments that include both interest and principal?
-
Add referential integrity between: a. Department table and Employee table, add foreign key constraint in the Employee table. b. Employee table and Dependent table, add foreign key constraint in the...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Damages require one person to pay money as compensation for another persons loss. Damages are therefore a private matter. Since the Charter is part of public law, damages cannot be awarded in...
-
Electronic mail systems need directories so people's e-mail addresses can be looked up. To build such directories, names should be broken up into standard components (e.g., first name, last name) to...
-
Two polarizing sheets, one directly above the other, transmit p% of the initially un-polarized light that is perpendicularly incident on the top sheet. What is the angle between the polarizing...
-
1. Find the z-score that corresponds to a cumulative area of 0.3632. 2. Find the z-score that has 10.75% of the distributions area to its right.
-
Indicate whether each of the following characteristics is more closely associated with common stock (C) or preferred stock (P): 1. Often receives dividends at a set rate. 2. Is considered the...
-
Gitano Products operates a job-order costing system and applies overhead cost to jobs on the basis of direct materials used in production (not on the basis of raw materials purchased). Its...
-
Joseph and Diane Smith 1580 West Street Chatham, VA 24531 Joseph and Diane are both 35 and have no dependents. If your clients receive a refund, they want the full amount refunded to them. Diane is...
-
(a) An n n matrix K is the encryption matrix for the Hill cipher. Give the encryption formula. (b) The plaintext is (2, 5, 1,0). Encrypt it (show your work and the ciphertext) using the Hill cipher...
-
1)How many First Nations live around the Great Lakes Basin? 2)Who are the Anishinaabe? 3)Who are the Haudenosaunee? 4)How cultural diversity within the Indigenous population is frequently not...
-
A coal-fired power station produces electricity worth $40 per unit to consumers. However, for each unit produced air pollution is produced, costing $20, which is not reflected in the price of...
-
Allied Management Consulting and Accounting is a publicly listed company that provides a range of management consulting and accounting products. Following a recent merger with a smaller company, the...
-
A company's bond has a par value of $1000 and pays a coupon rate of 4%. The current market price of the bond is $890. The bond matures in 8 years. The marginal tax rate is equal to 15%. The required...
-
A student records the mass of calcium carbonate weighed out to make their calcium standard solution as 1.5102 g. The fact that the student recorded 1.5102 g, and not 1.510 g or 1.51020 g, is an...
-
Solve the following question by rationalization of denominator method. 53-
-
g(x) = x 5 5x 6 a. Show that g(x) = 0 has a root, , between x = 1 and x = 2. b. Show that the equation g(x) = 0 can be written as x = (px + q) 1/r , where p, q and r are integers to be found. The...
-
Mary paid $2,000 of state income taxes in 2012. The total sales tax she paid during 2012 was $5,500, which included $3,000 for the cost of a new car. How should Mary treat the taxes paid on her 2012...
-
Robert Ramos (age 36) is a single taxpayer, living at 8765 Bay Dr., Monterey, CA 93940. His Social Security number is 976-23-5132. Robert's earnings and income tax withholding as the manager of a...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
Honeybees accumulate charge as they fly, and they transfer charge to the flowers they visit. Honeybees are able to sense electric fields; tests show that they can detect a change in field as small as...
-
A platypus foraging for prey can detect an electric field as small as 0.002 N/C. To give an idea of the sensitivity of the platypuss electric sense, how far from a +10 nC point charge does the field...
-
Raindrops acquire an electric charge as they fall. Suppose a 2.5-mm-diameter drop has a charge of +15 pC; these are both typical values. If the strength of the earths electric field is 100 N/C, how...
Study smarter with the SolutionInn App