Simplifying Data Manipulation with Typed Data Sets

Before we finish this chapter, we'll take a very quick look at how schemas let us define typed DataSets. Typed DataSets can provide a more intuitive mechanism for the manipulation of data. A typed DataSet is bound to an XML Schema Definition (XSD) file. Schemas provide very rigorous definitions for the types of particular objects. In conjunction with the typed DataSet, they can allow access to the tables and columns of a DataSet using meaningful names. This not only improves the readability of...

Flat File versus Relational Databases

Flat files are the most basic form of database - all of the information is stored in a single file. A flat file includes a field for every item of information that you need to store. While they are easy to create and can be useful in certain situations, flat files are not very efficient. They can be quite wasteful of storage space, containing a lot of duplicated information, especially in a complex system where multiple files hold connected information. This can make information harder to...

Selecting Data From the Database

You are probably already aware of the most basic type of SQL statement the SELECT statement. Use the SELECT statement to retrieve records from a database. For example, if we want to see all information in the Products table, we would run the following SQL statement The asterisk above designates that we want to see all fields in the Products table. If, instead, we only wanted to find the name of the product, the price, and units that are in stock, the SQL statement below would accomplish this...

Info

Now, all non-primary key fields in the Orders table OrderDate, CustomerNumber, and OrderShipDate depend on the whole key - the OrderNumber - and are not unnecessarily repeated. In addition, all non-key fields in the OrderProducts table depend on that table's complete primary key, composed of the OrderNumber and ProductIdentifier. This means that Price and Quantity are information that describes the situation represented by the whole key - that is, each product of any given order. Now that all...