<?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>memory database &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/memory-database/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 17 Dec 2017 20:35:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server 2016: Columnstore Index on Memory Optimized In Memory OLTP Tables</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 07 Jan 2018 16:16:46 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[column store index]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Hekaton]]></category>
		<category><![CDATA[In-Memory Database]]></category>
		<category><![CDATA[memory database]]></category>
		<category><![CDATA[Memory Optimized Table]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4201</guid>

					<description><![CDATA[<div><img width="675" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLRam.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLRam" decoding="async" fetchpriority="high" /></div>Microsoft SQL Server 2016 comes with a variety of new additions and I am happy for exploring the new features of SQL Server 2016. Microsoft SQL Server 2014 introduced Hekaton engine which used for In-Memory Database objects. SQL Server 2014: Create Memory Optimized File Group and Table SQL Server 2016 introduced Columnstore index for Memory-Optimized [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="675" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLRam.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLRam" decoding="async" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&#038;title=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables/" data-a2a-title="SQL Server 2016: Columnstore Index on Memory Optimized In Memory OLTP Tables"></a></p><p>Microsoft SQL Server 2016 comes with a variety of new additions and I am happy for exploring the new features of SQL Server 2016.</p>
<p>Microsoft SQL Server 2014 introduced Hekaton engine which used for In-Memory Database objects.</p>
<blockquote class="wp-embedded-content" data-secret="dA5hDdDtd2"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/">SQL Server 2014: Create Memory Optimized File Group and Table</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/embed/#?secret=dA5hDdDtd2" data-secret="dA5hDdDtd2" width="600" height="338" title="&#8220;SQL Server 2014: Create Memory Optimized File Group and Table&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>SQL Server 2016 introduced Columnstore index for Memory-Optimized Table which was not possible previously.<br />
If you are planning to store large amount of data In Memory, you can apply Columnstore Index on that In Memory OLTP Table.</p></blockquote>
<blockquote><p>It comes with one condition: you can not apply Columnstore Index on the particular column. It must apply to all the columns of In-Memory Table.</p></blockquote>
<p><strong>Small demonstration with all the possible errors:</strong></p>
<p><strong>Create a sample memory optimized table with column store index:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>You will get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 41321, Level 16, State 7, Line 1
The memory optimized table 'tbl_Employees' with DURABILITY=SCHEMA_AND_DATA must have a primary key.</pre> </p>
<p><strong>Add primary key on script and execute it:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT PRIMARY KEY
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>You will get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 12317, Level 16, State 78, Line 3
Clustered indexes, which are the default for primary keys, are not supported with memory optimized tables. Specify a NONCLUSTERED index instead.</pre> </p>
<p><strong>Apply Non Clustered Primary key and execute it:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT PRIMARY KEY NONCLUSTERED
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>If you have not created Memory Optimized File group and related files, you may get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 41337, Level 16, State 100, Line 1
Cannot create memory optimized tables. To create memory optimized tables, the database must have a MEMORY_OPTIMIZED_FILEGROUP that is online and has at least one container.</pre> </p>
<p><strong>Create memory optimized file group and data files:<br />
</strong></p><pre class="crayon-plain-tag">USE [master]
GO
ALTER DATABASE [Database_Name] 
ADD FILEGROUP [Memory_Optimized] CONTAINS MEMORY_OPTIMIZED_DATA 
GO
ALTER DATABASE [Database_Name] 
ADD FILE ( NAME = N'HekatonMemory', FILENAME = N'C:\Hekaton\hek.mdf' ) 
TO FILEGROUP [Memory_Optimized]
GO</pre><p> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL: Can we create In memory Database or Table?</title>
		<link>https://www.dbrnd.com/2017/04/postgresql-can-we-create-in-memory-database-or-table-memory-engine/</link>
					<comments>https://www.dbrnd.com/2017/04/postgresql-can-we-create-in-memory-database-or-table-memory-engine/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 16 Apr 2017 16:16:31 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[In memory]]></category>
		<category><![CDATA[memory database]]></category>
		<category><![CDATA[memory table]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5034</guid>

					<description><![CDATA[The concept of In-memory database is getting its popularity because of fast retrieval of data. I already shared a couple of articles on In-memory database theory and its available in SQL Server and MySQL. Database Theory: What is In-memory Database? SQL Server 2014: What is Hekaton? The Memory or Heap Storage Engine of MySQL Many [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&amp;linkname=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fpostgresql-can-we-create-in-memory-database-or-table-memory-engine%2F&#038;title=PostgreSQL%3A%20Can%20we%20create%20In%20memory%20Database%20or%20Table%3F" data-a2a-url="https://www.dbrnd.com/2017/04/postgresql-can-we-create-in-memory-database-or-table-memory-engine/" data-a2a-title="PostgreSQL: Can we create In memory Database or Table?"></a></p><p>The concept of In-memory database is getting its popularity because of fast retrieval of data. </p>
<p>I already shared a couple of articles on In-memory database theory and its available in SQL Server and MySQL. </p>
<blockquote class="wp-embedded-content" data-secret="ZFyH4N3nIU"><p><a href="https://www.dbrnd.com/2015/12/database-theory-what-is-in-memory-database/">Database Theory: What is In-memory Database?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/database-theory-what-is-in-memory-database/embed/#?secret=ZFyH4N3nIU" data-secret="ZFyH4N3nIU" width="600" height="338" title="&#8220;Database Theory: What is In-memory Database?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="YlD9kQaL3e"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/">SQL Server 2014: What is Hekaton?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/embed/#?secret=YlD9kQaL3e" data-secret="YlD9kQaL3e" width="600" height="338" title="&#8220;SQL Server 2014: What is Hekaton?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="72uKTfEbeG"><p><a href="https://www.dbrnd.com/2015/08/the-memory-or-heap-storage-engine-of-mysql/">The Memory or Heap Storage Engine of MySQL</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/08/the-memory-or-heap-storage-engine-of-mysql/embed/#?secret=72uKTfEbeG" data-secret="72uKTfEbeG" width="600" height="338" title="&#8220;The Memory or Heap Storage Engine of MySQL&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>Many of Postgres developers are looking for In-memory database or table implementation in PostgreSQL.<br />
But the truth is, This is not possible in PostgreSQL, and it doesn&#8217;t offer any in memory database or engine like SQL Server, MySQL. </p>
<p>I read many different articles, and everyone is saying the same thing. </p>
<p>I found another alternative to an automatic way to erase the database cluster and reinitialize it using initdb, But I am not sure about this.</p>
<p>So PostgreSQL doesn&#8217;t provide any direct feature of In-memory database.<br />
If you guys have any alternative solution, please share it via comments&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2017/04/postgresql-can-we-create-in-memory-database-or-table-memory-engine/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-11)</title>
		<link>https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 22 Jun 2016 19:18:03 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Developer]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[fetch]]></category>
		<category><![CDATA[Hekaton]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[memory database]]></category>
		<category><![CDATA[memory table]]></category>
		<category><![CDATA[offset]]></category>
		<category><![CDATA[Pivot]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[schemabinding]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[unpivot]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3066</guid>

					<description><![CDATA[What is In-memory Database? Database Theory: What is In-memory Database? What is Hekaton in SQL Server 2014? SQL Server 2014: What is Hekaton? How to create memory optimized table in SQL Server 2014? SQL Server 2014: Create Memory Optimized File Group and Table I want to turn the unique record from multiple rows to multiple [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11%2F&#038;title=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-11%29" data-a2a-url="https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-memory-hekaton-offset-fetch-pivot-unpivot-with-schemabinding-day-11/" data-a2a-title="SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-11)"></a></p><p><strong>What is In-memory Database?</strong></p>
<blockquote class="wp-embedded-content" data-secret="20p6VsNGKF"><p><a href="https://www.dbrnd.com/2015/12/database-theory-what-is-in-memory-database/">Database Theory: What is In-memory Database?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/database-theory-what-is-in-memory-database/embed/#?secret=20p6VsNGKF" data-secret="20p6VsNGKF" width="600" height="338" title="&#8220;Database Theory: What is In-memory Database?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is Hekaton in SQL Server 2014?</strong></p>
<blockquote class="wp-embedded-content" data-secret="PGyhLLADrO"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/">SQL Server 2014: What is Hekaton?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/embed/#?secret=PGyhLLADrO" data-secret="PGyhLLADrO" width="600" height="338" title="&#8220;SQL Server 2014: What is Hekaton?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>How to create memory optimized table in SQL Server 2014?</strong></p>
<blockquote class="wp-embedded-content" data-secret="pMRG55kUs9"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/">SQL Server 2014: Create Memory Optimized File Group and Table</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/embed/#?secret=pMRG55kUs9" data-secret="pMRG55kUs9" width="600" height="338" title="&#8220;SQL Server 2014: Create Memory Optimized File Group and Table&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>I want to turn the unique record from multiple rows to multiple column values. Is it possible in SQL Server?</strong></p>
<blockquote><p>Yes, We can do this task using PIVOT.</p>
<p>SQL Server has a PIVOT relational operator to turn the unique values of a specified column from multiple rows into multiple column values in the output (cross-tab), effectively rotating a table. It also allows performing aggregations, wherever required, for column values that are expected in the final output. The basic syntax for a PIVOT relational operator looks like this:</p></blockquote>
<blockquote><p>
</p><pre class="crayon-plain-tag">SELECT [ColumnNames] FROM [TableName]
PIVOT
(
AggregateFunction([ColumnToBeAggregated])
FOR PivotColumn IN ([PivotColumnValues])
) AS Alias</pre><p>
</p></blockquote>
<p><strong>Do you know about the UNPIVOT?</strong></p>
<blockquote><p>UNPIVOT is another relational operator in SQL Server that performs almost the reverse operation of PIVOT, by rotating column values into rows values.</p>
<p>Using UNPIVOT, Do you think that you can get all correct value which are pivoted using PIVOT?</p>
<p>If you refer back, I said UNPIVOT is almost the reverse of the PIVOT operator; this means it might or might not be exactly the same. The reason is, Pivot performs aggregation while rotating row values into column values and might merge possible multiple row values into single column value in the output.</p></blockquote>
<p><strong>What is the WITH CHECK OPTION clause for a view?</strong></p>
<blockquote><p>The WITH CHECK OPTION for a view prevents data modifications (to the data) that do not confirm to the WHERE clause of the view definition. This allows data to be updated via the view, but only if it belongs in the view.</p></blockquote>
<p><strong>How you are checking that record is exists in database or not?</strong></p>
<p><strong>Using EXISTS clause:</strong></p><pre class="crayon-plain-tag">IF EXISTS(SELECT 1 FROM dbo.Customer WITH(NOLOCK) WHERE CustId = @CustId)
    BEGIN
        PRINT 'Record Exists'
    END
ELSE
    BEGIN
        PRINT 'Record doesn''t Exists'
    END
END IF;</pre><p>
<strong>What is the meaning of the WITH SCHEMABINDING clause?</strong></p>
<ul>
<li>SCHEMABINDING binds the view to the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition.</li>
<li>The view definition itself must first be modified or dropped to remove dependencies on the table that is to be modified.</li>
<li>All referenced objects must be in the same database. Views or tables that participate in a view created with the SCHEMABINDING clause cannot be dropped unless that view is dropped or changed so that it no longer has schema binding. Otherwise, the Database Engine raises an error.</li>
<li>Also, executing ALTER TABLE statements on tables that participate in views that have schema binding fail when these statements affect the view definition.</li>
<li>The implementation of SCHEMABINDING would increase stability and performance of the system, but also increase the amount of developers’ work.</li>
</ul>
<p><strong>Can we use WITH SCHEMABINDING in Stored Procedures?</strong></p>
<blockquote><p>No: We cannot use WITH SCHEMABINDING in stored procedures.</p></blockquote>
<p><strong>What are the main disadvantages of the WITH SCHEMABINDING clause?</strong></p>
<blockquote><p>It would take more time to make changes in tables’ structure. If I just want to change the size of one column, I will need to modify before and after several views.</p>
<p>The automated test of the application can catch all broken views and functions. This will not increase the amount of developers’ work.</p>
<p>You can not change the collation of a database with schemabound objects.</p></blockquote>
<p><strong>What do you know about the OFFSET FETCH clause of the SQL Server 2012?</strong></p>
<blockquote><p>The OFFSET-FETCH clause provides you with an option to fetch only a window or page of results from the result set. OFFSET-FETCH can be used only with the ORDER BY clause.</p>
<p><strong>OFFSET:</strong> Specifies the number of rows to skip, before starting to return rows from the query expression. The argument for the OFFSET clause can be an integer or expression that is greater than or equal to zero. You can use ROW and ROWS interchangeably.</p>
<p><strong>FETCH:</strong> Specifies the number of rows to return, after processing the OFFSET clause. The argument for the FETCH clause can be an integer or expression that is greater than or equal to one. You can use ROW and ROWS interchangeably. Similarly, FIRST and NEXT can be used interchangeably.</p></blockquote>
<p><strong>Please write a script or logic of custom paging using OFFSET and FETCH NEXT.</strong></p>
<blockquote class="wp-embedded-content" data-secret="ogXSF1WZTo"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2012-custom-paging-using-offset-and-fetch-next/">SQL Server 2012: Custom paging using OFFSET and FETCH NEXT</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2012-custom-paging-using-offset-and-fetch-next/embed/#?secret=ogXSF1WZTo" data-secret="ogXSF1WZTo" width="600" height="338" title="&#8220;SQL Server 2012: Custom paging using OFFSET and FETCH NEXT&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What are the limitations of OFFSET and FETCH clause of the SQL Server 2012?</strong></p>
<ul>
<li>ORDER BY is mandatory to use OFFSET and FETCH clause.</li>
<li>OFFSET clause is mandatory with FETCH. You can never use, ORDER BY … FETCH.</li>
<li>TOP cannot be combined with OFFSET and FETCH in the same query expression.</li>
<li>The OFFSET/FETCH rowcount expression can be any arithmetic, constant, or parameter expression that will return an integer value. The rowcount expression does not support scalar sub-queries.</li>
</ul>
<p><strong>What is the maximum size of a VARCHAR(MAX) variable?</strong></p>
<blockquote><p>Maximum size of a VARCHAR(MAX) is 2GB.</p></blockquote>
<p><strong>What is BCP? When is it used?</strong></p>
<blockquote><p>It is a tool used to duplicate enormous quantity of information from tables and views. It does not facsimile the structures same as foundation to target. BULK INSERT command helps to bring in a data folder into a record, table or view in a user-specific arrangement.</p></blockquote>
<p><strong>When is the Explicit Cursor Used ?</strong></p>
<blockquote><p>If the developer needs to perform the row by row operations for the result set containing more than one row, then he unambiguously declares a pointer with a name. They are managed by OPEN, FETCH and CLOSE.</p>
<p>%FOUND, %NOFOUND, %ROWCOUNT and %ISOPEN characteristics are used in all types of pointers.</p></blockquote>
<p><strong>How can a SQL Developer prevent T-SQL code from running on a production SQL Server?</strong></p>
<blockquote><p>Use IF logic with the @@SERVERNAME function compared against a string with a RETURN command before any other logic.</p></blockquote>
<p><strong>Can you create foreign key constraints on temporary tables?</strong></p>
<blockquote><p>No: You cannot create a foreign key constraint on temporary tables.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
