Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged sql
0
votes
0
answers
121
DBMS Korth Edition 6 Exercise 4 Question 17 (Page No. 155)
Explain why, when a manager, say Satoshi, grants an authorization, the grant should be done by the manager role, rather than by the user Satoshi.
Explain why, when a manager, say Satoshi, grants an authorization, thegrant should be done by the manager role, rather than by the user Satoshi.
ajaysoni1924
359
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
122
DBMS Korth Edition 6 Exercise 4 Question 16 (Page No. 155)
Referential-integrity constraints as defined generally involve exactly two relations. Consider a database that includes the relations shown below . Suppose that we wish to require that every name that appears in address appears in either ... (name, office, phone, salary) hourly worker (name, hourly wage) address (name, street, city)
Referential-integrity constraints as defined generally involve exactlytwo relations. Consider a database that includes the relations shown below. Suppose that we wish to ...
ajaysoni1924
262
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
123
DBMS Korth Edition 6 Exercise 4 Question 14 (Page No. 155)
Show how to define a view tot credits (year, num credits), giving the total number of credits taken by students in each year.
Show how to define a view tot credits (year, num credits), giving the totalnumber of credits taken by students in each year.
ajaysoni1924
390
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
124
DBMS Korth Edition 6 Exercise 4 Question 13 (Page No. 155)
Under what circumstances would the query select * from student natural full outer join takes natural full outer join course include tuples with null values for the title attribute?
Under what circumstances would the queryselect * from student natural full outer join takes natural full outer join courseinclude tuples with null values for the title at...
ajaysoni1924
425
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
125
DBMS Korth Edition 6 Exercise 4 Question 12 (Page No. 155)
For the database shown below, write a query to find those employees with no manager. Note that an employee may simply have no manager listed or may have a null manager. Write your query using an outer join and then write ... city) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
For the database shown below, write a query to find those employees withno manager. Note that an employee may simply have no manager listed ormay have a null manager. Wri...
ajaysoni1924
271
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
126
DBMS Korth Edition 6 Exercise 4 Question 10 (Page No. 154)
SQL provides an n-ary operation called coalesce, which is defined as follows: coalesce(A1, A2, . . . , An) returns the first non null Ai in the list A1, A2, . . . , An, and returns null if all of A1, A2, . . ... name and address, and that the solution is correct even if some tuples in a and b have null values for attributes name or address.
SQL provides an n-ary operation called coalesce, which is defined asfollows: coalesce(A1, A2, . . . , An) returns the first non null Ai in the listA1, A2, . . . , An, and...
ajaysoni1924
263
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
127
DBMS Korth Edition 6 Exercise 4 Question 9 (Page No. 154)
SQL allows a foreign-key dependency to refer to the same relation, as in the following example: create table manager (employee name varchar(20) not null manager name varchar(20) not null, primary key employee name, foreign ... every manager also be an employee. Explain exactly what happens when a tuple in the relation manager is deleted.
SQL allows a foreign-key dependency to refer to the same relation, as in thefollowing example:create table manager(employee name varchar(20) not nullmanager name varchar(...
ajaysoni1924
286
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
–1
votes
0
answers
128
DBMS Korth Edition 6 Exercise 4 Question 8 (Page No. 154)
we expect the constraint “an instructor cannot teach sections in two different classrooms in a semester in the same time slot” to hold. a. Write an SQL query that returns all (instructor, section) combinations that violate this constraint. b. Write an SQL assertion to enforce this constraint.
we expect the constraint “an instructor cannot teach sections in two different classrooms in a semester in the same timeslot” to hold.a. Write an SQL query that retur...
ajaysoni1924
259
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
129
DBMS Korth Edition 6 Exercise 4 Question 7 (Page No. 154)
Consider the relational database shown below. Give an SQL DDL definition of this database. Identify referential-integrity constraints that should hold, and include them in the DDL definition. employee (employee name, street, city) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Consider the relational database shown below. Give an SQL DDL definitionof this database. Identify referential-integrity constraints that should hold,and include them in ...
ajaysoni1924
463
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
130
DBMS Korth Edition 6 Exercise 4 Question 6 (Page No. 153)
Complete the SQL DDL definition of the university database shown below in figure 4.8 to include the relations student, takes, advisor, and prereq.
Complete the SQL DDL definition of the university database shown below in figure 4.8to include the relations student, takes, advisor, and prereq.
ajaysoni1924
318
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
131
DBMS Korth Edition 6 Exercise 4 Question 5 (Page No. 153)
Show how to define the view student_grades (ID, GPA) giving the gradepoint average of each student, based on the query given below 3.2; recall that we used a relation grade_points(grade, points) to get the numeric ... Make sure your view definition correctly handles the case of null values for the grade attribute of the takes relation.
Show how to define the view student_grades (ID, GPA) giving the gradepointaverage of each student, based on the query given below 3.2; recallthat we used a relation grade...
ajaysoni1924
343
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
132
DBMS Korth Edition 6 Exercise 4 Question 3 (Page No. 153)
Suppose we have three relations r (A, B), s(B, C), and t(B, D), with all attributes declared as not null. Consider the expressions r natural left outer join (s natural left outer join t), and (r natural left outer ... Is the above pattern, with C null and D not null possible in the result of the first expression? Explain why or why not.
Suppose we have three relations r (A, B), s(B, C), and t(B, D), with allattributes declared as not null. Consider the expressions• r natural left outer join (s natural ...
ajaysoni1924
440
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
133
DBMS Korth Edition 6 Exercise 4 Question 2 (Page No. 152)
Outer join expressions can be computed in SQL without using the SQL outer join operation. To illustrate this fact, show how to rewrite each of the following SQL queries without using the outer join expression. a. select* from student natural left outer join takes b. select* from student natural full outer join takes
Outer join expressions can be computed in SQL without using the SQLouter join operation. To illustrate this fact, show how to rewrite each of thefollowing SQL queries wit...
ajaysoni1924
264
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
1
votes
0
answers
134
DBMS Korth Edition 6 Exercise 4 Question 1 (Page No. 152)
Write the following queries in SQL: a. Display a list of all instructors, showing their ID, name, and the number of sections that they have taught. Make sure to show the number of sections as 0 for ... of instructors in each department, without using scalar sub queries. Make sure to correctly handle departments with no instructors.
Write the following queries in SQL:a. Display a list of all instructors, showing their ID, name, and the numberof sections that they have taught. Make sure to show the nu...
ajaysoni1924
323
views
ajaysoni1924
asked
Mar 26, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
135
DBMS Korth Edition 6 Exercise 3 Question 21 (Page No. 110)
Consider the library database.Write the following queries in SQL. a. Print the names of members who have borrowed any book published by McGraw-Hill . b. Print the names of members who have borrowed all books published by McGraw-Hill ... at all. member(memb no, name, age) book(isbn, title, authors, publisher) borrowed(memb no, isbn, date)
Consider the library database.Write the following queries inSQL.a. Print the names of members who have borrowed any book publishedby “McGraw-Hill”.b. Print the names ...
ajaysoni1924
815
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
136
DBMS Korth Edition 6 Exercise 3 Question 20 (Page No. 110)
Give an SQL schema definition for the employee database. Choose an appropriate domain for each attribute and an appropriate primary key for each relation schema. here is database employee (employee name, street, city) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Give an SQL schema definition for the employee database.Choose an appropriate domain for each attribute and an appropriate primarykey for each relation schema.here is dat...
ajaysoni1924
270
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
descriptive
+
–
0
votes
0
answers
137
DBMS Korth Edition 6 Exercise 3 Question 19 (Page No. 110)
Show that, in SQL, <> all is identical to not in.
Show that, in SQL, < all is identical to not in.
ajaysoni1924
224
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
descriptive
+
–
0
votes
1
answer
138
DBMS Korth Edition 6 Exercise 3 Question 18 (Page No. 110)
List two reasons why null values might be introduced into the database.
List two reasons why null values might be introduced into the database.
ajaysoni1924
900
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
descriptive
+
–
1
votes
0
answers
139
DBMS Korth Edition 6 Exercise 3 Question 17 (Page No. 110)
Consider the relational database given below. Give an expression in SQL for each of the following queries. a. Give all employees of First Bank Corporation a 10 percent raise. b. Give all managers of First Bank Corporation ... ) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Consider the relational database given below. Give an expression in SQLfor each of the following queries.a. Give all employees of “First Bank Corporation” a 10 percen...
ajaysoni1924
374
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
140
DBMS Korth Edition 6 Exercise 3 Question 16 (Page No. 109)
Consider the employee database, 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 Bank Corporation . b. Find all ... ) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Consider the employee database, where the primary keys areunderlined. Give an expression in SQL for each of the following queries.a. Find the names of all employees who w...
ajaysoni1924
763
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
1
votes
0
answers
141
DBMS Korth Edition 6 Exercise 3 Question 15 (Page No. 109)
Consider the bank database, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find all customers who have an account at all the branches located in Brooklyn . b. ... customer name, loan number) account (account number, branch name, balance ) depositor (customer name, account number)
Consider the bank database, where the primary keys are underlined.Construct the following SQL queries for this relational database.a. Find all customers who have an accou...
ajaysoni1924
1.0k
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
142
DBMS Korth Edition 6 Exercise 3 Question 14 (Page No. 109)
Consider the insurance database, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the number of accidents in which the cars belonging to John Smith were involved. b ... , date, location) owns (driver id, license) participated (report number, license, driver id, damage amount)
Consider the insurance database, where the primary keysare underlined. Construct the following SQL queries for this relationaldatabase.a. Find the number of accidents in ...
ajaysoni1924
797
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
143
DBMS Korth Edition 6 Exercise 3 Question 13 (Page No. 109)
Write SQL DDL corresponding to the schema given below. Make any reasonable assumptions about data types, and be sure to declare primary and foreign keys. person (driver id, name, address) car (license, model, year) accident ... number, date, location) owns (driver id, license) participated (report number, license, driver id, damage amount)
Write SQL DDL corresponding to the schema given below. Make anyreasonable assumptions about data types, and be sure to declare primaryand foreign keys.person (driver id, ...
ajaysoni1924
305
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
144
DBMS Korth Edition 6 Exercise 3 Question 12 (Page No. 109)
Write the following queries in SQL, using the university schema. a. Create a new course CS-001 , titled Weekly Seminar ,with 0 credits. b. Create a section of this course in Autumn 2009, with sec id of 1. c. Enroll every ... of any course with the word database as a part of the title; ignore case when matching the word with the title.
Write the following queries in SQL, using the university schema.a. Create a new course “CS-001”, titled “Weekly Seminar”,with 0 credits.b. Create a section of thi...
ajaysoni1924
626
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
145
DBMS Korth Edition 6 Exercise 3 Question 11 (Page No. 108)
Write the following queries in SQL, using the university schema. a. Find the names of all students who have taken at least one Comp. Sci. course; make sure there are no duplicate names in the result. b. Find the ... instructor. d. Find the lowest, across all departments, of the per-department maximum salary computed by the preceding query.
Write the following queries in SQL, using the university schema.a. Find the names of all students who have taken at least one Comp. Sci.course; make sure there are no dup...
ajaysoni1924
1.1k
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
146
DBMS Korth Edition 6 Exercise 3 Question 10 (Page No. 108)
Consider the relational database given below 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 managers of First Bank Corporation a ... city) works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Consider the relational database given below Give an expression in SQLfor each of the following queries.a. Modify the database so that “Jones” now lives in “Newtown...
ajaysoni1924
552
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
147
DBMS Korth Edition 6 Exercise 3 Question 9 (Page No. 107-108)
Consider the employee database, where the primary keys are underlined. Give an expression in SQL for each of the following queries. a. Find the names and cities of residence of all employees who work for First Bank ... works (employee name, company name, salary) company (company name, city) manages (employee name, manager name)
Consider the employee database, where the primary keys areunderlined. Give an expression in SQL for each of the following queries.a. Find the names and cities of residenc...
ajaysoni1924
934
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
148
DBMS Korth Edition 6 Exercise 3 Question 8 (Page No. 107)
Consider the bank database, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find all customers of the bank who have an account but not a loan. b. Find the names ... (customer name, loan number) account (account number, branch name, balance ) depositor (customer name, account number)
Consider the bank database, where the primary keys are underlined.Construct the following SQL queries for this relational database.a. Find all customers of the bank who h...
ajaysoni1924
906
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
149
DBMS Korth Edition 6 Exercise 3 Question 7 (Page No. 107)
Consider the SQL query select distinct 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 carefully the cases where one of r1 or r2 may be empty.
Consider the SQL queryselect distinct p.a1from p, r1, r2where p.a1 = r1.a1 or p.a1 = r2.a1Under what conditions does the preceding query select values of p.a1 thatare eit...
ajaysoni1924
251
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
0
votes
0
answers
150
DBMS Korth Edition 6 Exercise 3 Question 6 (Page No. 107)
The SQL like operator is case sensitive, but the lower() function on strings can be used to perform case insensitive matching. To show how, write a query that finds departments whose names contain the string “sci” as a substring, regardless of the case.
The SQL like operator is case sensitive, but the lower() function on stringscan be used to perform case insensitive matching. To show how, write aquery that finds departm...
ajaysoni1924
219
views
ajaysoni1924
asked
Mar 25, 2019
Databases
databases
korth-edition6
relational-model
sql
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
17
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register