Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
363
views
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)
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
265
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
393
views
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?
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
427
views
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)
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
274
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
265
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
289
views
databases
korth-edition6
relational-model
sql
–1
vote
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
261
views
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)
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
467
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
317
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
345
views
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
443
views
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
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
269
views
databases
korth-edition6
relational-model
sql
1
vote
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.
ajaysoni1924
asked
in
Databases
Mar 26, 2019
by
ajaysoni1924
328
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
818
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
272
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
229
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
904
views
databases
korth-edition6
relational-model
sql
descriptive
1
vote
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
376
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
764
views
databases
korth-edition6
relational-model
sql
1
vote
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
1.0k
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
801
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
306
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
626
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
1.1k
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
553
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
931
views
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)
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
908
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
254
views
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.
ajaysoni1924
asked
in
Databases
Mar 25, 2019
by
ajaysoni1924
221
views
databases
korth-edition6
relational-model
sql
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
17
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged sql
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...