All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer sciences
databases
Questions and Answers of
Databases
When designing an E-R diagram for a particular enterprise, you have several alternatives from which to choose.a. What criteria should you consider in making the appropriate choice?b. Design three
An E-R diagram can be viewed as a graph. What do the following mean in terms of the structure of an enterprise schema?a. The graph is disconnected.b. The graph is acyclic.
In Section 2.4.3, we represented a ternary relationship (Figure a) using binary relationships, as shown in (Figure b). Consider the alternative shown in (Figure c). Discuss the relativemerits of
Consider the representation of a ternary relationship using binary relationships as described in Section 2.4.3 (shown in Figure b) a. Show a simple instance of E, A, B, C, RA, RB, and RC that cannot
A weak entity set can always be made into a strong entity set by adding to its attributes the primary key attributes of its identifying entity set. Outline what sort of redundancy will result if we
Design a generalization–specialization hierarchy for a motor-vehicle sales company. The company sells motorcycles, passenger cars, vans, and buses. Justify your placement of attributes at each
Explain the distinction between condition-defined and user-defined constraints. Which of these constraints can the system check automatically? Explain your answer.
Explain the distinction between disjoint and overlapping constraints.
Explain the distinction between total and partial constraints.
Figure shows a lattice structure of generalization and specialization. For entity sets A, B, and C, explains how attributes are inherited from the higherlevel entity sets X and Y. Discuss how to
Draw the UML equivalents of the E-R diagrams.
Consider two separate banks that decide to merge. Assume that both banks use exactly the same E-R database schema?the one in Figure below (This assumption is of course highly unrealistic; we consider
Reconsider the situation described for Exercise 2.26 under the assumption that one bank is in the United States and the other is in Canada. As before, the banks use the schema of Figure, except that
Design a relational database for a university registrar’s office. The office maintains data about each class, including the instructor, the number of students enrolled, and the time and place of
Describe the differences inmeaning between the terms relation and relation schema. Illustrate your answer by referring to your solution to Exercise below.Student (student-id, name, program)Course
Design a relational database corresponding to the E-R diagram of Figure.
In Chapter we saw how to represent many-to-many, many-to-one, one-tomany, and one-to-one relationship sets. Explain how primary keys help us to represent such relationship sets in the relational
Consider the relational database of Figure, where the primary keys are underlined. Give an expression in the relational algebra to express each of the following queries: a. Find the names of all
Consider the relation of as shown below, which shows the result of the query ?Find the names of all customers who have a loan at the bank.? Rewrite the query to include not only the name, but also
The outer-join operations extend the natural-join operation so that tuples from the participating relations are not lost in the result of the join. Describe how the theta join operation can be
Consider the relational database of Figure. Give an expression in the relational algebra for each request: a. Modify the database so that Jones now lives in Newtown. b. Give all employees of First
Using the bank example, write relational-algebra queries to find the accounts held by more than two customers in the following ways:a. Using an aggregate function.b. Without using any aggregate
Consider the relational database of Figure. Give a relational-algebra expression for each of the following queries: a. Find the company with the most employees. b. Find the company with the smallest
List two reasons why we may choose to define a view.
List two major problems with processing update operations expressed in terms of views.
Let the following relation schemas be given:R = (A, B, C)S = (D, E, F)Let relations r(R) and s(S) be given. Give an expression in the tuple relational calculus that is equivalent to each of the
Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give an expression in the domain relational calculus that is equivalent to each of the following:a. IIA(r1)b. σB =17 (r1)c. r1 ∪
Repeat Exercise 3.5 using the tuple relational calculus and the domain relational calculus.
Let R = (A, B) and S = (A, C), and let r(R) and s(S) be relations. Write relational-algebra expressions equivalent to the following domain-relationalcalculus expressions:a. {< a > | ∃ b (<
Let R = (A, B) and S = (A, C), and let r(R) and s(S) be relations. Using the special constant null, write tuple-relational-calculus expressions equivalent to each of the following:a. r 1 sb. r 1 sc.
List two reasons why null values might be introduced into the database.
Certain systems allow marked nulls. A marked null ⊥i is equal to itself, but if i ≠ j, then ⊥i ≠ ⊥j. One application of marked nulls is to allow certain updates through views. Consider the
Consider the insurance database of Figure, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the total number of people who owned cars
Consider the employee database of Figure, where the primary keys are underlined. Give an expression in SQL for each of the following queries. a. Find the names of all employees who work for First
Consider the relational database of Figure. Give an expression in SQL for each of the following queries. a. Modify the database so that Jones now lives in Newtown. b. Give all employees of First Bank
Let the following relation schemas be given:R = (A, B, C)S = (D, E, F)Let relations r(R) and s(S) be given. Give an expression in SQL that is equivalent to each of the following queries.a. п A(r)b.
Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give an expression in SQL that is equivalent to each of the following queries.a. r1 ∪ r2b. r1 ∩ r2c. r1 − r2d. II AB(r1) 1
Let R = (A, B) and S = (A, C), and let r(R) and s(S) be relations. Write an expression in SQL for each of the queries below:a. {< a > | ∃ b (< a, b >∈ r ∧ b = 17)}b. {< a, b, c
Show that, in SQL, < > all is identical to not in.
Consider the relational database of Figure. Using SQL, define a view consisting of manager-name and the average salary of all employees who work for that manager. Explain why the database system
Consider the SQL query select p.a1 from p, r1, r2 where p.a1 = r1.a1 or p.a1 = r2.a1. Under what conditions does the preceding query select values of p.a1 that are either in r1 or in r2? Examine
Write an SQL query, without using a with clause, to find all branches where the total account deposit is less than the average total account deposit at all branches,a. Using a nested query in the
a. Display the grade for each student, based on the marks relation.b. Find the number of students with each grade.
SQL-92 provides an n-ary operation called coalesce, which is defined as follows: coalesce (A1,A2, . . . , An) returns the first nonnull Ai in the list A1,A2, . . .,An, and returns null if all of
Let a and b be relations with the schemas A (name, address, title) and B(name, address, salary), respectively. Show how to express a natural full outer join b using the full outer join operation with
Give an SQL schema definition for the employee database of Figure. Choose an appropriate domain for each attribute and an appropriate primary key for each relationschema.
Write check conditions for the schema you defined in Exercise 4.14 to ensure that:a. Every employee works for a company located in the same city as the city in which the employee lives.b. No employee
Describe the circumstances in which you would choose to use embedded SQL rather than SQL alone or only a general-purpose programming language.
Consider the insurance database of Figure, where the primary keys are underlined. Construct the following QBE queries for this relational-database. a. Find the total number of people who owned cars
Consider the employee database of Figure. Give expressions in QBE, and Datalog for each of the following queries: a. Find the names of all employees who work for First Bank Corporation. b. Find the
Consider the relational database of Figure where the primary keys are underlined. Give expressions in QBE for each of the following queries: a. Find all employees who earn more than the average
Consider the relational database of Figure. Give expressions in QBE for each of the following queries: a. Modify the database so that Jones now lives in Newtown. b. Give all employees of First Bank
Let the following relation schemas be given:R = (A, B, C)S = (D, E, F) Let relations r(R) ands(S) be given. Give expressions in QBE, and Data log equivalent to each of the following queries:a.
Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give expressions in QBE, and Datalog equivalent to each of the following queries:a. r1 ∪ r2b. r1 ∩ r2c. r1 − r2d. IIAB (r1) 1
Let R = (A, B) and S = (A, C), and let r(R) and s(S) be relations.Write expressions in QBE and Datalog for each of the following queries:a. {< a > | ∃ b (< a, b >∈ r ∧ b = 17)}b.
Consider the relational database of Figure. Write a Datalog program for each of the following queries:a. Find all employees who work (directly or indirectly) under the manager “Jones”.b. Find all
Write an extended relational-algebra view equivalent to the Datalog rule p (A,C,D) :– q1 (A,B), q2 (B,C), q3 (4,B), D = B + 1 .
Describe how an arbitrary Data log rule can be expressed as an extended relational algebra view.
Complete the SQL DDL definition of the bank database of Figure to include the relations loan andborrower.
Consider the following relational database:employee (employee-name, street, and city)works (employee name, company-name, salary)company (company-name, city)manages (employee-name, manager name)Give
Referential-integrity constraints as defined in this chapter involve exactly two relations. Consider a database that includes the following relations:salaried-worker (name, office, phone,
SQL allows a foreign-key dependency to refer to the same relation, as in the following example: create table manager (employee-name char (20), manager-name char(20), primary key employee-name,
Suppose there are two relations r and s, such that the foreign key B of r references the primary key A of s. Describe how the trigger mechanism can be used to implement the on delete cascade option,
Write an assertion for the bank database to ensure that the assets value for the Perryridge branch is equal to the sum of all the amounts lent by the Perryridge branch.
Write an SQL trigger to carry out the following action: On delete of an account, for each owner of the account, check if the owner has any remaining accounts, and if she does not, delete her from the
Consider a view branch-cust defined as follows: create view branch-cust as select branch-name, customer-name from depositor, account where depositor.account-number = account.account-number Suppose
Make a list of security concerns for a bank. For each item on your list, state whether this concern relates to physical security, human security, operatingsystem security, or database security.
Using the relations of our sample bank database, write an SQL expression to define the following views:a. A view containing the account numbers and customer names (but not the balances) for all
For each of the views that you defined in Exercise 6.10, explain how updates would be performed (if they should be allowed at all).
In Chapter 3, we described the use of views to simplify access to the database by users who need to see only part of the database. In this chapter, we described the use of views as a
What is the purpose of having separate categories for index authorization and resource authorization?
Database systems that store each relation in a separate operating-system file may use the operating system’s security and authorization scheme, instead of defining a special scheme themselves.
What are two advantages of encrypting data stored in the database?
Perhaps the most important data items in any database system are the passwords that control access to the database. Suggest a scheme for the secure storage of passwords.Be sure that your scheme
Explain what is meant by repetition of information and inability to represent information. Explain why each of these properties may indicate a bad relational database design.
Suppose that we decompose the schema R = (A, B, C, D, E) into (A, B, C)(A, D, E). Show that this decomposition is a loss less-join decomposition if the following set F of functional dependencies
Why certain functional dependencies are called trivial functional dependencies?
List all functional dependencies satisfied by the relation of Figure.
Use the definition of functional dependency to argue that each of Armstrong’s axioms (reflexivity, augmentation, and transitivity) is sound.
Explain how functional dependencies can be used to indicate the following:• A one-to-one relationship set exists between entity sets account and customer.• A many-to-one relationship set exists
Consider the following proposed rule for functional dependencies: If α → β and γ → β, then α → γ. Prove that this rule is not sound by showing a relation r that satisfies α → β and γ
Use Armstrong’s axioms to prove the soundness of the union rule. Use the augmentation rule to show that, if α → β, then α → αβ. Apply the augmentation rule again, using α→γ, and then
Use Armstrong’s axioms to prove the soundness of the decomposition rule.
Use Armstrong’s axioms to prove the soundness of the pseudotransitivity rule.
Explain how functional dependencies can be used to indicate the following:• A one-to-one relationship set exists between entity sets account and customer.• A many-to-one relationship set exists
Using the functional dependencies of Exercise 7.11, compute B+.
Using the functional dependencies of Exercise 7.11, compute the canonical cover Fc.
Consider the algorithm in figure to compute ?+. Show that this algorithm is more efficient than the one presented in Figure (Section 7.3.3) and that it computes ?+ correctly.
Given the database schema R (a, b, c), and a relation r on the schema R, write an SQL query to test whether the functional dependency b → c holds on relation r. Alsowrite an SQL assertion that
Show that the following decomposition of the schema R of Exercise 7.2 is not loss less-join decomposition:(A, B, C)(C, D, E).
Let R1, R2, Rn be a decomposition of schema U. Let u (U) be a relation, and let r i = IIRI (u). Show that u ⊆ r1 1 r2 1 · · · 1 rn
Show that the decomposition in exercise is not a dependency-preserving decomposition.
Show that it is possible to ensure that a dependency-preserving decomposition into 3NF is a loss less-join decomposition by guaranteeing that at least one schema contains a candidate key for the
List the three design goals for relational databases, and explain why each is desirable.
Give a loss less-join decomposition into BCNF of schema R of Exercise 7.2.
Give an example of a relation schema R` and set F` of functional dependencies such that there are at least three distinct lossless-join decompositions of R` into BCNF.
In designing a relational database, why might we choose a non-BCNF design?
Give a lossless-join, dependency-preserving decomposition into 3NF of schema R of Exercise 7.2.
Let a prime attribute be one that appears in at least one candidate key. Let α and β be sets of attributes such that α → β holds but β → α do not hold. Let A be an attribute that is not in
A functional dependency α → β is called a partial dependency if there is a proper subset γ of α such that γ → β.We says that β is partially dependent on α. A relation schema R is in
Showing 100 - 200
of 2962
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last