In this chapter, we have discussed the advantages and disadvantages of creating data-driven sites, showing that although they can provide a wealth of functionality, there are problems associated with their creation. This was followed by an introduction to data sources, and how they are handled using ADO.NET. The architecture of an application that involves data access was then covered, showing why the separation of data and presentation can provide many benefits to developers. Finally, details about MSDE - the database server we'll use in examples throughout this book - were given, and the product was installed.
Now that the background to the creation of
data-driven web sites in .NET has been dealt with, we can move on
to finding out the details of each of the technologies, and
Chapter 2: Relational Databases
If you're already familiar with database theory, you may just want to skim this chapter. But if you're new to databases, or you feel that you need a bit of a refresher, this chapter is intended to provide you with enough theory to prepare you for those that follow. In it, we'll become familiar with the key concepts and common terms that you will run across throughout your career as a database developer and
We'll begin with a discussion of a few key database concepts, such as tables, rows, and fields. Then, we'll explore the key differences between relational and non-relational databases. After that, we'll provide an introduction to SQL, to database design, and to normalization. We'll conclude with a brief comparison between SQL Server and Microsoft Access. By the end, you'll know enough to smooth your passage through the
Database Terms and Concepts
Even this definition is not particularly narrow - these criteria are met, for example, by properly formatted comma-separated value files ( .csv files), and by spreadsheets. Consider this example of the former:
Herbert Hoover, Ex-President Marcus Welbey, M.D. Gandalf, The Grey Jabba, The Hutt Attila, The Hun
This whole file represents a single table in a database that contains information about people. Each row in this file represents a row in the table, and contains information about one person. Each row contains two fields: the first is the person's
However, although 'databases' such as this one have their place (and we
In this chapter, as in the rest of the book, we'll be basing our experiments on and around the sample Northwind database that not only comes with the MSDE we've already installed, but also is available for MS Access and MS SQL Server version 7.0 and later. Northwind is a fictitious company that buys products from suppliers and sells and ships them to its customers. The Northwind database, like our .csv example above, contains tables, one of which is named Customers . This table, like all of the others in the Northwind database, contains rows and fields.
Try It Out - Our First Look at Northwind
In this chapter, we're going to use Microsoft Access as our tool for analyzing the Northwind database. If you don't have Access installed, that's not a problem - we'll be illustrating the discussion with screenshots that show exactly what's going on. The Access version of the Northwind database ships with the product, or you can download it from the Microsoft web site (http://office.microsoft.com).