<?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>Database Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/category/database/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Mon, 19 Jun 2023 13:30:29 +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>Top 50 DataOps Interview Questions with Answers</title>
		<link>https://www.scmgalaxy.com/tutorials/top-50-dataops-interview-questions-with-answers/</link>
					<comments>https://www.scmgalaxy.com/tutorials/top-50-dataops-interview-questions-with-answers/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Sat, 29 Apr 2023 06:55:44 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=10005</guid>

					<description><![CDATA[<p>1. What is DataOps? A. A system of tools to manage dataB. A methodology for collaboration and communicationC. A type [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-50-dataops-interview-questions-with-answers/">Top 50 DataOps Interview Questions with Answers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/04/image-3.png" alt="" class="wp-image-10006" width="655" height="365" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/04/image-3.png 538w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/04/image-3-300x167.png 300w" sizes="(max-width: 655px) 100vw, 655px" /><figcaption class="wp-element-caption"><strong><em>DataOps Interview Questions with Answers</em></strong></figcaption></figure>
</div>


<h3 class="wp-block-heading">1. What is DataOps?</h3>



<p class="wp-block-paragraph">A. A system of tools to manage data<br>B. A methodology for collaboration and communication<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: B</h4>



<h3 class="wp-block-heading">2. What is the main goal of DataOps?</h3>



<p class="wp-block-paragraph">A. To automate data processes<br>B. To improve data quality<br>C. To speed up data delivery<br>D. All of the above</p>



<h4 class="wp-block-heading">Answer: D</h4>



<h3 class="wp-block-heading">3. What is a data pipeline?</h3>



<p class="wp-block-paragraph">A. A method for transferring data from source to destination<br>B. A visualization of data flow within a system<br>C. A database that stores large amounts of data</p>



<h4 class="wp-block-heading">Answer: A</h4>



<ol class="wp-block-list" start="4">
<li>What is a data lake?<br>A. A storage repository for all types of data<br>B. A type of database management system<br>C. A tool used for data analysis and visualization</li>
</ol>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">5. What is a data warehouse?</h3>



<p class="wp-block-paragraph">A. A storage repository for all types of data<br>B. A type of database management system<br>C. A tool used for data analysis and visualization</p>



<h4 class="wp-block-heading">Answer: B</h4>



<h3 class="wp-block-heading">6. What is version control?</h3>



<p class="wp-block-paragraph">A. A system for managing changes to data<br>B. A way of keeping track of multiple copies of the same file<br>C. A tool used for data analysis and visualization</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">7. What is ETL?</h3>



<p class="wp-block-paragraph">A. Extract, Transfer, Load<br>B. Extract, Transform, Load<br>C. Extract, Translate, Load</p>



<h4 class="wp-block-heading">Answer: B</h4>



<h3 class="wp-block-heading">8. What is the purpose of data profiling?</h3>



<p class="wp-block-paragraph">A. To identify patterns and trends in data<br>B. To clean and standardize data<br>C. To assess the quality of data</p>



<h4 class="wp-block-heading">Answer: C</h4>



<ol class="wp-block-list" start="9">
<li>What is data governance?<br>A. A set of policies and procedures for managing data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</li>
</ol>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">10. What is data lineage?</h3>



<p class="wp-block-paragraph">A. A way of tracking data from source to destination<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">11. What is a data dictionary?</h3>



<p class="wp-block-paragraph">A. A tool used for data analysis and visualization<br>B. A database that stores large amounts of data<br>C. A document that describes the structure and contents of a database</p>



<h4 class="wp-block-heading">Answer: C</h4>



<h3 class="wp-block-heading">12. What is a schema?</h3>



<p class="wp-block-paragraph">A. A document that describes the structure and contents of a database<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">13. What is the difference between a primary key and a foreign key?</h3>



<p class="wp-block-paragraph">A. A primary key is a unique identifier for a record, while a foreign key is a reference to a primary key in another table<br>B. A primary key is a reference to a foreign key in another table, while a foreign key is a unique identifier for a record<br>C. There is no difference</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">14. What is a data model?</h3>



<p class="wp-block-paragraph">A. A visualization of data flow within a system<br>B. A document that describes the structure and contents of a database<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: B</h4>



<h3 class="wp-block-heading">15. What is a data mart?</h3>



<p class="wp-block-paragraph">A. A subset of a data warehouse that is designed for a specific business unit or function<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">16. What is a data pipeline framework?</h3>



<p class="wp-block-paragraph">A. A set of tools and technologies used to build and manage data pipelines<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">17. What is a data catalog?</h3>



<p class="wp-block-paragraph">A. A tool used for data analysis and visualization<br>B. A document that describes the structure and contents of a database<br>C. A central repository for managing data assets</p>



<h4 class="wp-block-heading">Answer: C</h4>



<h3 class="wp-block-heading">18. What is data integration?</h3>



<p class="wp-block-paragraph">A. The process of combining data from different sources into a single, unified view<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">19. What is metadata management?</h3>



<p class="wp-block-paragraph">A. The process of managing data about data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">20. What is data mining?</h3>



<p class="wp-block-paragraph">A. The process of analyzing large amounts of data to discover patterns and trends<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">21. What is data augmentation?</h3>



<p class="wp-block-paragraph">A. The process of increasing the size of a dataset by adding additional data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">22. What is data curation?</h3>



<p class="wp-block-paragraph">A. The process of managing and maintaining data to ensure its quality and usability<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">23. What is a data governance framework?</h3>



<p class="wp-block-paragraph">A. A set of policies and procedures for managing data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">24. What is data lineage tracking?</h3>



<p class="wp-block-paragraph">A. A way of tracking data from source to destination<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">25. What is data visualization?</h3>



<p class="wp-block-paragraph">A. The process of representing data in a visual form, such as a chart or graph<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">26. What is a data warehouse schema?</h3>



<p class="wp-block-paragraph">A. A document that describes the structure and contents of a database<br>B. A tool used for data analysis and visualization<br>C. A specific way of organizing data in a data warehouse</p>



<h4 class="wp-block-heading">Answer: C</h4>



<h3 class="wp-block-heading">27. What is data quality?</h3>



<p class="wp-block-paragraph">A. The degree to which data is accurate, complete, and consistent<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">28. What is data preprocessing?</h3>



<p class="wp-block-paragraph">A. The process of cleaning and transforming data before analysis<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<ol class="wp-block-list" start="29">
<li>What is data security?<br>A. The protection of data from unauthorized access or use<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</li>
</ol>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">30. What is data replication?</h3>



<p class="wp-block-paragraph">A. The process of copying data from one location to another<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">31. What is a data profile?</h3>



<p class="wp-block-paragraph">A. A summary of the characteristics of a dataset<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">32. What is data transformation?</h3>



<p class="wp-block-paragraph">A. The process of converting data from one format to another<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">33. What is a data lake architecture?</h3>



<p class="wp-block-paragraph">A. The structure and design of a data lake system<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">34. What is a data pipeline architecture?</h3>



<p class="wp-block-paragraph">A. The structure and design of a data pipeline system<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">35. What is data governance maturity?</h3>



<p class="wp-block-paragraph">A. The level of maturity of a company’s data governance program<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">36. What is data standardization?</h3>



<p class="wp-block-paragraph">A. The process of ensuring data is consistent and follows a standard format<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">37. What is data parallelization?</h3>



<p class="wp-block-paragraph">A. The process of splitting large tasks into smaller tasks and executing them in parallel<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">38. What is data scalability?</h3>



<p class="wp-block-paragraph">A. The ability of a system to manage a growing amount of data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">39. What is data latency?</h3>



<p class="wp-block-paragraph">A. The time delay between data being generated and being available for use<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">40. What is data lineage analysis?</h3>



<p class="wp-block-paragraph">A. The process of tracing data from source to destination to understand its flow and usage<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">41. What is data governance certification?</h3>



<p class="wp-block-paragraph">A. A process for validating a company’s data governance program<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">42. What is data quality auditing?</h3>



<p class="wp-block-paragraph">A. The process of analyzing and evaluating data quality to identify areas for improvement<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">43. What is data backup and recovery?</h3>



<p class="wp-block-paragraph">A. The process of creating copies of data to protect against data loss<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">44. What is data modeling and design?</h3>



<p class="wp-block-paragraph">A. The process of designing and creating a data model for a database or system<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">45. What is data governance policy?</h3>



<p class="wp-block-paragraph">A. A set of rules and guidelines for managing data within an organization<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">46. What is data mesh architecture?</h3>



<p class="wp-block-paragraph">A. A distributed data architecture that promotes decentralized data ownership and governance<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">47. What is data orchestration?</h3>



<p class="wp-block-paragraph">A. The process of coordinating and managing data pipelines and workflows<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">48. What is data governance maturity model?</h3>



<p class="wp-block-paragraph">A. A framework for assessing the maturity level of a company’s data governance program<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">49. What is data science pipeline?</h3>



<p class="wp-block-paragraph">A. The end-to-end process of extracting insights from data<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>



<h3 class="wp-block-heading">50. What is data wrangling?</h3>



<p class="wp-block-paragraph">A. The process of cleaning, transforming, and preparing data for analysis<br>B. A tool used for data analysis and visualization<br>C. A type of database management system</p>



<h4 class="wp-block-heading">Answer: A</h4>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-50-dataops-interview-questions-with-answers/">Top 50 DataOps Interview Questions with Answers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/top-50-dataops-interview-questions-with-answers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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>
		<item>
		<title>DBMS Interview Q&#038;A Part- 1</title>
		<link>https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-1/</link>
					<comments>https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-1/#respond</comments>
		
		<dc:creator><![CDATA[Chandan Kumar]]></dc:creator>
		<pubDate>Mon, 10 May 2021 06:36:50 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Questions]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6147</guid>

					<description><![CDATA[<p>Q. What is Data ? A. Data refers to raw facts and figures that can be recorded. Q. What is [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-1/">DBMS Interview Q&#038;A Part- 1</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h5 class="wp-block-heading">Q. What is Data  ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Data refers to raw facts and figures that can be recorded.</p>



<h5 class="wp-block-heading">Q. What is Database ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>Database refers to the collection of interrelated and coherent data.</p>



<h5 class="wp-block-heading">Q. Explain DBMS ?</h5>



<p class="wp-block-paragraph" id="block-6dd739f4-3f59-4e01-bc84-3fe42e47a63e"><strong>A.</strong> DBMS stands for Database Management System. It is a software<br>package designed to define, manipulate, retrieve and manage data in<br>database.</p>



<h5 class="wp-block-heading">Q. Why DBMS ?</h5>



<p class="wp-block-paragraph" id="block-be293b80-1ba9-4550-b118-ec6b9d119b99"><strong>A.</strong> To make information easy to access and protected, we use database<br>management systems. DBMS is important because it manages the data<br>efficiently and allow users to perform multiple tasks on it with the ease.</p>



<h5 class="wp-block-heading">Q. What is a database system?</h5>



<p class="wp-block-paragraph" id="block-87aacc1a-6300-4442-ba51-444d3e959c87"><strong>A. </strong>The collection of database and DBMS software together is known as a<br>database system.</p>



<h5 class="wp-block-heading">Q. What do you mean by Data Modelling ?</h5>



<p class="wp-block-paragraph" id="block-046c18f7-6254-4c7b-8d1d-520b0a082bab"><strong>A.</strong> Data Modelling is the set of conceptual tools for describing data<br>relationship, data semantics, and consistency constraints. Different data<br>models are : Network model, Relational model, Object Oriented model, ER<br>model, and more.</p>



<h5 class="wp-block-heading">Q. Explain RDBMS ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> RDBMS stands for Relational Database Management System. It<br>arranges information into allied rows and columns. RDMS is an information<br>management system which is oriented on a data model. RDBMS Example<br>systems are SQL Server, Oracle, MySQL, MariaDB and SQLite.</p>



<h5 class="wp-block-heading">Q. Explain Abstraction of Data, with reference to DBMS ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Data Abstraction refers to the process of hiding background details from<br>user.</p>



<h5 class="wp-block-heading">Q. Explain the 3 L’s of Data Abstraction ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>It refers to three levels of abstraction. They are :</p>



<ol class="wp-block-list"><li><strong>Physical Level </strong>: It is lowest level of abstraction. It describes how data is<br>actually stored. It also describes complex data structure in detail.</li><li><strong>Logical Level</strong> : It describes what data get stored in the database and what are the relationships among them.</li><li><strong>View Level </strong>: It is the highest level of data abstraction that only describes a part of database indirectly</li></ol>



<h5 class="wp-block-heading">Q. What is Database Schema ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Schema refers to the overall structure of database without data values.</p>



<h5 class="wp-block-heading">Q. What do you mean by transparent DBMS?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>The transparent DBMS is a type of DBMS which keeps its physical<br>structure hidden from users.</p>



<h5 class="wp-block-heading">Q. Explain ER Model ?</h5>



<p class="wp-block-paragraph">A. This model is based on the perception of real world that consists of<br>collection of basic entities and relationship among these objects. It is the<br>graphical representation of the database.</p>



<h5 class="wp-block-heading">Q. What do you understand by Data Independency ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>It refers to the capacity to change data at one level without affecting next<br>higher level is called Data Independence. It is of two types : Physical DI,<br>Logical DI.<br><strong>Physical DI :</strong> It indicates that physical storage of device could be changed<br>without affecting conceptual view.<br><strong>Logical DI :</strong> It indicates that conceptual schema can be changed without<br>affecting existing external schema.</p>



<h5 class="wp-block-heading">Q. What is a Database Language ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>Database Language is a medium by which we can interact with the<br>database system through some set of commands. These commands are<br>structured.</p>



<h5 class="wp-block-heading">Q. What is a Tuple ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A single row of a table, which contains a single record for that relation is<br>called a tuple.</p>



<h5 class="wp-block-heading">Q. Explain degree and Cardinality ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Degree is the total number of attributes in a relation or table and<br>cardinality is total number of tuples/rows in a relation/table.</p>



<h5 class="wp-block-heading">Q. What is a relation in DBMS ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>A database relation refers to an individual table in a relational database.<br>A table is a relation because it stores the relation between data in its<br>column-row format.</p>



<h5 class="wp-block-heading">Q. What is the role of DML Compiler ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>It translates DML statements in a query language into low-level<br>instructions that the query evaluation engine can easily understand.</p>



<h5 class="wp-block-heading">Q. Explain me the role of using clause for queries ?</h5>



<p class="wp-block-paragraph">A. Clause enables you to specify conditions that filters the results as per<br>the requirement. Some of the most commonly used clauses are : having,<br>where etc.</p>



<h5 class="wp-block-heading">Q. What is a Query ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>Query is a statement that is used for the extraction of data from<br>database.<br>For example – select * from table1 is a query</p>



<h5 class="wp-block-heading">Q. What is Subquery ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Subquery is a query within query.<br>For example – select * from students where marks = ( select max(marks)<br>from students);</p>



<h5 class="wp-block-heading">Q. Explain BCNF ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> BCNF is Boyce-Codd Normal Form. It is considered to be the advanced<br>version of 3 NF. Hence it is also refered to as 3.5 NF. A relation is said to<br>be in BCNF, if it satisfies following rules :</p>



<ol class="wp-block-list"><li>It is in 3NF.</li><li>For every functional dependency P->Q, P should be the super key of the table.</li></ol>



<h5 class="wp-block-heading">Q. What are Stored Procedures ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Stored Procedure refers to the set of Structured Query Language(SQL)<br>statements stored in a relational database management system as a group.<br>It can further be reused and shared by multiple programs. It provides a<br>layer of security between a user interface and database.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-1/">DBMS Interview Q&#038;A Part- 1</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Queries</title>
		<link>https://www.scmgalaxy.com/tutorials/sql-queries/</link>
					<comments>https://www.scmgalaxy.com/tutorials/sql-queries/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Mon, 05 Apr 2021 13:03:02 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[Case]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[having]]></category>
		<category><![CDATA[maximum]]></category>
		<category><![CDATA[minimum]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[Update]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5796</guid>

					<description><![CDATA[<p> 👉  To give a table, or a column in a table, a temporary name we can use Alias: For example [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sql-queries/">SQL Queries</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" />  To give a table, or a column in a table, a temporary name we can use Alias:</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT "column_name" AS "column_Alias" FROM "table_name";</strong></code></pre>



<p class="wp-block-paragraph">For example we have a table with column_name as &#8220;<strong>SNo&#8221; </strong>, &#8220;<strong>Country</strong>&#8221; and &#8220;<strong>Capital</strong>&#8221; and we want to update it as &#8220;<strong>Serial Number</strong>&#8221; , &#8220;<strong>State</strong>&#8221; and &#8220;<strong>Country_Capital </strong>then we will run the following command:</p>



<script src="https://gist.github.com/Joydeep-cotocus/f6ede3b49a0364ccf16604490c48a399.js"></script>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> To count the number of rows in the table:</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT COUNT(column_name) AS (alias_name) FROM table_name;</strong></code></pre>



<p class="wp-block-paragraph">For example we want to count number of orders placed by a particular customer from customer_table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/0436d5c8365a64c8e58995edd2419abd.js"></script>



<p class="wp-block-paragraph">This will show the count of numbers of order places by the customer id &#8220;CG-1234&#8242; and the products ordered.</p>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> To add the values in a columns we use Sum command:</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT SUM (column_name) FROM table_name;</strong></code></pre>



<p class="wp-block-paragraph">For example we want to add the profit amount from the sales table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/e9e4a806d7e4275e8f2041fea7b98285.js"></script>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> To find out an average for a column in the table:</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT AVG (column_name) FROM table_name;</strong></code></pre>



<p class="wp-block-paragraph">For example we need to find the average age of the customers from customer table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/0fcdd7adfda8ba89bca71e3066372c93.js"></script>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" />To find the minimum and the maximum value in a table:</strong></p>



<ul class="wp-block-list"><li>Minimum</li></ul>



<pre class="wp-block-code"><code><strong>SELECT MIN (column_name) FROM table_name;</strong></code></pre>



<p class="wp-block-paragraph">For example we want to find the minimum order sale made for a product from sales table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/b6e7bf0b41b16fab3cd213d4eab8f634.js"></script>



<ul class="wp-block-list"><li>Maximum</li></ul>



<pre class="wp-block-code"><code><strong>SELECT MAX (column_name) FROM table_name;</strong></code></pre>



<p class="wp-block-paragraph">For example we want to find the maximum order sale made for a product from sales table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/1015c106530bf6c170620e7d74c34284.js"></script>



<p class="has-text-align-left wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> To groups rows that have the same values into summary rows, like &#8220;find the number of customers in each region&#8221; we use GROUP BY statement. The GROUP BY statement is often used with aggregate functions (COUNT(), MAX(), MIN(), SUM(), AVG()) to group the result-set by one or more columns.</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT "column_name","function-type" (column_name) FROM table_name Group By "column-name";</strong></code></pre>



<p class="wp-block-paragraph">For example we need to find the number orders places in each region in the table:</p>



<script src="https://gist.github.com/Joydeep-cotocus/4410047ac5955b5e7d7992b07508ca15.js"></script>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong> <strong>To make conditions for aggregate functions we use HAVING clause. The difference between Having clause and Where clause is that we cannot make conditions in aggregate functions whereas we can make conditions in aggregate functions using Having clause.</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT column_name, AGGREGATE FUNCTION column_name FROM tables GROUP BY (column1) HAVING condition;</strong></code></pre>



<p class="wp-block-paragraph">For example we have some set of customers in four regions and we want to see in which region the count of customers is more than 200. In this scenario we will use the HAVING clause and set a condition of count more than 200.</p>



<script src="https://gist.github.com/Joydeep-cotocus/a6e3f81522f57ff8686cdcb7c6534dbb.js"></script>



<p class="wp-block-paragraph">This command will show the count of customers in the regions where it is more than 200.</p>



<p class="wp-block-paragraph"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong> <strong>To go through a condition and return a value when the first condition is met (like an if-then-else statement) &#8220;CASE&#8221; statement is used. So, once a condition is true, it will stop reading and return the result. If no conditions are true, it returns the value in the <code>ELSE</code> clause.</strong></p>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT * CASE WHEN condition THEN result ELSE result END;</strong></code></pre>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/sql-queries/">SQL Queries</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/sql-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Alter Table in MySql</title>
		<link>https://www.scmgalaxy.com/tutorials/alter-table-in-mysql/</link>
					<comments>https://www.scmgalaxy.com/tutorials/alter-table-in-mysql/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Sat, 03 Apr 2021 12:42:14 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[alter table]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[modify]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[where]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5794</guid>

					<description><![CDATA[<p>In this tutorial we will see the commands which we can use to make changes in our table (as per [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/alter-table-in-mysql/">Alter Table in MySql</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In this tutorial we will see the commands which we can use to make changes in our table (as per <strong>April 2k21</strong>).</p>



<ul class="wp-block-list"><li>To add a column in an existing table:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>ALTER TABLE </strong>table_name <strong>ADD </strong>column_name <strong>DATATYPE</strong>;</code></pre>



<ul class="wp-block-list"><li>To delete a column in an existing table:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>ALTER TABLE </strong>table_name <strong>DROP </strong>column_name;</code></pre>



<ul class="wp-block-list"><li>To change the data type of a column in an existing table:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>ALTER TABLE </strong>table_name <strong>MODIFY COLUMN </strong>column_name <strong>NEW DATA TYPE;</strong></code></pre>



<ul class="wp-block-list"><li>To rename a column in an existing table:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>ALTER TABLE</strong> table_name <strong>CHANGE </strong>column_name <strong>NEW_COLUMN_NAME</strong>;</code></pre>



<ul class="wp-block-list"><li>To update the column as NOT NULL Constraint:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>ALTER TABLE </strong>table_name <strong>MODIFY </strong>column_name <strong>DATATYPE NOT NULL;</strong></code></pre>



<ul class="wp-block-list"><li>To Sort the data in the Table:</li></ul>



<pre class="wp-block-code"><code>Syntax: <strong>SELECT </strong>"column_name" <strong>FROM </strong>"table-name" &#91;<strong>WHERE </strong>"condition"] <strong>ORDER BY </strong>"column_name" &#91;<strong>ASC/DESC</strong>];</code></pre>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/alter-table-in-mysql/">Alter Table in MySql</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/alter-table-in-mysql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySql queries:</title>
		<link>https://www.scmgalaxy.com/tutorials/mysql-queries/</link>
					<comments>https://www.scmgalaxy.com/tutorials/mysql-queries/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Fri, 02 Apr 2021 12:30:57 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[queries]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5790</guid>

					<description><![CDATA[<p>Inserting data into a existing table: Syntax without column names specified: Example: In the example we have inserted the data [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-queries/">MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Inserting data into a existing table:</strong></p>



<p class="wp-block-paragraph">Syntax without column names specified:</p>



<pre class="wp-block-code"><code>INSERT INTO table_name VALUES ('value1','value2');</code></pre>



<p class="wp-block-paragraph">Example:</p>



<script src="https://gist.github.com/Joydeep-cotocus/e7cfffffea5ffab8fde1dc9144ea6dbc.js"></script>



<p class="wp-block-paragraph">In the example we have inserted the data in a customer_table where we have 4 columns with name cust_id, first_name, last_name, age and we have inserted the data in the columns with this command.</p>



<p class="wp-block-paragraph">Syntax without column names specified:</p>



<pre class="wp-block-code"><code>INSERT INTO table_name ('column1','column2') VALUES ('value1','value2');</code></pre>



<p class="wp-block-paragraph">Example:</p>



<script src="https://gist.github.com/Joydeep-cotocus/2fad1e79c63ad00da25c866ea8bf0ec7.js"></script>



<p class="wp-block-paragraph">In this example we have inserted the data in three columns excluding the last_name column, by doing this it will store the information in all the columns and will show NULL in the last_name.</p>



<p class="wp-block-paragraph"><strong>Inserting data in multiple rows:</strong></p>



<script src="https://gist.github.com/Joydeep-cotocus/6f6678e2ac3440fe59b546a0dcddb297.js"></script>



<ul class="wp-block-list"><li>To &#8216;SELECT&#8217; a statement in a table:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name;</code></pre>



<p class="wp-block-paragraph">Following command will show the data stored in the column_name column in the database.</p>



<ul class="wp-block-list"><li>To use &#8216;WHERE&#8217; command in a table:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name Where (column_name = condition);</code></pre>



<p class="wp-block-paragraph">For example:</p>



<p class="wp-block-paragraph">We have a table with Customers name , age and email given and we need to see only the data of customer whose age is greater than 25.</p>



<pre class="wp-block-code"><code>Select * from customer_table where age>25;</code></pre>



<p class="wp-block-paragraph">This command will show the data of the customers whose age is greater than 25.</p>



<ul class="wp-block-list"><li>To use logical operators in the query:</li></ul>



<pre class="wp-block-code"><code>Select column_name from table_name Where (column_name = condition) AND (column_name = condition) OR (column_name = condition);</code></pre>



<ul class="wp-block-list"><li>To update data in the table:</li></ul>



<pre class="wp-block-code"><code>UPDATE table_name SET column_name='abc' WHERE condition(column);</code></pre>



<p class="wp-block-paragraph">For example to update the last name of a customer:</p>



<pre class="wp-block-code"><code>UPDATE customer_table SET Last_name='John' WHERE cust_id=5</code></pre>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/mysql-queries/">MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/mysql-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Creating a Table using MySql queries:</title>
		<link>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/</link>
					<comments>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Thu, 01 Apr 2021 12:37:37 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[query]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5785</guid>

					<description><![CDATA[<p>In this we will learn how we can create tables in the database using sql queries. As we know it [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/">Creating a Table using MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In this we will learn how we can create tables in the database using sql queries. As we know it becomes quite complicated to make the tables manually in the database. To ease the process we can follow the steps to make tables using my sql queries.</p>



<p class="wp-block-paragraph"><strong>Syntax:</strong></p>



<pre class="wp-block-code"><code>CREATE TABLE table_name (
    column1 column1 datatype column1 constraint,
    column2 column2 datatype column2 constraint,
    column3 column3 datatype column3 constraint,
   ....
);</code></pre>



<p class="wp-block-paragraph"><strong>Constraints:</strong></p>



<ul class="wp-block-list"><li><strong>NOT NULL CONSTRAINT</strong> &#8211; Ensures that a column cannot have a null value.</li><li><strong>DEFAULT CONSTRAINT</strong> &#8211; Provides a default value for a column when none is specified.</li><li><strong>UNIQUE CONSTRAINT</strong> &#8211; Ensures that all value in a column are different.</li><li><strong>CHECK CONSTRAINT </strong>&#8211; Make sure all values in a column satisfy certian criteria.</li><li><strong>PRIMARY_KEY CONSTRAINT </strong>&#8211; Used to uniquely identify a row in a table.</li><li><strong>FOREIGN_KEY CONSTRAINT </strong>&#8211; Used to ensure referential integrity of the data.</li></ul>



<p class="wp-block-paragraph"><strong>Keys:</strong></p>



<ul class="wp-block-list"><li>A primary key is used to uniquely identify each row in a table.</li><li>A primary key can consists of one or more columns on a table.</li><li>When multiple columns are used as primary key, it is called as Composite key.</li><li>A foreign key is a column (or columns) that references a column (most often primary key) of other table.</li><li>The purpose of foreign key is to referential integrity of the data.</li></ul>



<figure class="wp-block-image size-large"><img decoding="async" width="904" height="362" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1.jpg" alt="" class="wp-image-5786" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1.jpg 904w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1-300x120.jpg 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/04/Untitled-1-768x308.jpg 768w" sizes="(max-width: 904px) 100vw, 904px" /></figure>



<p class="wp-block-paragraph">As shown in the above picture, Cust_ID is the foreign key for order table whereas it is primary key for in the Customer table that means the value of Cust_ID will not change in either of the table.</p>



<p class="wp-block-paragraph">For example we will create a table named as customer_table inside the &#8216;test&#8217; database:</p>



<script src="https://gist.github.com/Joydeep-cotocus/f9cd72fcba465481909e066d538a3eb2.js"></script>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/">Creating a Table using MySql queries:</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/creating-a-table-using-my-sql-queries/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
