<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4088169749544736084</atom:id><lastBuildDate>Mon, 02 Sep 2024 03:42:42 +0000</lastBuildDate><category>SQL Server 2000</category><category>Database</category><category>Sql Command</category><category>Transtact-SQL</category><category>Database Services</category><category>Subquery</category><category>Administration Services</category><category>Command</category><category>Concurrency</category><category>Database Management</category><category>File and Filegroup</category><category>Query</category><category>Reliability</category><category>Stored Procedure</category><category>Transaction</category><category>Trigger</category><category>What is database</category><title>SQL Server Tutorial</title><description>Database Tips, SQL Server Tips, SQL Server Tutorial</description><link>http://thesqldatabase.blogspot.com/</link><managingEditor>noreply@blogger.com (Admin)</managingEditor><generator>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-5436571120060499850</guid><pubDate>Tue, 10 Aug 2010 14:08:00 +0000</pubDate><atom:updated>2010-08-10T21:08:39.218+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">File and Filegroup</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>SQL Server 2000: File and Filegroup</title><description>Filegroup classifying a number of files for administrative purposes and the placement of data. For example, three files (Data1.ndf, Data2.ndf, Data3.ndf) can be placed on three disk drives and stored in a filegroup named filegroup1. Files and FIlegroup facilitate the addition of new files on a new disk. If your database exceeds the maximum file size of Windows, you can use a secondary file.&lt;br /&gt;
&lt;br /&gt;
A database has a primary filegroup and some filegroup, which is defined by the user. Filegroup primer contains primary files. When a database is created, the primary filegroup contains the primary data files and other files that are not stored into another filegroup. If the primary filegroup size exceeds the maximum limit, the information can not be added to the system tables. To fix this you need to move some files.&lt;br /&gt;
&lt;br /&gt;
Filegroup defined by the user, is filegroup created by the user when the user create or modify a database. If filegroup is full, only the user tables that are allocated to that filegroup are affected. If you create an object and not Declare filegroup, then use the default filegroup. Filegroup default can be changed by using ALTER DATABASE</description><link>http://thesqldatabase.blogspot.com/2010/08/sql-server-2000-file-and-filegroup.html</link><author>noreply@blogger.com (Admin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-1568609336593586775</guid><pubDate>Sun, 08 Aug 2010 05:54:00 +0000</pubDate><atom:updated>2010-08-08T12:54:57.192+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Inner Join</title><description>Inner Join is a join that produces minimal rows that there is a rows in both tables that match the join condition, which is different rows with another row in a table will be removed. In the &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html&quot;&gt;SQL-92&lt;/a&gt; standard, inner join is expressed in FROM or WHERE clause. Inner join is the only joint which is supported by SQL-92 standard in the WHERE clause. Inner join in WHERE clause otherwise known as old style inner-join.&lt;br /&gt;
&lt;br /&gt;
In the examples in this module we will use an existing database. For example we will use data from the pubs database to display the Title column from &lt;b&gt;Titles &lt;/b&gt;table and column &lt;b&gt;PubName&lt;/b&gt; from Publishers table. Both these tables have a relationship at Pub_id column.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT t.Title, p.Pub_Name FROM Publishers p INNER JOIN Titles t&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;ON p.Pub_id = t.Pub_id ORDER BY Title ASC &lt;/i&gt;&lt;/blockquote&gt;If you use multiple joins to connect more than two tables, it&#39;s easier if you think about each joint separately. For example you have three tables: A, B and C will be connected. First join will linking A and B, and then the results will be combined with C with the second join to produce the final data. Query optimizer will make a plan of execution, although the result is same. From a number of plans selected the most optimal execution.</description><link>http://thesqldatabase.blogspot.com/2010/08/inner-join.html</link><author>noreply@blogger.com (Admin)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-1302936001050213049</guid><pubDate>Fri, 06 Aug 2010 03:37:00 +0000</pubDate><atom:updated>2010-08-06T10:53:15.145+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>How to Use CREATE DATABASE Command</title><description>The command &quot;&lt;b&gt;CREATE DATABASE&lt;/b&gt;&quot; can be used to create a database and files to store data. You can also express some of the parameters that define the characteristics of a database. For example you can declare a maximum size of the file. &lt;span class=&quot;short_text&quot; id=&quot;result_box&quot;&gt;&lt;span title=&quot;&quot;&gt;If you use a  simple command is:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;CREATE DATABASE &lt;i&gt;database_name&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
without parameters, the database will be created with the same size with a database that was created by&amp;nbsp; &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; named Model. &lt;b&gt;SQL Server&lt;/b&gt; implemented CREATE DATABASE command in two phases:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;SQL Server, copying the &lt;b&gt;Model &lt;/b&gt;database for the initial database with meta data.&lt;/li&gt;
&lt;li&gt;Then, SQL Server fills the page blank except for page that contains internal data that declare how to use a place name in the database.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;All objects in the database &lt;b&gt;Model &lt;/b&gt;will be copied into the new database. You can also add objects such as tables, views, stored procedures, data types, etc into the database &lt;b&gt;Model&lt;/b&gt;, so every time you create a new database objects will be included.&lt;br /&gt;
&lt;br /&gt;
Each of the settings of the database model will be included in the new database unless you use the FOR ATTACH. For example the Model database option select into / bulkcopy set to OFF. If you change the database option with the command ALTER DATABASE model, the setting will affect the new database will be created. &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;/ol&gt;</description><link>http://thesqldatabase.blogspot.com/2010/08/how-to-use-create-database-command.html</link><author>noreply@blogger.com (Admin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-8345099087168776830</guid><pubDate>Tue, 03 Aug 2010 15:24:00 +0000</pubDate><atom:updated>2010-08-03T22:24:52.426+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Using UNION operator</title><description>You can combine the results of several queries with &lt;b&gt;UNION&lt;/b&gt; operator. By default, duplicate rows will be removed. To maintain a duplicate, then use the keyword ALL. Some rules of the UNION operator :&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Queries will be merged, must have many same column,same order, and similar data types.&lt;/li&gt;
&lt;li&gt;If you use &lt;b&gt;INTO&lt;/b&gt; clause in one query, you should put that query as first query.&lt;/li&gt;
&lt;li&gt;You can use &lt;b&gt;GROUP BY&lt;/b&gt; and &lt;b&gt;HAVING&lt;/b&gt; clause in individual &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/08/subquery-with-operator-exists.html&quot;&gt;query&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;ORDER BY clause and compute, are permitted only at the end of the UNION &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/08/subquery-with-operator-exists.html&quot;&gt;operator&lt;/a&gt;, to define the sequence of final results or to calculate the final value.&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp;For example we will display all of the customers and suppliers from the USA, sorted by CompanyName:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT CompanyName, ContactName FROM&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Suppliers WHERE Country = ‘USA’&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;UNION &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;SELECT CompanyName, ContactName&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;FROM Customers&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;WHERE Country=’USA’ ORDER BY CompanyName&lt;/i&gt;&lt;/blockquote&gt;If you want to save the results combined into a temporary table, you must use the &lt;b&gt;INTO&lt;/b&gt; &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/learning-about-order-by-clause.html&quot;&gt;clause&lt;/a&gt; followed by table name, for example TempUSA &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT CompanyName, ContactName FROM&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;INTO &lt;/b&gt;TempUSA&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Suppliers WHERE Country = ‘USA’&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;UNION &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;SELECT CompanyName, ContactName&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;FROM Customers&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;WHERE Country=’USA’ ORDER BY CompanyName&lt;/i&gt;&lt;/blockquote&gt;</description><link>http://thesqldatabase.blogspot.com/2010/08/using-union-operator.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-1119677928488758016</guid><pubDate>Mon, 02 Aug 2010 02:10:00 +0000</pubDate><atom:updated>2010-08-03T22:25:53.394+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><category domain="http://www.blogger.com/atom/ns#">Subquery</category><title>Subquery With EXISTS Operator</title><description>If a subquery uses &lt;b&gt;EXISTS&lt;/b&gt;, such as testing the same function exists or not. WHERE clause test the existence of the outer query-lines produced by the subquery. Subquery does not return data, but produces the value TRUE or FALSE. &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/adding-data-with-subquery.html&quot;&gt;Subquery&lt;/a&gt; examples that use IN, will be changed by using &lt;b&gt;EXISTS:&lt;/b&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;SELECT DISTICT FompanyName,PostalCode FROM Customers WHERE EXITS (SELECT * FROM Suppliers WHERE PostalCode = Customers.PostalCode)&lt;/i&gt;&lt;/blockquote&gt;If you use exists, it must use &lt;b&gt;SELECT *&lt;/b&gt;. Keyword, &lt;b&gt;NOT EXISTS &lt;/b&gt;is the opposite of &lt;b&gt;EXISTS&lt;/b&gt;, WHERE clause &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/query-optimization.html&quot;&gt;subquery&lt;/a&gt; is used to indicate that there is no result.</description><link>http://thesqldatabase.blogspot.com/2010/08/subquery-with-operator-exists.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-7337513874888634355</guid><pubDate>Sat, 31 Jul 2010 15:54:00 +0000</pubDate><atom:updated>2010-07-31T22:54:35.743+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Compute and Compute BY clause</title><description>In the previous article I had explained about &lt;b&gt;&quot;&lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/learning-about-order-by-clause.html&quot;&gt;order by&lt;/a&gt;&quot;&lt;/b&gt; clause, now I will explain about the compute and compute by clause.&lt;b&gt;COMPUTE &lt;/b&gt;&lt;b&gt;and &lt;/b&gt;&lt;b&gt;COMPUTE &lt;/b&gt;&lt;b&gt;BY clause&lt;/b&gt; is used to generate new rows of data containing detailed and summary. COMPUTE&amp;nbsp; clause produces detail lines and a line that contains the summary. For example we will display all the data from &lt;b&gt;Titles&lt;/b&gt; table from &lt;b&gt;Pubs&lt;/b&gt; database, this is the same as ordinary &lt;b&gt;SELECT&lt;/b&gt; command. After the last line of the data, we want to display the number of fields ytd_sales, for that we need the COMPUTE clause.&lt;br /&gt;
&lt;br /&gt;
Here is the Example:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT * FROM Titles compute sum(ytd_sales)&lt;/i&gt;&lt;/blockquote&gt;&lt;b&gt;COMPUTE BY&lt;/b&gt; clause&amp;nbsp; producing new lines of summary data, similar to the GROUP BY clause, but the result rows as a subgroup with the values summarized. If you use COMPUTE BY clause must be accompanied with &lt;b&gt;ORDER BY&lt;/b&gt;. For example we want to display data from table Titles sorted by &lt;b&gt;Type&lt;/b&gt;, and after&amp;nbsp; Type, a total of &lt;b&gt;ytd_sales&lt;/b&gt; displayed for each &lt;b&gt;Type&lt;/b&gt;, then the command is:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT type,ytd_sales FROM Titles ORDER BY type compute sum(ytd_sales)&lt;/i&gt; &lt;i&gt;by type &lt;/i&gt;&lt;/blockquote&gt;</description><link>http://thesqldatabase.blogspot.com/2010/07/compute-and-compute-by-clause.html</link><author>noreply@blogger.com (Admin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-3284928370711742889</guid><pubDate>Fri, 30 Jul 2010 19:32:00 +0000</pubDate><atom:updated>2010-07-31T02:32:46.251+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Learning About ORDER BY clause</title><description>&lt;b&gt;ORDER BY&lt;/b&gt; clause used to sort the results based on one or more columns. Ordering can be ascending (&lt;b&gt;ASC&lt;/b&gt;) or descending (&lt;b&gt;DESC&lt;/b&gt;), the default is ASC. If sorting by several columns, nested sequencing process.&lt;br /&gt;
&lt;br /&gt;
For example we will display the employee data was sorted by &lt;b&gt;country&lt;/b&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT country, EmployeeID, LastName, FirstName FROM Employees ORDER BY &lt;b&gt;Country&lt;/b&gt;&lt;/i&gt;&lt;/blockquote&gt;Data will be sorted based on the &lt;b&gt;Country&lt;/b&gt;. Notice, how the &lt;b&gt;LastName&lt;/b&gt;, &lt;b&gt;LastName &lt;/b&gt;whether in each country will be sorted? No, if we wish for a country such data was sorted by LastName, you must declare two fields in the &lt;b&gt;ORDER BY&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT country, EmployeeID, LastName, FirstName FROM Employees ORDER BY Country, LastName&lt;/i&gt;&lt;/blockquote&gt;</description><link>http://thesqldatabase.blogspot.com/2010/07/learning-about-order-by-clause.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-4359314042855600663</guid><pubDate>Fri, 30 Jul 2010 05:19:00 +0000</pubDate><atom:updated>2010-07-30T12:19:03.035+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><category domain="http://www.blogger.com/atom/ns#">Subquery</category><title>Adding Data With Subquery</title><description>You can use subquery, SELECT in INSERT statement to add values to a table or several tables or views. Subquery allows you to add a few rows at once into a table.&lt;br /&gt;
&lt;br /&gt;
What is the difference &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;subquery &lt;/a&gt;usage, with usage VALUES?. Subquery will add a number of existing data, while the VALUES to add new data. For example, we create a new table named TmpPublisher into the pubs database. The table contains four fields and made with command : &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;CREATE TABLE &lt;b&gt;TmpPublisher&lt;/b&gt;&lt;br /&gt;
SELECT pub_name varchar, city, state, country FROM &lt;b&gt;Publisher&lt;/b&gt; WHERE COUNTRY =’USA’&lt;/i&gt;&lt;/blockquote&gt;If the &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/query-optimization.html&quot;&gt;subquery&lt;/a&gt; is used in INSERT command, then the subquery is not necessary are enclosed in brackets. Subquery produce the same four columns and fields in the destination table. For example in tanel pub_name TmpPublisher will be filled only for the data not from the USA, then the INSERT clause you should declare a column that will contain the data.&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;INSERT INTO &lt;b&gt;TmpPublisher &lt;/b&gt;(pub_name)&lt;br /&gt;
&amp;nbsp;SELECT &lt;/i&gt;&lt;i&gt;pub_name &lt;/i&gt;&lt;i&gt;FROM &lt;/i&gt;&lt;i&gt;&lt;b&gt;Publisher&lt;/b&gt; &lt;/i&gt;&lt;i&gt; WHERE NOT COUNTRY = &#39;USA&#39;&lt;/i&gt;&lt;/blockquote&gt;</description><link>http://thesqldatabase.blogspot.com/2010/07/adding-data-with-subquery.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-4093317493680779513</guid><pubDate>Mon, 26 Jul 2010 19:39:00 +0000</pubDate><atom:updated>2010-07-27T02:39:48.771+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Concurrency</category><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Reliability</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Reliability and Concurrency</title><description>SQL Server 2000 uses the concept of transactions and transaction logging to ensure consistency and the ability to recover information stored in the database. Transaction is the smallest unit that can be an INSERT or UPDATE single operation, or a set of existing operations within the statement BEGIN and COMMIT transaction. If the transaction contains multiple operations, all transactions must complete or cancel all.&lt;br /&gt;
&lt;br /&gt;
SQL Server ensures all work units are consistent. This is done by writing the data before and after the transaction in a transaction log. Logs can be used to restore the database to a consistent state if a rollback application process, or the application will recover the data due to system failure.&lt;br /&gt;
&lt;br /&gt;
SQL Server supports &lt;b&gt;&lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/distributed-database-services.html&quot;&gt;Microsoft Distributed Transaction Coordinator (MS DTC)&lt;/a&gt;&lt;/b&gt; so that the integrity of the &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transaction-and-lock.html&quot;&gt;transaction&lt;/a&gt; can be applied to distributed operations that affect multiple installations of &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; by using two-phase commint way. &lt;br /&gt;
&lt;br /&gt;
Concurrency control on the SQL Server is updated by implementing the concept of dynamic &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transaction-and-lock.html&quot;&gt;&lt;b&gt;locking&lt;/b&gt;&lt;/a&gt;. This concept of locking strategy for analyzing each transaction. SQL Server uses several types of locking, for use on a record or a collection of records or a table.&lt;br /&gt;
&lt;br /&gt;
With dynamic locking, SQL Server can choose the type of locking used by the operation involved.</description><link>http://thesqldatabase.blogspot.com/2010/07/reliability-and-concurrency.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-6535502909657337787</guid><pubDate>Sat, 24 Jul 2010 17:19:00 +0000</pubDate><atom:updated>2010-07-25T00:29:54.889+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Transtact-SQL</category><category domain="http://www.blogger.com/atom/ns#">Trigger</category><title>Trigger an Overview</title><description>Trigger is a special stored procedure that runs automatically during or after data modifications. Commands that will activate the trigger are UPDATE, INSERT, and DELETE. Trigger is used to maintain data integrity and implement complex business rules. Trigger made using &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/single-transtact-sql-command.html&quot;&gt;Transtact-SQL&lt;/a&gt; language or &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Enterprise Manager&lt;/a&gt;. Trigger management tasks include changing, rename, view, delete, and create a trigger inactive.&lt;br /&gt;&lt;br /&gt;Trigger uses two virtual tables that are Inserted and Deleted to detect data modification. To program the trigger, you must understand that tables and also &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt;Transtact-SQL&lt;/a&gt; language.&lt;br /&gt;To maintain data integrity, you should be able to use some alternative, such as triggers or constraints. You can also use the primary key and unique key to identify rows in a table uniquely. You can also use the default values and domains in the limit of allowed values in a column. Referential integrity is used to ensure the validity of relationships between tables. We recommend that you use these constraints before choosing a trigger, because trigger can perform more complicated process, but the heavier the system load.&lt;br /&gt;&lt;br /&gt;Use a trigger for the following cases :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If the use of declarative way cannot meet the necessary requirements.&lt;/li&gt;&lt;li&gt;A change must alter the other tables are linked.&lt;/li&gt;&lt;li&gt;If the database requires normalizes and automatically convert existing redundant data in multiple tables.&lt;/li&gt;&lt;li&gt;If a value in a table must be validated with data on other tables.&lt;/li&gt;&lt;li&gt;If a value in a table must be validated with data on other tables.&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Trigger capabilities :&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Trigger to maintain referential integrity by making changes in or deletion of a foreign key data in the database.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Trigger can work on multiple columns in a database even in objects  outside the database. You can also use a trigger on the view.&lt;/li&gt;&lt;li&gt;A trigger can perform some action and trigger can be activated by some  event.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In addition to these capabilities, triggers, also has a limitation. Trigger cannot be created on a system or temporary table, although the command in the trigger table refers to the system or temporary table. Trigger cannot be activated manually, but automatically activated in case of events UPDATE, INSERT, and DELETE. The trigger always contains one or more event before Transtact-SQL command.&lt;br /&gt;&lt;br /&gt;When INSERT or UPDATE that activated trigger, trigger will store new data, or data modification results in a table called Inserted. If DELETE command that activated trigger, trigger will store new data, or data modification results in a table called Deleted. Table is located in memory and is read by the trigger with the command-SQL Transtact.</description><link>http://thesqldatabase.blogspot.com/2010/07/trigger-overview.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-3130997333667200215</guid><pubDate>Fri, 23 Jul 2010 17:26:00 +0000</pubDate><atom:updated>2010-07-24T22:47:12.250+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Batch In SQL Server 2000</title><description>Batch is a collection of commands that are sent at once by an application to SQL Server for execution. &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; to copy the commands from a batch into an execution plan. Furthermore, the commands in the execution plan is run one by one.&lt;br /&gt;&lt;br /&gt;For example, in the execution plan there is an error, then all commands in the batch will not be done. If there is a run-time error, such as overflow or a constraint violation will occur the following things :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;If there is a run-time, the relevant commands and the commands later dismissed.&lt;/li&gt;&lt;li&gt;If constraint violations occur, only the relevant commands dismissed, while commands  thereafter will be continued.&lt;/li&gt;&lt;/ol&gt;Commands are executed  before the run-time errors will not be affected. If the batch is in a transaction, and error causes rollback, modification of &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;data&lt;/a&gt; that have not been in-commit will be aborted.&lt;br /&gt;&lt;br /&gt;For example there are five commands in a batch. If the third command syntax errors, the command will not run. If the batch has been compiled and run second command fails, the outcome of the first command will not be affected because it has completed execution.</description><link>http://thesqldatabase.blogspot.com/2010/07/batch-in-sql-server-2000.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-5993831604855653328</guid><pubDate>Fri, 23 Jul 2010 04:09:00 +0000</pubDate><atom:updated>2010-07-23T15:42:26.927+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Query</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Query Optimization</title><description>SQL Server is an intelligent database server. &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; has a main function for processing database queries and transactions provided by the client application with good performance. Applications only need to provide a set of SQL commands, regardless of physical implementation of tables. SQL Server will determine the best way to process these commands with a technique called Cost-Based Query Optimization.&lt;br /&gt;&lt;br /&gt;For example an application provides a complex query with the SELECT &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/single-transtact-sql-command.html&quot;&gt;command&lt;/a&gt;. Query is to combine three tables with a join operation and then perform some aggregate operation on numerical data with a particular grouping. The query results should be sorted by date. SQL Server can optimize the query so that it produces several different strategies to run the query. Execution plan, determine the index that is used, the order of the join of the table, the most efficient way to perform aggregate calculations, and the fastest method to sort the results. SQL Server chooses the fastest. Selection is based on the cost of each execution plan consisting of CPU usage.&lt;br /&gt;&lt;br /&gt;To generate the &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transaction-and-lock.html&quot;&gt;execution plan&lt;/a&gt; that accurately shows the number and distribution of data in the database,&lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt; SQL Server&lt;/a&gt; uses distribution statistics. Statistical distribution, is a type of histogram that describes the distribution of index and data in a column. SQL Server 2000 provides several mechanisms of query plan reuse and also put together in between multiple users</description><link>http://thesqldatabase.blogspot.com/2010/07/query-optimization.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-7132654910470055359</guid><pubDate>Thu, 22 Jul 2010 13:08:00 +0000</pubDate><atom:updated>2010-07-23T10:13:48.268+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><category domain="http://www.blogger.com/atom/ns#">Transtact-SQL</category><title>Single Transtact SQL  Command</title><description>&lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt;Transtact SQL&lt;/a&gt; command is a command non procedural, meaning that the command does not declare the stretcher on the steps executed by the server. Server must analyze command to obtain the most efficient. This process is called optimization and is performed by the query optimizer.&lt;br /&gt;&lt;br /&gt;A command, will have several execution plans. Of the possibilities would serve targeted selected a best execution plan, this process is called optimization. Query optimizer is the most important components in a system of the &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;database&lt;/a&gt; SQL, because it can handle different conditions without having to change the program.&lt;br /&gt;&lt;br /&gt;For example to process a SELECT command, the SQL Server run the following commands:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;SQL trace and split into logical units such as keywords, expressions, operators, and the identifier.&lt;/li&gt;&lt;li&gt;Formed query tree to illustrate the logical steps necessary to change the data source into the desired shape.&lt;/li&gt;&lt;li&gt;Query optimizer to analyze all the ways to access the source tables and choose the steps that use the fastest and least resources. Query trees, repaired to record the steps that ultimately yield better execution plans.&lt;/li&gt;&lt;li&gt;Database engine started to run the execution plan.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Basic steps for processing the SELECT command can be used for other commands such as INSERT, UPDATE, and the DELETE. UDPATE and DELETE commands that have a target on the set of rows are basically doing the same process with the SELECT command. After the lines obtained were alteration or deletion.</description><link>http://thesqldatabase.blogspot.com/2010/07/single-transtact-sql-command.html</link><author>noreply@blogger.com (Admin)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-2642236403252443326</guid><pubDate>Thu, 22 Jul 2010 01:40:00 +0000</pubDate><atom:updated>2010-07-22T09:13:04.957+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Command</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><category domain="http://www.blogger.com/atom/ns#">Transaction</category><title>Transaction and Lock</title><description>Transaction and Lock used to ensure consistency and integrity of &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;the database&lt;/a&gt;. Transaction is a logical unit that contains a set of commands. Lock prevents conflict between users so that users can not read or modify data that is being modified by another user. Transactions use the lock to prevent users changing data that is being used by the transaction.&lt;br /&gt;&lt;br /&gt;Each &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt;SQL Server database&lt;/a&gt; has a transaction log that records all transactions and database modifications made by the transaction. Log supports three operations :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The process of recovery from single transactions&lt;/span&gt;&lt;br /&gt;If an application executes a ROLLBACK command or &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; detects an error, the records in the log is used to return to the data before the transaction begins.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Recovery process all the transactions that have not been completed at the time SQL Server starts&lt;/span&gt;&lt;br /&gt;If &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html&quot;&gt;SQL Server&lt;/a&gt; stops suddenly for some reason, the database may be in a state is experiencing a change that has not been written into the data file. If SQL Server starts, the recovery process will be run on each &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/database-management-and-administration.html&quot;&gt;database&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Restore the database to its original state after a failure&lt;/span&gt;&lt;br /&gt;Once there is a failure on the hard disk, you can restore the data on the situation before damage occurs.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Transaction log, not a table but is a separate file or several files in the database. Cache of the log, is a separate place in the database. Forms of data in the log is not the same as the format of page data. You can create the transaction log into multiple files. You can also set the log file growth size of the log thus avoiding uncontrolled logging.&lt;br /&gt;&lt;br /&gt;Transaction log can be regarded as a serial string of log records. Log sequence number (LSN) identifies each log. New log record is written at the end of the log with higher  LSN than the previous LSN record.</description><link>http://thesqldatabase.blogspot.com/2010/07/transaction-and-lock.html</link><author>noreply@blogger.com (Admin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-6144987871918107989</guid><pubDate>Wed, 21 Jul 2010 15:36:00 +0000</pubDate><atom:updated>2010-07-21T23:05:48.294+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Stored Procedure</category><title>Stored Procedure</title><description>Stored Procedure is a set of &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html&quot;&gt;SQL&lt;/a&gt; commands that are named and stored on the server. Stored procedure usually contains general commands on the server, and generates a set of recorded. Stored procedure written in the form of a script.&lt;br /&gt;&lt;br /&gt;Store procedure will improve the performance of databases, &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database&lt;/a&gt; security, and allows creating programs to the database. Improved performance through the use of local storage, a program that has been compiled, and the use of cache.&lt;br /&gt;&lt;br /&gt;Stored procedure is more efficient than regular commands, because the procedure is stored on the server at the time made and executed on the server. Stored procedure that contains a set of commands Transtact-SQL will be executed by a &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt;Transtact-SQL&lt;/a&gt; command. Before the stored procedure is created, the writing of the command syntax will be checked. If no errors, a procedure will be stored in tables and text SysObjects SysComments stored in tables. First time stored procedure is executed, the execution plan is created and stored procedure is compiled. Subsequent processing will be faster, because SQL Server does not need to check syntax and create a plan of execution, or compile a procedure.&lt;br /&gt;&lt;br /&gt;Stored procedure can accept parameters, and generate parameters and provide feedback in the form of a status code and text, and can call another procedure. Stored procedure ensures isolation and security with encryption. With encryption, the user can not read the commands used in stored procedures.</description><link>http://thesqldatabase.blogspot.com/2010/07/stored-procedure.html</link><author>noreply@blogger.com (Admin)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-4874240399278344955</guid><pubDate>Tue, 20 Jul 2010 05:24:00 +0000</pubDate><atom:updated>2010-07-20T12:56:37.517+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Administration Services</category><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Database Management</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Database Management and Administration Services</title><description>&lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; provides a set of services for development of &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database&lt;/a&gt; applications. Here is a brief description so you will understand its usefulness. SQL Server provides a number of services for database administration and you can use it on your application.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;SQL Server&lt;/a&gt; provides a number of services for database administration and you can use it on your application. This collection service, called &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html&quot;&gt;SQL Server&lt;/a&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Distributed Management Framework (SQL-DMF)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;SQL Server provides several graphical administration tools. &lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Server Enterprise Manager&lt;/span&gt; is the main administrative environment for SQL Server and can be used for the installation of SQL Server database administration locally and remotely.  SQL Server Enterprise Manager provides a wizard for easy administration. Some wizard that there is Database, Data Transformation Services, Management, and Replication.&lt;br /&gt;&lt;br /&gt;In addition to the wizard of the most useful one is the Database Management Wizard that automates the maintenance plan. SQL Server Enterprise Manager and other administrative tools using a software component used together which is called SQL Server Distributed Management Objects (SQL-DMO). SQL-DMO provides a set of COM interfaces for database administration of SQL Server installations.&lt;br /&gt;&lt;br /&gt;With SQL Namespace (SQL-NS) allows you to use dialog boxes that are part of SQL Server Enterprise Manager within your administration.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Server Agent&lt;/span&gt; is an integrated environment for job scheduling and execution. With this facility, you can create some jobs for database administration work, either on a single server or multiple servers.&lt;br /&gt;&lt;br /&gt;SQL Server provides two important tools that &lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Server Profiler&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;Index Tuning Wizard&lt;/span&gt;. SQL Server Profiler is used to monitor and record activity in SQL Server performance measurement and optimization. Log files SQL Server Profiler can be used to determine the query. Workload of the SQL Server Profiler, can be restarted on other SQL Server installations so you can recreate the performance characteristics for a workload.</description><link>http://thesqldatabase.blogspot.com/2010/07/database-management-and-administration.html</link><author>noreply@blogger.com (Admin)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-1946771583264987389</guid><pubDate>Mon, 19 Jul 2010 09:02:00 +0000</pubDate><atom:updated>2010-07-23T16:30:14.761+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Database Services</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>Decision Support Services</title><description>&lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; also provides decision support facilities. This facility is known as data warehousing or business intelligence. Decision support, analysis support the user at the database information.&lt;br /&gt;&lt;br /&gt;Decision support system database is implemented as a separate duplicate information and read-only and stored in another operating system, and is usually called a data mart or data warehouse. Some reasons for the decision support system separate databases :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Decision support activities can be located on a separate &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database&lt;/a&gt; server so that even the integrity and operational databases performance undisturbed.&lt;/li&gt;&lt;li&gt;Operational database structure is usually very complicated and optimized for the transaction.&lt;/li&gt;&lt;li&gt;Decision support database must declare the consolidation of a number of operating system databases, operating systems, and different hardware platforms.&lt;/li&gt;&lt;/ol&gt;The data did not suddenly appear in a decision support database. Such data must be moved periodically. Before the transfer of data should be validated, cleaned, and in the transformation. This process is called extraction and transformation. SQL Server has a facility called &lt;span style=&quot;font-weight: bold;&quot;&gt;Data Transformation Services (DTS)&lt;/span&gt; to conduct a population of decision support database. With &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/distributed-database-services.html&quot;&gt;DTS&lt;/a&gt;, you can create a routine to extract data from a number of operating systems using OLE DB or ODBC, perform data validation and transformation, and then call him at high speed into a decision support database.&lt;br /&gt;&lt;br /&gt;Usually, decision support databases are redundant, because it is a copy of the operational database, thus requiring periodic maintenance involving large amounts of data. Query processor of SQL Server provides a number of techniques called bulk processing updates that are designed to improve the performance of operations serve targeted. For example, when changing large amounts of data, the query processor will try to save all changes to the index that are affected in a pass if possible. This method is faster than by changing the index by way of line by line.&lt;br /&gt;&lt;br /&gt;SQL Server also contains a number of tools to write queries in natural language. This tool is called &lt;span style=&quot;font-weight: bold;&quot;&gt;English Query&lt;/span&gt;. You can use this facility to create a description of the entry and relationships expressed in a database.</description><link>http://thesqldatabase.blogspot.com/2010/07/decision-support-services.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-3108328424509637452</guid><pubDate>Mon, 19 Jul 2010 07:27:00 +0000</pubDate><atom:updated>2010-07-23T14:31:03.071+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Database Services</category><title>Distributed Database Services</title><description>SQL Server has the ability to refer to the tables from multiple databases in a query, even the tables on a different computer. The tables are stated in the FROM clause of a SELECT statement, INSERT, UPDATE, or DELETE.&lt;br /&gt;&lt;br /&gt;Distributed Queries, very useful. For example you will combine data from tabeltabel on several servers. Besides the remote table can also be accessed using OLE DB or ODBC.&lt;br /&gt;&lt;br /&gt;SQL Server supports the use of Microsoft Distributed Transaction Coordinator (MS DTC) to conduct transactions in multiple &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL&lt;/a&gt; Server by using two-phase commit protocol. SQL Server can create a list of all remote servers automatically within a two-phase commit.&lt;br /&gt;&lt;br /&gt;SQL Server also supports a number of model replication using replication architecture-and publish-subscribe. Replication automates the process to synchronize data between multiple SQL Server &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;databases&lt;/a&gt; to facilitate the development of distributed applications.&lt;br /&gt;&lt;br /&gt;Snapshot Replication is a replication of the basic model in &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html&quot;&gt;SQL Server&lt;/a&gt;. With this model, a &#39;shot&#39; with a scheduled publication created and distributed to all subscribers. This method is very useful if the information in the publication of the relatively static and subscriber only needs to refresh periodically.&lt;br /&gt;&lt;br /&gt;Transactional Replication is used when all active subscriber on a LAN or WAN, and changes to the published data should be replicated to the installation of &lt;a href=&quot;http://thesqldatabase.blogspot.com/search/label/SQL%20Server%202000&quot;&gt;SQL Server&lt;/a&gt; subscriber.&lt;br /&gt;&lt;br /&gt;Merge Replication is used if the subscriber is autonomous and often operate in a way disconnected. For example a user at the computer not connected can make changes in his data on the subscript when  offline.  When the user is connected to the network and start the synchronization, the subscript will be merged line by line with published data on the server. Just new rows and changes rows involved process.&lt;br /&gt;&lt;br /&gt;Therefore, the publication can be simultaneously on multiple subscriber is offline. Conflict will easily occur when a user makes changes to the same data. Merge Replication supports a number of conflict resolution scheme that detects conflicts at the row or column level.&lt;br /&gt;&lt;br /&gt;Microsoft Data Transformation Services (DTS) is a facility for the transformation and integration of data transfer. DTS is a COM object model for transferring data between a source and destination data.  DTS object model will run the DTS package. A DTS package is a set of transformation commands and transfer data can be stored in a file in the system database msdb, or in Microsoft Repository.</description><link>http://thesqldatabase.blogspot.com/2010/07/distributed-database-services.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-7721987948065284706</guid><pubDate>Sat, 17 Jul 2010 17:03:00 +0000</pubDate><atom:updated>2010-07-18T01:15:07.093+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2000</category><title>SQL Server 2000 Architecture</title><description>SQL Server 2000 is a &lt;a alt=&quot;database&quot; href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;database&lt;/a&gt; engine client / server is different from traditional single computer &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database&lt;/a&gt;, which uses a file system usage together for example dBASE, Microsoft Jet, FoxPro. Database systems that use the shared files depends on a single client processes per user to manipulate the data in shared files on network servers. In multi-user environment will appear to various problems, namely concurrency control using locking mechanism at the network layer.&lt;br /&gt;&lt;br /&gt;Database system with client / server such as SQL Server 2000 using a process server to manipulate data, and requires the client process associated with the process server using IPC mechanism (inter-process communication), a local or remote, such as TCP / IP socket. The process server is a server application that processes &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot;&gt;SQL commands&lt;/a&gt;. The process server also handles concurrency by using more sophisticated locking mechanism from the network file system, which is used together. After running the server processes the commands, the results will be sent back to the client process through the mechanism of IPC. In this way client / server provides better access to data, which is shared by many users.&lt;br /&gt;&lt;br /&gt;SQL Server 2000 provides a good language and interface for programming and communication with the server. &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html&quot; style=&quot;font-weight: bold;&quot;&gt;Transtact-SQL&lt;/a&gt; Server is a programming language that is a superset of ANSI-SQL. ANSI-SQL defines four basic commands for manipulating the data which are SELECT, INSERT, UPDATE and DELETE, and a number of commands to define the database structure. Transtact-SQL add on a few things on the ANSI-SQL. Additional programming is the construction, which allows the use of stored procedures and triggers to modify data that will be executed for a particular event occurs.</description><link>http://thesqldatabase.blogspot.com/2010/07/sql-server-2000-architecture.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-8377018942687085628</guid><pubDate>Sat, 17 Jul 2010 07:18:00 +0000</pubDate><atom:updated>2010-07-25T22:28:53.108+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">Transtact-SQL</category><title>Transtact-SQL Overview</title><description>Transtact-SQL is the development of the SQL language published by the International Organization for Standardization (ISO) and American National Standards Institute (ANSI). Transtact-SQL, is needed in the SQL server. Every application that communicates with &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;SQL Server&lt;/a&gt; will send Transtact-SQL command to the server.&lt;br /&gt;&lt;br /&gt;Transtact-SQL command is a set of programs that run on ata data objects in the &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database&lt;/a&gt;. SQL Server has three types of Transtact-SQL, the Data Definition Language, Data Control Language, and Manipulation Language.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data Definition Language  (DDL)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Data Definition Language (DDL) is part of a database management system, used to define the data and manage all the attributes and properties from a database. With the DDL you can specify the column definitions, key columns, files &lt;span id=&quot;result_box&quot; class=&quot;long_text&quot;&gt;&lt;span style=&quot;&quot; title=&quot;&quot;&gt;location&lt;/span&gt;&lt;/span&gt;, and storage strategy.&lt;br /&gt;&lt;br /&gt;General form of DDL statements:&lt;br /&gt;CREATE &lt;span style=&quot;font-style: italic;&quot;&gt;object_name&lt;/span&gt;&lt;br /&gt;ALTER &lt;span style=&quot;font-style: italic;&quot;&gt;object_name&lt;/span&gt;&lt;br /&gt;DROP &lt;span style=&quot;font-style: italic;&quot;&gt;object_name&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data Control Language (DCL)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DCL is used to adjust the controls on database objects. Commands can be used is the &lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;REVOKE&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT &lt;/span&gt;command is used to give rights to user to access a database. &lt;span style=&quot;font-weight: bold;&quot;&gt;REVOKE &lt;/span&gt;command is used to dispose of the rights granted to the user&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Manipulation Language (DML)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DML is used to display, add, modify, and delete data in the objects defined by DDL. DDL Commands are SELECT, INSERT, UPDATE, DELETE.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; command will search the records from the database&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;INSERT&lt;/span&gt; command is used to add new records on a table or view.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; command is used to change the data in a table.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;DELETE&lt;/span&gt; command is used to remove data in a table.</description><link>http://thesqldatabase.blogspot.com/2010/07/transtact-sql-overview.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4088169749544736084.post-2621813082924106938</guid><pubDate>Sat, 17 Jul 2010 05:31:00 +0000</pubDate><atom:updated>2010-07-17T13:24:21.490+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">What is database</category><title>What is database</title><description>The &lt;span style=&quot;font-weight: bold;&quot;&gt;database&lt;/span&gt; is a collection of related data, In the past, the database is a file, for example students.dbf, employees.dbf, which contains a table. In the student file, containing the related columns, such as ID, Name, Address, etc.&lt;br /&gt;&lt;br /&gt;In SQL Server, the &lt;span style=&quot;font-weight: bold;&quot;&gt;database&lt;/span&gt; is not a file but it is a logical concept that contains a collection of related objects. For example a &lt;a href=&quot;http://thesqldatabase.blogspot.com/&quot;&gt;database&lt;/a&gt; containing data, &lt;a href=&quot;http://thesqldatabase.blogspot.com/2010/07/what-is-database.html&quot;&gt;database structure&lt;/a&gt;, indexes, securities, view, and stored procedures.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Objects in a database:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Tables&lt;/span&gt;, objects that contain the types of data and raw data.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Column&lt;/span&gt;. A table containing the columns to accommodate the data. The  column has a type, and a unique name.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data type&lt;/span&gt;. A column has a data type. Type of data that can be selected  are the characters, numeric, date, boolean, etc.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Stored procedure&lt;/span&gt;. Is the sql commands that make up the macro. By running  the stored procedure means that you run the sql commands in a stored  procedure.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Trigger&lt;/span&gt;. Trigger is a stored procedure that is activated when the data  are added, modified, or deleted from the database. Trigger is used to  ensure the integrity rules within the database.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Rule&lt;/span&gt;. Rule applied to the column so that the data being entered must be  in accordance with the rules.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Primary Key&lt;/span&gt;. The main key to ensure every line of unique data, can be distinguished from other data.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Foreign Key&lt;/span&gt;. Is the foreign key columns that refer to primary key or unique constraint on another table. Primary key and foreign keys are used to connect a table with other tables.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Constraints&lt;/span&gt;. Constraint is that the data integrity mechanism based on servers and implemented by the system.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Default&lt;/span&gt;. Default contained in the field, so if the column is not filled with data, then filled in with default values.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;View&lt;/span&gt;. View is a query that uses several tables, and stored in the database. View can select multiple columns of a table or to connect multiple tables. View can be used to maintain data security.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Index&lt;/span&gt;. Index help organize the data so that queries become faster.&lt;/li&gt;&lt;/ul&gt;</description><link>http://thesqldatabase.blogspot.com/2010/07/what-is-database.html</link><author>noreply@blogger.com (Admin)</author><thr:total>0</thr:total></item></channel></rss>