# Tuesday, February 24, 2009

In this article, we will define a database, a table and the main parts of a table - rows and columns.

A database is an organized (or structured) collection of information.

Most companies spend a lot of time and effort collecting information and storing it somewhere, but not all that information is organized, which makes it difficult to retrieve anything relevant later on.  A database adds structure to the information making it easier to maintain and query it.

Database engines like SQL Server provide a structure to organize data in a way that makes sense to a user.  Specifically, SQL Server uses a relational model* to organize its data.

In a relational database, data is partitioned into tables.  Tables are a way of data storing data in rows and columns, kind of like in an Excel worksheet. 

Figure 1 - Data in an Excel workbook

I've always found this rectangular view of data very intuitive.

Just as in a workbook, each table row represents a discrete record.  All information in that row serves to describe the row.  

Similarly, a table column is a placeholder that describes a single attribute for each row.  The advantage SQL Server has over Excel is that you can easily place rules onto a column, restricting the type of data that can be stored there. 

If a SQL Server column is designed to hold a date, a property of that column can be set to throw an error if a person or program tries to store a string.   We can set up such restrictions for many data types, so that a column can be restricted to allow only integers, only TRUE/FALSE values, or only binary objects.  We can even restrict the maximum length of a string or require users to always enter a value into a column - all simply by setting properties on the column.**

For example, a table named "Customers" might be used to store information about your company's customers.  Each row in this table would represent a single customer.  Each column would hold an attribute of that customer, so you could create columns such as FirstName, LastName and StreetAddress that would hold the appropriate values for each customer. 

Figure 2 - Data in a SQL Server table

Looking at the first row, gives us information about the customer.  It should be obvious that this customer has a first name of "David", a last name of "Giard" and an address of "123 Main St".

*SQL Server does provide some non-relational ways of storing data but those are beyond the scope of this article.
** It is possible to configure Microsoft Excel to restrict data input, but this task is relatively advanced and far more easily accomplished in SQL Server.

Tuesday, February 24, 2009 6:14:48 PM (GMT Standard Time, UTC+00:00)
# Monday, February 23, 2009

Episode 8

Brian Prince joined Microsoft last year as an Architect Evangelist.  In this interview, he talks about the experience and how it is different from any company he has worked for in the past.

Monday, February 23, 2009 11:30:08 AM (GMT Standard Time, UTC+00:00)
# Sunday, February 22, 2009

I deal with a lot of smart, passionate people with years of experience in technology. 

I've noticed that these folks love to talk about and write about the next generation of software and advanced topics in software development.  This is great because it gives me a chance to learn new things from the smart people in my life. 

Unfortunately, not everyone is ready for advanced topics.  Developers who are just starting their careers need to understand the basics of languages, programming constructs and relational databases before diving deeper into these and other areas.  These basic topics are often less interesting to experienced developers but they are vitally important.  And who is better capable of explaining them than an experienced developer or architect?

I'll address this partial vacuum in a new Back To Basics feature on this site.  In this feature, I'll explain some fundamental concepts of software development, assuming little or no experience on the part of the reader.

The feature begins this week with a set of articles entitled SQL Server 101, in which I'll describe the basics of SQL Server and relational databases.  This will tie in with a talk I'll be giving at the West Michigan .Net University April 4 in Grand Rapids, MI.

Sunday, February 22, 2009 4:42:15 AM (GMT Standard Time, UTC+00:00)
# Friday, February 20, 2009

Episode 7

Microsoft Architect Evangelist Darryl Hogan loves his job.  In this interview, Darryl explains what he does why it rocks.

Friday, February 20, 2009 11:09:40 AM (GMT Standard Time, UTC+00:00)
# Wednesday, February 18, 2009

Episode 6

In this interview, Joe Fiorini discusses how he and his team created the meetinbetween.us application that won the 2008 Rails Rumble contest.

Wednesday, February 18, 2009 11:44:20 AM (GMT Standard Time, UTC+00:00)
# Monday, February 16, 2009

Episode 5

BizTalk Server is one of those products that many people have heard of, but few are familiar with. 

In this discussion, Monish Nagisetty briefly and clearly explains the purpose and uses of BizTalk Server messaging

Monday, February 16, 2009 1:35:42 PM (GMT Standard Time, UTC+00:00)
# Thursday, February 12, 2009

Episode 4

I've attended two conferences where Alan Stevens helped to make Open Spaces a success.  In this interview, Alan describes open spaces technology and explains his role in the process.

Thursday, February 12, 2009 3:28:00 PM (GMT Standard Time, UTC+00:00)
# Tuesday, February 10, 2009

Episode 3

In this interview, Jason Follas explains spatial data types, which were introduced in SQL Server 2008

Tuesday, February 10, 2009 3:16:49 PM (GMT Standard Time, UTC+00:00)
# Sunday, February 8, 2009

Episode 2

Steve Smith sat down with me to share his ideas on increasing performance and scalability in your web applications.

Sunday, February 8, 2009 10:22:39 PM (GMT Standard Time, UTC+00:00)
# Friday, February 6, 2009

Episode 1

I spoke with Telerik Developer Evangelist John Kellar at CodeMash about how to effectively interview tech people on camera and about the DevLink conference.

View John's video interviews at EdgeOfDev.com

Friday, February 6, 2009 2:58:05 PM (GMT Standard Time, UTC+00:00)