Explain mechanism of nested queries, Database Management System

Assignment Help:

Explain mechanism of nested queries?

SQL gives a mechanism for nesting subqueries. A subquery is a select from where expression that is nested within one more query. A common use of sub queries is to perform tests for set membership, make set comparisons, and verify set cardinality.

a) Set membership

(select customer-name

from depositor)

b) Set comparison

select distinct T.branch-name

from branch as T,branch as S

where T.assets > S.assets and S.branch-city='Brooklyn'

a) Test for Empty Relations

Select customer-name

from borrower

where exits (select *

from depositor

where depositor.customername=borrower.customer-name)

a) Test for the Absence of Duplicate Tuples

 

 


Related Discussions:- Explain mechanism of nested queries

Explain the term- periodic recomputation, Explain the term- Periodic recomp...

Explain the term- Periodic recomputation Periodic recomputation:  Base values are often updated in bunches. Sometimes, it is possible to just recompute all derived attributes p

Describe difference between a one-to-many and a many-to-many, Describe the ...

Describe the difference between a one-to-many and a many-to-many relationship. Which logical data structures comprise one-to-many and which comprise many-to-many relationship?

Log based recovery, Log based recovery: Let us first describe the term tran...

Log based recovery: Let us first describe the term transaction log in the context of DBMS. A transaction log is a record in DBMS that remains track of all the transactions of a dat

Develop and evaluate partial systems, Part 1: Security Plan Consider th...

Part 1: Security Plan Consider the Case study and identify 3 security requirements. For each of these security requirements: • Discuss the necessity for the feature and how

Develop a flowchart using the decision structure, 1.  Develop a flowchart u...

1.  Develop a flowchart using the decision structure to solve the following problem. A Box Lunch Bonanza is a small catering company that offers 2 different types of box lunches

Software engineering, Critically evaluate the bulleted list of information-...

Critically evaluate the bulleted list of information-related items in this case study. How are each contradictory to the notion of being an information-literate knowledge worker?

Examine about the behavioural diagrams, Examine about the Behavioural Diagr...

Examine about the Behavioural Diagrams  The main objective of behavioural diagrams is to visualize, specify, construct and document dynamic aspects of a system. The interactio

Describe models which define the operations on classes, Describe briefly mo...

Describe briefly models which define the operations on classes. The three models which are used to define operations on classes are as: Object Model = data dictionary + Obje

Designing the fields in the data base, Designing the fields in the data bas...

Designing the fields in the data base The following are the considerations one has to remain in mind while designing the fields in the data base. Coding, compression, en

What are the advantages of using a dbms, What are the advantages of using a...

What are the advantages of using a DBMS? The benefits of using a DBMS are a) Controlling redundancy b) Restricting unauthorized access c) Giving multiple user interfac

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd