Part II: Programming with T-SQL

Congratulations on finishing your first week! You now have a pretty good working knowledge of SQL to get by in most common situations. The first week taught you quite a bit about the SELECT statement. In the second week, you will start learning some of the more advanced SQL topics.

On Day 8, "Defining Data," you will learn how to create databases, tables, and columns using DDL or Data Definition Language. This enables you to manipulate the database without having to use one of the Windows-based tools such as Enterprise Manager.

On Day 9, "Indexes and Performance," we will take a look at how adding indexes to your tables will affect the performance of your SQL queries. In addition, you will learn how to use a couple of the performance tools that come with Microsoft SQL Server 2000.

Day 10, "Views and Temporary Tables," is about temporary tables. Temporary tables are almost the same as permanent tables, but they exist for only a short period of time and are then dropped when you are finished with them. They are useful for holding temporary results, among other things. Finally, I will take a look at views, what they are, and how you can use them to look at existing data in the database.

On Day 11, "T-SQL Programming Fundamentals," I will present you with the fundamentals of SQL programming. You will learn what variables are, how to use them, and the concepts of conditional coding. I will also show you how errors occur and then how to deal with them.

Day 12, "Understanding Database Locking," covers the important topic of row and table locking. Locking is the server's way of ensuring that data isn't written while its being read, and vice versa. Locking can be a little confusing, but it is a necessary evil on any multi-user application system.

Day 13, "Programming with Transactions," covers transactions. A transaction enables you to group SQL statements so that they either succeed or fail as a group. Writing transactions is a critical skill in a SQL-based computer application. All serious application systems use transactions in some way to ensure the integrity of the data.

Finally on Day 14, "Using Cursors," we will discuss cursors. Cursors enable you to treat a result set on a row-by-row basis, instead of looking at it as a single chunk of data. However, cursors require a great deal of programming effort on your part and large amounts of CPU or processing time.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset