<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joins Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/joins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/joins/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Tue, 11 May 2021 05:26:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>DBMS Interview Q&#038;A Part- 2</title>
		<link>https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/</link>
		
		<dc:creator><![CDATA[Chandan Kumar]]></dc:creator>
		<pubDate>Tue, 11 May 2021 05:12:12 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[Denormalization]]></category>
		<category><![CDATA[Engineers]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Joins]]></category>
		<category><![CDATA[Locks]]></category>
		<category><![CDATA[Primary Key]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Transaction]]></category>
		<category><![CDATA[Trigger]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6166</guid>

					<description><![CDATA[<p>Q1. Can you create a table without using create command ? A. Yes, we can create table with the help [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/">DBMS Interview Q&#038;A Part- 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h5 class="wp-block-heading">Q1. Can you create a table without using create command ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Yes, we can create table with the help of SELECT INTO statement. It<br>copies content of one table to another table. However, there should be<br>at least one table from where we can copy content.<br>Example :  Copying all columns : select * into new_table from old_table where<br>condition<br>Copying specific column : select col1,col2 into new_table from old_table<br>where condition<br>Creating new empty table : select * into new_table from old_table where 1<br>= 0</p>



<h5 class="wp-block-heading">Q2. What is Denormalization ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> It is the reverse process of Normalization. It is the process of trying to<br>improve the readability of the database by grouping data. Denormalization<br>is also used for speeding up the performance.</p>



<h5 class="wp-block-heading">Q3. What are Joins ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Join clause are used to combine rows from two or more tables,<br>depending upon the columns between them.</p>



<h5 class="wp-block-heading">Q4. What are the different types of Joins ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Different types of Joins are :</p>



<ol class="wp-block-list"><li><strong>INNER JOIN</strong> : It returns all records that are common in both tables.</li><li><strong>LEFT OUTER JOIN</strong> : It returns all records from the left table, and matched records from right table</li><li><strong>RIGHT OUTER JOIN</strong> : It returns all records from the right table, and matched records from left table.</li><li><strong>FULL OUTER JOIN</strong> : It returns all records when there is a match in either left or right table.</li></ol>



<h5 class="wp-block-heading">Q5. Explain Transaction ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>Transaction refers to the collection of multiple statements, that are<br>responsible for transferring a database from one consistent state to another<br>consistent state.</p>



<h5 class="wp-block-heading">Q6. Explain the role of views in database ?</h5>



<p class="wp-block-paragraph">A.View refers to the virtual table. We can create view using create view<br>statement.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE VIEW as Select col1
FROM table1
where CONDITION;
</pre></div>


<h5 class="wp-block-heading">Q7. Explain Trigger ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Triggers are defined as special kind of stored programs, which are<br>automatically executed whenever a specific operation occurs in the<br>database server.</p>



<h5 class="wp-block-heading">Q8. What are Locks ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Locking is the mechanism to protect data integrity and ensure data<br>consistency during transactions. Locks are the most common cause of<br>blocked processes. Stronger the Isolation level, more the chances of<br>blocking.</p>



<h5 class="wp-block-heading">Q9. Explain different types of Locks ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Locks are broadly characterized into following types :</p>



<p class="wp-block-paragraph"><strong>Shared Locks</strong> : These locks are acquired by readers during read<br>operations. In other words, these locks exist when two transactions are<br>granted read access. Data updation is not allowed until shared lock is<br>released.<br><strong>Exclusive Locks</strong> : In exclusive lock, data items can be both read as well<br>as written by the transaction. In Exclusive lock, multiple transactions do not<br>modify the same data simultaneously.</p>



<h5 class="wp-block-heading">Q10. What is Super Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> An attribute or set of attributes that uniqueness in database is refered to<br>as Super key. It is the superset of Candidate key.</p>



<h5 class="wp-block-heading">Q11. What is Candidate Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A minimal set of attribute/attributes that can be used to uniquely identify<br>a single row in a given relation is refered to as Candidate key.</p>



<h5 class="wp-block-heading">Q12. Explain Primary Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> DB Designer selects one of the candidate key as primary key for a<br>relation for the purpose of identification of a tuple uniquely. It is identified<br>during table creation.</p>



<h5 class="wp-block-heading">Q13. What is Composite Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> If a primary key has more than one attribute, then it is referred to as<br>Composite key.</p>



<h5 class="wp-block-heading">Q14. Explain Foreign Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A set of attribute/attributes that is used to establish and enforce a link<br>between data in two or more relations.</p>



<h5 class="wp-block-heading">Q15. Can a table have more than one primary key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> No.</p>



<h5 class="wp-block-heading">Q16. Can We Have NULL Value in Primary Key?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> No.</p>



<h5 class="wp-block-heading">Q17. What are cursors ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A cursor is a temporary work area created in system memory when a<br>SQL statement is executed. A cursor can hold more than one row, but can<br>process only one row at a time.</p>



<h5 class="wp-block-heading">Q18.<strong>What are the differences between Hash join, Merge join and Nested loops?</strong></h5>



<figure class="wp-block-table"><table><tbody><tr><td class="has-text-align-center" data-align="center"><strong>Hash join</strong></td><td class="has-text-align-center" data-align="center"><strong>Merge join</strong></td><td class="has-text-align-center" data-align="center"><strong>Nested loops</strong></td></tr><tr><td class="has-text-align-center" data-align="center">The hash join is used when you have to join large tables.</td><td class="has-text-align-center" data-align="center">Merge join is used when projections of the joined tables are sorted on the join columns.</td><td class="has-text-align-center" data-align="center">The nested loop consists of an outer loop and an inner loop.</td></tr></tbody></table></figure>



<h5 class="wp-block-heading">Q19. <strong>What do you understand by Proactive, Retroactive and Simultaneous Update</strong> ?</h5>



<ol class="wp-block-list"><li><strong>Proactive Update:</strong> These updates are applied to the database before it becomes effective in the real-world environment.</li><li><strong>Retroactive Update:</strong> These retroactive updates are applied to a database after it becomes effective in the real-world environment.</li><li><strong>Simultaneous Update:</strong> These updates are applied to the database at the same instance of time as it becomes effective in a real-world environment.</li></ol>



<h5 class="wp-block-heading">Q20.<strong>What do you understand by Data Independence?</strong></h5>



<p class="wp-block-paragraph"><strong>A. </strong>When you say an application has data independence, it implies that the application is independent of the storage structure and data access strategies of data.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/">DBMS Interview Q&#038;A Part- 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
