Before we get into actually building the site, I want to take a quick look at how dynamic websites work. This will be a little basic for some of you, but I want to make sure we all understand the concept before we move on.
Essentially, a database driven site works like this. Someone visits your site, and through their browser they send a request to your server. Your server takes that request and passes it on to a database, which responds based on that user request, with information for the user.
So if you have a database created in something like SQL or Access, you can use ASP.NET to send queries to your server and facilitate that exchange of information, and that's what we will be doing in this series, using ASP.NET to help connect a web server with information from a database.
Before we start combining the power of a database with the dynamic website like I was just describing, I also want to spend a little time going over how databases themselves are organized. Essentially, a database is a collection of information, collected in one or more tables. Each table has multiple rows, organized in columns.
Before I go on, I want to distinguish between HTML tables, which are used to format content on a web page, and tables within a database, which are used to organize data in the database itself. These are very different kinds of tables, and although we will be working with both of them in this series, they are not the same thing.
In preparation for the website we are going to build together in this series, let's first analyze the database itself. Our fictitious real estate company is created from one database, but that database has two tables. Like many databases, data of the same type is grouped in its own table.
The first table in the database contains all of the real estate agents and other staff that work at the agency. The second table contains all of the real estate listings, the properties that are for sale. But those two tables are contained in one database. Although it is possible to connect multiple databases to one website, in this example we will just be using one database with two tables.
One of the biggest challenges with creating a website like this based on a database is first deciding how you want to present the information. So for example, in this site, I wanted a page that had all of my listings, but I also wanted to be able to match it up with my agents. I wanted to have one page that had highlights of all of the listings available, but I also wanted to have individual pages for each of those listings that displayed more details and had a larger photo of each property. Those kinds of decisions should be made before you even start building your website.
So the first challenge when you build a site like this is understanding how your database is designed and organized, and recognizing that some of the things that you might want to do in your website might require changes to the database itself.
How you setup a database itself is the topic of much longer and much techier training program, but for the purpose of this series, I assume that you already have your content in the database and that you are interested in learning how to use Expression Web to get that data from a database onto your web pages and how to make it look good when it gets there.
By the way, if you don't for some reason have a database like this, you are still likely to learn a lot just by watching this series, because it will help you have a sense of how a database site like this works, and what you will need in your database when you do put it together.
Ultimately, the learning curve is a lot steeper with database driven websites than it is if you are just trying to create a simple static page site, but I hope you will agree, the advantages can be well worth the extra effort.