Question

Subject: Database

Notes: Please give me detailed answers so I could learn from this. Thank you.

PS: This is a homework that I already submitted but did not know whether my answer is right or wrong.

2. Weight:15%. Please explain the difference among the following terms: (a) WHERE clause vs HAVING clause in SQL (b) alternat

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a) WHERE clause vs HAVING clause in SQL:

In simple terms, WHERE clause is used for individual tuples while HAVING clause is used for group of tuples and not individual tuples.

Detailed Explanation:


WHERE

1. Implemented in row operations and is applied to a single row.

2. Based on conditions, it fetches records from the row.

3. SELECT, UPDATE & DELETE statement can be used.

4. Aggregate functions can't appear here.

HAVING

1. Implemented in columns operations and is applied to sum of rows or groups.

2. It first fetches the data and then separate it according to the conditions.

3. SELECT statement can't be used.

4. Aggregate function can appear here.

(b) alternate key vs super key:

Alternate key is the key that is attached to one or more columns which are unique for every tuple but they are not primary key. It can also be a foreign key. Each alternate key can generate a unique index.

Super key is the key is a set of attributes of a relation variable that for which that it holds in all relations assigned to that variable.

(c) OUTER JOIN clause vs INNER JOIN

An INNER JOIN gives rows which match on the values in columns which are common of two or more tables using an operator such as "=" or equal while a LEFT JOIN gives all the rows from left table with matched rows from both the tables.

Add a comment
Know the answer?
Add Answer to:
Subject: Database Notes: Please give me detailed answers so I could learn from this. Thank you....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Subject: Database Notes: Please give me detailed answers so I could learn from this. Thank you....

    Subject: Database Notes: Please give me detailed answers so I could learn from this. Thank you. PS: This is a homework that I already submitted but did not know whether my answer is right or wrong. Pasien=Patient, namaLengkap=FullName, ibuKandung=biologicalMother, tglLahir=birthDate, alamat=address, dokter=doctor, spesialisasi=specialization, taripkonsul=consultingFee, ranap=inpatient, wktMasuk=enterTime, idRuang=idRoom, ruang=room, namaRuang=roomName, biaya=fee, wktKeluar=outTime, to explain some questions given below. pasienfidPasien varchar, namalengkap varchar, bukandung varchar, tgl Lahir date, alamat varchar) . dokter(idDr varchar, nama Lengkap varchar, spesialisasi varchar, tarip.per konsul UNSIGNED INT)...

  • subject : basic programming with C++ Notes: please give me detailed answer so I could understand...

    subject : basic programming with C++ Notes: please give me detailed answer so I could understand and learn from this, thank you very much PL03; CO-5: Students have knowledge of modular programming / subprograms and can implement them in computer programs.; mark: 5%; 2. Given the following program! #include<iostream> using namespace std; (8,0 01234 5 6 7 8g int e[10]={6, 7, 4, 5, -1, 4, -1, 3, 1, 9); 2* Compute (8,91 int compute (int a, int b) { if...

  • Please give me detailed solutions step by step, I am just trying to learn, thank you...

    Please give me detailed solutions step by step, I am just trying to learn, thank you so much in advance! 2016 QUESTION 1 Q 1(a) Obtain the z-Transforms of each of the following signals ITOTAL MARKS: 25] [6 Marks In] = cos (-_-) uln] 2 marks] u nun - marks] 0-S Q 1(b) The signal x[n], (of length 4 samples) is defined as: x[n-(1,-1,12) [7 Marks] (i) Write down the Discrete-time Fourier Transform (DTFT) of xn [2 marks] (i) pn]...

  • Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the p...

    Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the publisher contact for each book using JOIN...USING clause. Write a query to show the first and last names of customers who have ordered cooking books. Use the WHERE clause to join the tables. Write a query to show the title, cost and ISBN of each book in the books table. If the book has been ordered,...

  • please help with a detailed, fully explained answer for Question 2. thank you Read the case...

    please help with a detailed, fully explained answer for Question 2. thank you Read the case study below and answer the questions. SHORT RUN STABILIZATION AND LONG RUN COMPETITIVENESS: THE LAVITAN CASE Growth of a young country Latvia - a small, young country on the east coast of the Baltic Sea -has recently earned the title of a "tiger". After gaining its independence from the Soviet Union in 1991, the country embarked upon a challenging road of transitioning from a...

  • Can you please explain in simple terms the methods of this experiment? I'm having difficulty visualizing...

    Can you please explain in simple terms the methods of this experiment? I'm having difficulty visualizing and understanding what is being done. I have copied and pasted some of the text from the article. Thank you! Abstract : Obesity, high-fat diets, and subsequent type 2 diabetes (T2DM) are associated with cognitive impairment. Moreover, T2DM increases the risk of Alzheimer's disease (AD) and leads to abnormal elevation of brain beta-amyloid levels, one of the hallmarks of AD. The psychoactive alkaloid caffeine...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT