<?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>Tech Insight ! &#187; Database</title>
	<atom:link href="http://techinsight.dhanashree.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://techinsight.dhanashree.com</link>
	<description>Technical blog on ASP.Net, PHP, Web Development, Web hosting , Database Programming</description>
	<lastBuildDate>Fri, 12 Aug 2011 07:26:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Copy Tables and Data using SMO (Sql Server Management Object) in asp.net</title>
		<link>http://techinsight.dhanashree.com/copy-tables-and-data-using-smo-sql-server-management-object-in-asp-net/</link>
		<comments>http://techinsight.dhanashree.com/copy-tables-and-data-using-smo-sql-server-management-object-in-asp-net/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 10:16:17 +0000</pubDate>
		<dc:creator>jatin</dc:creator>
				<category><![CDATA[.Net 2.0]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL server 2005]]></category>
		<category><![CDATA[SMO]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://techinsight.dhanashree.com/?p=268</guid>
		<description><![CDATA[SMO (Sql Server Management Object) can be used in .net application for dealing with database objects like table, stored procedure, views, and functions.
Basically you have to use “Microsoft.SqlServer.Management.Smo” namespace to use its classes in your application.
Additionally you need to use Microsoft.SqlServer.Management.Sdk.Sfc  assembly.
I have used following assemblies for this sample code:
using System.Data;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using [...]]]></description>
			<content:encoded><![CDATA[<p>SMO (Sql Server Management Object) can be used in .net application for dealing with database objects like table, stored procedure, views, and functions.</p>
<p>Basically you have to use “Microsoft.SqlServer.Management.Smo” namespace to use its classes in your application.</p>
<p>Additionally you need to use Microsoft.SqlServer.Management.Sdk.Sfc  assembly.</p>
<p>I have used following assemblies for this sample code:</p>
<p>using System.Data;<br />
using Microsoft.SqlServer.Management.Common;<br />
using Microsoft.SqlServer.Management.Smo;<br />
using Microsoft.SqlServer.Management.Sdk.Sfc;<br />
using smo = Microsoft.SqlServer.Management.Smo;</p>
<p>Following code mentions use of SMO to copy tables and data.</p>
<p>/* SOURCE Database */<br />
string myDBServer = &#8220;sourceDBServer&#8221;;<br />
string myDBUsername = &#8220;testuser&#8221;;<br />
string myDBPassword = &#8220;password&#8221;;<br />
string myDBDatabase = &#8220;firstDB&#8221;;<br />
//</p>
<p>/* DESTINATION Database */<br />
string destServer = &#8220;destinationDBServer&#8221;;<br />
string destLogin = &#8220;testuser&#8221;;<br />
string destPassword = &#8220;password&#8221;;<br />
string destDatabase = &#8220;targetDB&#8221;;<br />
//</p>
<p>ServerConnection con = new ServerConnection(myDBServer, myDBUsername, myDBPassword);<br />
smo.Server sqlServer = new smo.Server(con);<br />
Database db = sqlServer.Databases[myDBDatabase];</p>
<p>Transfer transfer = new Transfer(db);<br />
transfer.CopyAllUsers = true;<br />
transfer.CreateTargetDatabase = false;<br />
transfer.CopyAllObjects = false;<br />
transfer.CopyAllTables = true;<br />
transfer.CopyData = true;<br />
transfer.Options.WithDependencies = true;<br />
transfer.Options.DriAll = true;<br />
transfer.Options.ContinueScriptingOnError = false;</p>
<p>//use following code if want to create destination databaes runtime<br />
/*<br />
ServerConnection destConnection = new ServerConnection(destServer, destLogin, destPassword);<br />
Server destServerObj = new Server(destConnection);<br />
Database newdb = new Database(destServerObj, destDatabase);<br />
newdb.Create();<br />
transfer.CreateTargetDatabase = true;<br />
*/<br />
transfer.CreateTargetDatabase = false;<br />
transfer.DestinationLoginSecure = true;<br />
transfer.DestinationServer = destServer;<br />
transfer.DestinationLogin = destLogin;<br />
transfer.DestinationPassword = destPassword;<br />
transfer.DestinationDatabase = destDatabase;<br />
transfer.ScriptTransfer();<br />
transfer.TransferData();</p>
<p>Personally I think aobve programm is very usefull when we need to take backup SQL Server database.</p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="color: red;" lang="EN-IN"><span style="font-size: 11pt;"><br />
<span style="font-family: Calibri;">NOTE<span style="mso-spacerun: yes;"> </span>: Also visit <a href="http://www.dhanashree.com">www.dhanashree.com</a></span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;"><br />
If you are in need of any </span><a href="http://dhanashree.com/web-development-services/asp-php-web-development" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">Web Development</span></a><span style="font-size: 11pt; font-family: Calibri;"> feel free to <span style="text-decoration: underline;"><a href="http://dhanashree.com/contact-web-designing-company" target="_blank">Inquire us</a></span> .<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a></span>. Expertise in <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">Asp.net Development</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">Php Development</a></span>,<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><br />
<a href="http://dhanashree.com/web-development-services/website-designing" target="_blank">Website designing</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/open-source-wordpress-joomla-oscommerce-customisation" target="_blank">Open Source customisation</a></span>. <span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a> </span>can be our <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/offshore-website-designing-company" target="_blank">offshore development company</a></span> / </span><a href="http://dhanashree.com/web-designing-outsource-advantages" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">outsourcing</span></a><span style="font-size: 11pt; font-family: Calibri;"> <span style="text-decoration: underline;"><a href="http://dhanashree.com/dhanashree-web-development-profile" target="_blank">web development company</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">hire dedicated web programmers</a></span>.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;"><br />
Above information is for knowledge sharing<span style="mso-spacerun: yes;"> </span>if you have problem / issue / suggestion please intimate us with details for proper and prompt action.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/copy-tables-and-data-using-smo-sql-server-management-object-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick DBMS reference: Single line definitions of important SQL Server terms</title>
		<link>http://techinsight.dhanashree.com/quick-dbms-reference-single-line-definitions-of-important-sql-server-terms-2/</link>
		<comments>http://techinsight.dhanashree.com/quick-dbms-reference-single-line-definitions-of-important-sql-server-terms-2/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 09:36:40 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL server 2005]]></category>
		<category><![CDATA[DBMS]]></category>

		<guid isPermaLink="false">http://techinsight.dhanashree.com/?p=188</guid>
		<description><![CDATA[Normalization: is a process of organizing data and minimizing redundancy 
De-normalization: is a technique to move from higher to lower normal forms of database modeling in order to speed up database access.
Stored Procedure: is a named group of T-SQL statements which can be created and stored in Database as an object.
Primary Key: is a unique [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Normalization: </strong>is a process of organizing data and minimizing redundancy<strong> </strong></p>
<p><strong>De-normalization: </strong>is a technique to move from higher to lower normal forms of database modeling in order to speed up database access.</p>
<p><strong>Stored Procedure: </strong>is a named group of T-SQL statements which can be created and stored in Database as an object.</p>
<p><strong>Primary Key: </strong>is a unique identifier of a row in a DB table, [it can’t be NULL]</p>
<p><strong>Unique key: </strong>forces uniqueness to a respective table column, [it can be NULL]</p>
<p><strong>Foreign Key: </strong>a foreign key in 1 table refers to the primary key in other table, Used to force referential integrity.</p>
<p><strong>Inner join: </strong>exists in both tables</p>
<p><strong>Left Outer join: </strong>all records from left side table + matched rows from right side table (totals number of rows will be same as left table)</p>
<p><strong>Right Outer join: </strong>all records from right side table + matched rows from left side table (totals number of rows will be same as right table), it’s a mirror image of left outer join</p>
<p><strong>Full Outer join: </strong>all records from left side table + all records from right side table, weather matched or not</p>
<p><strong>Cross join: </strong>returns [left table rows * right table rows], a Cartesian product of both tables</p>
<p><strong>Self join: </strong>when table joins to itself using diff aliases to avoid confusion</p>
<p><strong>Union: </strong>selects only distinct records from both tables</p>
<p><strong>Union all: </strong>selects all records from both tables</p>
<p><strong>View: </strong>is a subset of a table, can be used to retrieve data, insert or Update data. Can contain multiple select statements inside</p>
<p><strong>Trigger: </strong>A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs.</p>
<p><strong>Cursor: </strong>is a database object used to loop trough records on row by row bases.</p>
<p><strong>Index: </strong>pointers to data records, represents structure of how data get stored physically in a table</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="319" valign="top"><strong>Clustered index</strong></td>
<td width="319" valign="top"><strong>Non clustered index</strong></td>
</tr>
<tr>
<td width="319" valign="top">Reorders physical data stored in table</td>
<td width="319" valign="top">It contains pointers to data rows</td>
</tr>
<tr>
<td width="319" valign="top">A table can have Only 1 clustered index</td>
<td width="319" valign="top">A table can have one OR many    non-clustered index</td>
</tr>
<tr>
<td width="319" valign="top">Leaf nodes contains data</td>
<td width="319" valign="top">Leaf nodes contains reference to data</td>
</tr>
</tbody>
</table>
<p><strong> </strong></p>
<p><strong>Linked server: </strong>is a concept of adding other remote server to a group to query DB’s of both servers together</p>
<p><strong>Collation: set of rules that determines how data stores &amp; compares in database</strong><strong> </strong></p>
<p><strong>Collation types: case sensitive, accent sensitive, kana sensitive, width sensitive</strong></p>
<p><strong>Data ware housing: </strong></p>
<ol>
<li>Record should Never delete from DB</li>
<li>All records must be linked</li>
<li>Once committed records should be read-only</li>
<li>All changes made must be tracked with time</li>
</ol>
<p><strong>User defined function (UDF): </strong>is a bunch of T-SQL statements which accepts 0 or more parameters and returns a scalar data value or table.</p>
<p><strong>DDL:</strong> data definition language – e.g. <strong>TRUNCATE</strong> command is a DDL command</p>
<p><strong>DML:</strong> data manipulation language – e.g. <strong>INSERT</strong>, <strong>UPDATE</strong> &amp; <strong>DELETE</strong> are DML commands</p>
<p><span style="font-family: Calibri; font-size: 15px; color: #ff0000;">NOTE<span style="mso-spacerun: yes;"> </span>:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">If you are in need of any </span><a href="http://dhanashree.com/web-development-services/asp-php-web-development" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">Web Development</span></a><span style="font-size: 11pt; font-family: Calibri;"> feel free to <span style="text-decoration: underline;"><a href="http://dhanashree.com/contact-web-designing-company" target="_blank">Inquire us</a></span> .<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a></span>. Expertise in <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/dot-net-web-designing" target="_blank">Asp.net Development</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/asp-php-web-development/lamp-development-php-web-designing" target="_blank">Php Development</a></span>,<span style="mso-spacerun: yes;"> </span><span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/website-designing" target="_blank">Website designing</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/open-source-wordpress-joomla-oscommerce-customisation" target="_blank">Open Source customisation</a></span>. <span style="text-decoration: underline;"><a href="http://dhanashree.com/" target="_blank">Dhanashree Inc</a> </span>can be our <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/offshore-website-designing-company" target="_blank">offshore development company</a></span> / </span><a href="http://dhanashree.com/web-designing-outsource-advantages" target="_blank"><span style="font-size: 11pt; font-family: Calibri;">outsourcing</span></a><span style="font-size: 11pt; font-family: Calibri;"> <span style="text-decoration: underline;"><a href="http://dhanashree.com/dhanashree-web-development-profile" target="_blank">web development company</a></span>, <span style="text-decoration: underline;"><a href="http://dhanashree.com/web-development-services/dedicated-php-dotnet-developer" target="_blank">hire dedicated web programmers</a></span>.</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span lang="EN-IN"><span style="font-size: 11pt; font-family: Calibri;">Above information is for knowledge sharing<span style="mso-spacerun: yes;"> </span>if you have problem / issue / suggestion please intimate us with details for proper and prompt action.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://techinsight.dhanashree.com/quick-dbms-reference-single-line-definitions-of-important-sql-server-terms-2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

