Home > Articles > Programming > Windows Programming

Like this article? We recommend

Building a DataSet from Scratch

The best way to learn about the DataSet is to build one from scratch instead of relying on the work performed by a .NET data provider. Listing 1 shows the code used to build up the DataSet schema programmatically and display the structure in a console window.

Listing 1—Building a DataSet

using System;
using System.Data;

namespace DisconnectedOpsDemo
{

public class BuildingDataSet
{

public static DataSet BuildDSStructure()
{
  // build the DataSet root object
  DataSet ds = new DataSet("CustOrdersDS");

  // build Customers table
  DataTable dtCusts = new DataTable("Customers");
  ds.Tables.Add(dtCusts);

  // build Orders table
  DataTable dtOrders = new DataTable("Orders");
  ds.Tables.Add(dtOrders);

  // add ID column with autoincrement numbering
  // and Unique constraint
  DataColumn dc = dtCusts.Columns.Add("ID",typeof(int));
  dc.AllowDBNull = false;
  dc.AutoIncrement = true;
  dc.AutoIncrementSeed = 1;
  dc.AutoIncrementStep = 1;
  dc.Unique = true;

  // make the ID column part of the PrimaryKey
  // for the table
  dtCusts.PrimaryKey = new DataColumn[] { dc };

  // add name and company columns with length restrictions
  // and default values
  dc = dtCusts.Columns.Add("Name",typeof(string));
  dc.MaxLength = 14;
  dc.DefaultValue = "nobody";
  dc = dtCusts.Columns.Add("Company",typeof(string));
  dc.MaxLength = 14;
  dc.DefaultValue = "nonexistent";


  // add ID columns with autoincrement numbering
  // and Unique constraint
  dc = dtOrders.Columns.Add("ID",typeof(int));
  dc.AllowDBNull = false;
  dc.AutoIncrement = true;
  dc.AutoIncrementSeed = 1;
  dc.AutoIncrementStep = 1;
  dc.Unique = true;

  // add custid, date and total columns
  dtOrders.Columns.Add("CustID",typeof(int));
  dtOrders.Columns.Add("Date",typeof(DateTime));
  dtOrders.Columns.Add("Total",typeof(Decimal));

  // add in an expression column that
  // calculates an integer value one greater than
  // the ID field
  dtOrders.Columns.Add("MyExpression",typeof(int),"ID + 1");

  // make the ID column part of the PrimaryKey
  // for the table
  dtOrders.PrimaryKey = new DataColumn[] { dc };

  // link the two tables together and autocreate
  // constraints between the two tables
  DataRelation dr = new DataRelation("CustOrderRelation",
   dtCusts.Columns["ID"],
   dtOrders.Columns["CustID"],
   true);
  ds.Relations.Add(dr);


  return ds;
}

public static void DisplayDSStructure(DataSet ds)
{
  Console.WriteLine("\nDisplaying DataSet Structure");

  // display each table
  foreach (DataTable dt in ds.Tables)
  {
   Console.WriteLine("\nTable: {0}", dt.TableName);

   Console.WriteLine("\tPrimaryKey: {0}", dt.PrimaryKey);

   // display the columns
   foreach (DataColumn dc in dt.Columns)
   {
     Console.WriteLine("\tColumn: {0}", dc.ColumnName);
     Console.WriteLine("\t\tType: {0}",
      dc.DataType.ToString());
     Console.WriteLine("\t\tUnique: {0}", dc.Unique);
     Console.WriteLine("\t\tAutoincrement: {0}",
      dc.AutoIncrement);
     Console.WriteLine("\t\tMaxLength: {0}",
      dc.MaxLength);
     Console.WriteLine("\t\tExpression: {0}",
      dc.Expression);
   }

   // display the constraints
   foreach (Constraint c in dt.Constraints)
   {
     Console.Write("\tConstraint: {0} ",
      c.ConstraintName);
     if (c is UniqueConstraint)
     {
      Console.WriteLine("UniqueConstraint");
      UniqueConstraint uc = (UniqueConstraint) c;
      Console.WriteLine("\t\t" +
        "PrimaryKey:{0}",uc.IsPrimaryKey);
     }
     else if (c is ForeignKeyConstraint)
     {
      Console.WriteLine("ForeignKeyConstraint");
      ForeignKeyConstraint fkc =
        (ForeignKeyConstraint) c;
      Console.WriteLine("\t\t Related" +
        "Table:{0}",fkc.RelatedTable);
      Console.WriteLine("\t\t Related" +
        "Column:{0}",fkc.RelatedColumns);
      Console.WriteLine("\t\t UpdateRule:{0}",
        fkc.UpdateRule);
      Console.WriteLine("\t\t DeleteRule:{0}",
        fkc.DeleteRule);
      Console.WriteLine("\t\t AcceptRejectRule:{0}",
        fkc.AcceptRejectRule);
     }
   }

   // display the relations
   foreach (DataRelation dr in dt.ParentRelations)
   {
     Console.WriteLine("\tRelation: {0}",
      dr.RelationName);
     Console.WriteLine("\t\tParent Columns: {0}",
      dr.ParentColumns);
     Console.WriteLine("\t\tParentKeyConstraint: {0}",
      dr.ParentKeyConstraint);
     Console.WriteLine("\t\tChild Columns: {0}",
      dr.ChildColumns);

     Console.WriteLine("\t\tChildKeyConstraint: {0}",
      dr.ChildKeyConstraint);
   }


  }

}


public static void Main()
{
  DataSet ds = BuildDSStructure();
  DisplayDSStructure(ds);
  Console.WriteLine();
}
}
}

The DataSet has two extremely important properties that help work with its contents: Tables holds a collection of DataTable objects that hold the data inside the DataSet; and Relations holds a collection of DataRelation objects to link tables together in a nested fashion. To start building the DataSet, we instantiate it and pass in the string value CustOrdersDS to give it a name.

The DataTable is the core feature of a DataSet with a Rows property for working with the data in a collection of DataRow objects; a Columns property that provides access to a collection of DataColumn objects used to define the schema of the table; and a Constraints property used to enforce rules and restrictions on the data entered in the form of classes such as UniqueConstraint and ForeignKeyConstraint.

The first step in building a DataTable is to instantiate it and give it a name like we did the DataSet. After that's complete, we add it to the Tables collection of the DataSet. The example does this for both the Customers and Orders tables in succession.

After the DataTable is defined and linked into the DataSet, we start adding DataColumn objects to define the schema of its data. The DataColumn type represents this key metadata and provides support for auto-increment, null, calculated, and length-restricted columns, as well as supporting most of the basic types in the .NET framework. The System.Data.SqlTypes namespace has types specific to SQL Server in case that's the data source being used; however, we don't use those in this example.

The build sample in Listing 1 adds an ID column with auto-increment value generation to both the Customers and Orders tables. Adding a column begins by using the Add method of the Columns collection that's overloaded to take the name and .NET datatype representing it in the .NET world. The auto-increment capability is added using specific properties of the DataColumn class; in this example, we start with a value of 1 as the seed and increment by one each time a new row is added to the table.

The final step in configuring the DataColumn is to create a UniqueConstraint object attached to the column. The simplest way to do so is set the Unique property of the column to true. I have also set the NULL capability to false to prevent null values.

Making the column a primary key is done outside of the DataColumn object; we have to set that as a table-level property. Notice that the table-level property PrimaryKey takes an array of DataColumn objects. This helps for those situations in which you have more than one primary key column.

The Name and Company columns are added to the Customers DataTable using a string type and are constrained using the MaxLength property. This allows the DataColumn to restrict entry of strings greater than a certain size. I have also added a DefaultValue to set the columns to "nobody" or "nonexistent" if no value is passed into them.

The Orders DataTable has Data and Total columns that are added in a simple way, but also has a strange column named MyExpression. Defining MyExpression sets the third parameter of the Add method to a value of "ID + 1". The value that comes from this column is a not stored but is computed by adding one to the primary key column of the row when the column in accessed by a DataRow object reference.

After we have created the table and column structure, we need to link the Customers and Orders tables using a DataRelation object to allow for easy navigation between parent and child rows, as well as implicitly building a ForeignKeyConstraint. The DataRelation object is instantiated on its own by name, and is passed the two column objects that identify the parent and child column. The third parameter we pass builds the necessary ForeignKeyConstraint object for us when we set it to a true value. After we have built the DataRelation, we add it to the root DataSet so it can do its magic.

Displaying the Schema

The second half of Listing 1 is the code used to display the DataSet schema structure. You can use it to troubleshoot structure creation that occurs when a DataSet is loaded by the DataAdapter or an XML document. The results are shown in Listing 2. Notice how the ForeignKeyConstraint object was created for us as part of adding the DataRelation between the two tables.

The ForeignKeyConstraint also has rules to guide modification of data: UpdateRule, DeleteRule, and AcceptRejectRule. The UpdateRule and DeleteRule can take on the following values to guide the action of a delete or update of a row that would affect the constraint:

  • Cascade deletes or updates the child rows to match the actions in a parent row.

  • SetNull sets the values of child rows to null.

  • SetDefault sets the values of child rows to a default value when the parent row has changed.

  • None means to ignore the situation and let the client handle it.

The AcceptRejectRule works in conjunction with the DataSet, DataTable, and DataRow AcceptChanges/RejectChanges methods. The AcceptChanges are a way of either accepting pending changes to data or rejecting them and rolling DataSet data back to previous values. The AcceptRejectRule determines whether to apply the action to child rows based on a call to the AcceptChanges/RejectChanges of parent rows. The default rules for a ForeignKeyConstraint are to Cascade updates/deletes while ignoring the AcceptChanges/RejectChanges propagation.

Listing 2—Output from Building a DataSet

Displaying DataSet Structure

Table: Customers
    PrimaryKey: ID
    Column: ID
        Type: System.Int32
        Unique: True
        Autoincrement: True
        MaxLength: -1
        Expression:
    Column: Name
        Type: System.String
        Unique: False
        Autoincrement: False
        MaxLength: 14
        Expression:
    Column: Company
        Type: System.String
        Unique: False
        Autoincrement: False
        MaxLength: 14
        Expression:
    Constraint: Constraint1 UniqueConstraint
         PrimaryKey:True

Table: Orders
    PrimaryKey: ID
    Column: ID
        Type: System.Int32
        Unique: True
        Autoincrement: True
        MaxLength: -1
        Expression:
    Column: CustID
        Type: System.Int32
        Unique: False
        Autoincrement: False
        MaxLength: -1
        Expression:
    Column: Date
        Type: System.DateTime
        Unique: False
        Autoincrement: False
        MaxLength: -1
        Expression:
    Column: Total
        Type: System.Decimal
        Unique: False
        Autoincrement: False
        MaxLength: -1
        Expression:
    Column: MyExpression
        Type: System.Int32
        Unique: False
        Autoincrement: False
        MaxLength: -1
        Expression: ID + 1
    Constraint: Constraint1 UniqueConstraint
         PrimaryKey:True
    Constraint: CustOrderRelation ForeignKeyConstraint
         Related Table:Customers
         Related Column:ID
         UpdateRule:Cascade
         DeleteRule:Cascade
         AcceptRejectRule:None
    Relation: CustOrderRelation
        Parent Columns: ID
        ParentKeyConstraint: Constraint1
        Child Columns: CustID
        ChildKeyConstraint: CustOrderRelation

Adding Data to the DataSet

The DataSet does no good if it consists of only structure without data. Listing 3 shows how to load row data using the DataSet structure building code from Listing 1. For those who are itching to use the database, fear not—we'll allow the DataAdapter to do the hard work in conjunction with a data source at the end of this article.

Listing 3—Filling a DataSet with Data

using System;
using System.Data;

namespace DisconnectedOpsDemo
{

public class FillingDataSet
{

public static void AddDSData(DataSet ds)
{
  DataTable dtCusts = ds.Tables["Customers"];

  // add customer by creating a DataRow from table
  // row factory method
  DataRow dr = dtCusts.NewRow();
  dr["Name"] = "Mike Smith";
  dr["Company"] = "XYZ Company";
  dtCusts.Rows.Add(dr);

  // pull back the autoincrement field so we
  // can use it as the foreign key for the orders
  int SmithCustID = (int) dr["ID"];

  // uncomment below to demonstrate
  // ConstraintException because ID column
  // violates Unique constraint
  /*
   dr = dtCusts.NewRow();
   dr["ID"] = SmithCustID;
   dr["Name"] = "Mike Smith";
   dr["Company"] = "XYZ Company";
   dtCusts.Rows.Add(dr);
  */

  dr = dtCusts.NewRow();
  dr["Name"] = "John Doe";

  // Uncomment code below to generate
  // Argument exception because of Name
  // column data size violation
  //dr["Name"] = "This is more than 24 characters";

  dr["Company"] = "ABC Corp";
  dtCusts.Rows.Add(dr);
  int DoeCustID = (int) dr["ID"];

  DataTable dtOrders = ds.Tables["Orders"];

  // add Order using factory method
  dr = dtOrders.NewRow();
  dr["CustID"] = SmithCustID;
  dr["Date"] = DateTime.Now;
  dr["Total"] = 29.99;
  dtOrders.Rows.Add(dr);

  // add Order by using an object array
  dtOrders.Rows.Add(
   new object[] {null,
   SmithCustID,DateTime.Now,99.99});

  // uncomment below to demonstrate
  // InvalidConstraintException because of bad
  // foreign key
  /*
    dtOrders.Rows.Add(
   new object[] {null,
   -1,DateTime.Now,555.55});
  */

  dtOrders.Rows.Add(
   new object[] {null,
    DoeCustID,
   DateTime.Parse("2/5/2001"), 19.99});

  dtOrders.Rows.Add(
   new object[] {null,
   DoeCustID,
   DateTime.Parse("2/15/2001"), 29.99});


}

public static void DisplayDSData(DataSet ds)
{
  Console.WriteLine("\nNavigating by DataTable");

  // display each table
  foreach (DataTable dt in ds.Tables)
  {
   Console.WriteLine("\nTable: {0}", dt.TableName);

   // go through table rows by index
   for (int rowindex = 0;
     rowindex < dt.Rows.Count; rowindex++)
   {
     DataRow dr = dt.Rows[rowindex];
     Console.Write("Row: {0} ",rowindex);

     // loop thru each column and display name/value
     foreach (DataColumn dc in dt.Columns)
     {
      Console.Write("{0}={1} ",
        dc.ColumnName, dr[dc.ColumnName]);
     }
     Console.WriteLine();
   }
  }


}

public static void NavigateDSRelationships(DataSet ds)
{
  Console.WriteLine("\nNavigating by DataRelation\n");

  // go through Customers rows using foreach
  foreach (DataRow drCusts in
   ds.Tables["Customers"].Rows)
  {
   Console.Write("Cust Row: ");

   // loop thru each column and display name/value
   foreach (DataColumn dc in
     ds.Tables["Customers"].Columns)
   {
     Console.Write("{0}={1} ",
      dc.ColumnName, drCusts[dc.ColumnName]);
   }
   Console.WriteLine();

   // navigate to child Order rows using the
   // CustOrderRelation DataRelation
   foreach (DataRow drOrders in
     drCusts.GetChildRows("CustOrderRelation"))
   {

     Console.Write("\tOrder Row: ");

     // loop thru each column and display name/value
     foreach (DataColumn dc in
      ds.Tables["Orders"].Columns)
     {
      Console.Write("{0}={1} ",
        dc.ColumnName, drOrders[dc.ColumnName]);
     }
     Console.WriteLine();
   }

  }


}

public static void Main()
{
  DataSet ds = BuildingDataSet.BuildDSStructure();
  AddDSData(ds);
  DisplayDSData(ds);
  NavigateDSRelationships(ds);
  Console.WriteLine();
}
}
}

The DataRow class takes responsibility for carrying data payload. The DataSet provides several techniques for creating the DataRow:

  • Creating the DataRow explicitly and adding it to the Rows collection

  • Using the DataTable's AddNew factory method to manufacture a DataRow

  • Using the Add method of the Rows collection of the DataTable and passing in an object array

All of these techniques are demonstrated in Listing 3.

Creating Customer rows is simpler than the Order rows in Listing 3 because of the absence of foreign key constraints at the Customer level. The example saves the autogenerated CustID values in order to link the Order rows with their parent Customer rows.

The DataRow additions are subject to the constraints and restrictions of the column definitions. The commented-out code in Listing 3 tests out the UniqueConstraint by duplicating customer ID columns in the Customer table; it verifies the ForeignKeyConstraint by using -1 in the CustID column of an order; it also tests out the MaxLength restriction of the Name column in the Customers table.

Displaying the Data

Once the data load is complete, we can display the data by navigating through the DataTable and DataRow objects. The DisplayDSData routine from Listing 3 does so by listing both tables' row data separately. The code uses an index to loop through each DataRow object by position. The example also demonstrates on how to enumerate the DataColumn collection of the DataTable so we can write out each column name and value in the DataRow data.

The second routine, NavigateDSRelationships, uses the DataRelation capability to navigate directly from rows into the Customer table down into corresponding child rows in the Orders table. The GetChildRows of the DataRow is the gateway to this functionality and requires the name or object reference to the appropriate DataRelation object. Listing 4 is the output from the process.

Listing 4—Output from Navigating the Filled DataSet

Navigating by DataTable

Table: Customers
Row: 0 ID=1 Name=Mike Smith Company=XYZ Company
Row: 1 ID=2 Name=John Doe Company=ABC Corp

Table: Orders
Row: 0 ID=1 CustID=1 Date=5/12/2002 10:08:21 PM
Total=29.99 MyExpression=2

Row: 1 ID=2 CustID=1 Date=5/12/2002 10:08:21 PM
Total=99.99 MyExpression=3

Row: 2 ID=3 CustID=2 Date=2/5/2001 12:00:00 AM
Total=19.99 MyExpression=4

Row: 3 ID=4 CustID=2 Date=2/15/2001 12:00:00 AM
Total=29.99 MyExpression=5


Navigating by DataRelation

Cust Row: ID=1 Name=Mike Smith Company=XYZ Company
    Order Row: ID=1 CustID=1
       Date=5/12/2002 10:08:21 PM Total=29.99
       MyExpression=2
    Order Row: ID=2 CustID=1 Date=5/12/2002 10:08:21 PM
       Total=99.99 MyExpression=3
Cust Row: ID=2 Name=John Doe Company=ABC Corp
    Order Row: ID=3 CustID=2 Date=2/5/2001 12:00:00 AM
       Total=19.99 MyExpression=4
    Order Row: ID=4 CustID=2 Date=2/15/2001 12:00:00 AM
       Total=29.99 MyExpression=5

Modifying the Data

Once the data has been loaded into the DataSet, the client is free to modify and update its data. The DataSet supports a rich versioning system for data that allows it to keep track of row changes, as well as keeping several versions of column data around to help when working with a data source.

The DataRow RowState property is an enumeration type named DataRowState that represents the possible states a DataRow can cycle through: Added, Deleted, Detached, Modified, Unchanged. The state is changed to Added after adding a new DataRow to the DataTable Rows collection, Deleted when you call Delete on the DataRow, Detached if you call Remove on the DataRow. Unchanged is for a DataRow that has not had column value modifications, and Modified is the state for a DataRow whose column data has changed.

The DataRow maintains several versions of its column data based on the DataRowVersion enumeration: Original, Default, Proposed, and Current. To get a specific version of a column value, it's necessary to pass a DataRowVersion enumeration as an extra parameter to the data indexer that gives you access to the column data for a row. The default use of the indexer brackets is to return the Current value, but you can use Original enumeration to get the value that was in the DataRow before modifications began. The Default enumeration is used to get at the default value defined by the DataRow column metadata. The Proposed value is only available if the DataRow is edited with a BeginEdit/EndEdit pair. The process has other byproducts as well, as it turns off constraint checking and raising of data validation expressions. To prevent a problem getting the versioning values, be sure to call the HasVersion method that returns a bool telling the client whether the value is present.

Listing 5 shows an example that continues working with our constructed DataSet and actually modifies the data. The first thing it does is find John Doe's customer record by doing a lookup of the Name column. Once positioned on the correct DataRow, it calls Delete on the DataRow. The presence of the ForeignKeyRelationship and a Cascade value for its DeleteRule means that the corresponding child Order rows are deleted as well. Listing 6 shows the results of printing out the row state and column data versions to confirm the process.

To update Mike Smith's customer record, we use the Find method of the Rows collection by passing in the PrimaryKey value, as contrasted with our previous search for John Doe. The code also uses a BeginEdit/EndEdit pair to demonstrate the generation of a Proposed version of the column data for the Customer DataRow. After the edit of the Smith record, we display the version information. The final step in the example is to show the effect of an AcceptChanges after the modifications.

Listing 5—Modifying DataSet Data

using System;
using System.Data;

namespace DisconnectedOpsDemo
{

public class UpdatingDataSet
{
public static void ModifyDSData(DataSet ds)
{
  Console.WriteLine("\nModify DataSet");

  // clear out load and previous change
  // metadata
  ds.AcceptChanges();

  // loop through rows to find John Doe
  // using the Name column
  DataRow drDoe = null;
  foreach (DataRow dr in ds.Tables["Customers"].Rows)
  {
   if ((string)dr["Name"] == "John Doe")
   {
     drDoe = dr;
   }
  }

  // delete the Doe row to demonstrate the
  // cascading delete rule that the ForeignKey
  // constraint enforces to remove all
  // child orders of the Doe customer
  drDoe.Delete();


  // find the customer row with a primary key
  // value of 1 (Should be Smith)
  DataRow drSmith = ds.Tables["Customers"].Rows.Find(1);

  // change the name

  // change the name using the BeginEdit/EndEdit pairing
  // to get a Proposed row value
  drSmith.BeginEdit();
  drSmith["Company"] = "ABC Company";
  drSmith["Name"] = "Dale Michalk";

  // show the metadata changes to the DataSet
  DisplayDSMetaData(ds);

  drSmith.EndEdit();

}

public static void DisplayDSMetaData(DataSet ds)
{
  DisplayTableMetaData(ds.Tables["Customers"]);
  DisplayTableMetaData(ds.Tables["Orders"]);
}

public static void DisplayTableMetaData(DataTable dt)
{
  Console.WriteLine("\nDisplaying MetaData for {0}\n",
   dt.TableName);

  // go through Customers rows using foreach
  for (int index = 0; index < dt.Rows.Count;
   index++)
  {
   DataRow dr = dt.Rows[index];
   Console.WriteLine("Row #{0}", index);
   DisplayRowMetaData(dr, dt);

  }
}

public static void DisplayRowMetaData(DataRow dr, DataTable dt)
{
  Console.WriteLine("RowState:{0}", dr.RowState);

  if (dr.RowState != DataRowState.Deleted)
  {

   // loop thru each column and display name/value
   foreach (DataColumn dc in dt.Columns)
   {
     object Default = null;
     if (dr.HasVersion(DataRowVersion.Default))
     {
      Default = dr[dc.ColumnName,
        DataRowVersion.Default];
     }
     else
      Default = "N/A";

     object Original = null;
     if (dr.HasVersion(DataRowVersion.Original))
     {
      Original = dr[dc.ColumnName,
        DataRowVersion.Original];
     }
     else
      Original = "N/A";

     object Proposed = null;
     if (dr.HasVersion(DataRowVersion.Proposed))
     {
      Proposed = dr[dc.ColumnName,
        DataRowVersion.Proposed];
     }
     else
      Proposed = "N/A";

     object Current = null;
     if (dr.HasVersion(DataRowVersion.Current))
     {
      Current = dr[dc.ColumnName,
        DataRowVersion.Current];
     }
     else
      Current = "N/A";

     Console.WriteLine("\tCol:{0} Default:{1} " +
      "Original:{2} Proposed:{3} Current:{4}",
      dc.ColumnName, Default, Original,
      Proposed, Current);
   }
  }
}

public static void Main()
{
  DataSet ds = BuildingDataSet.BuildDSStructure();
  FillingDataSet.AddDSData(ds);
  Console.WriteLine("\nChanges to DataSet");
  Console.WriteLine("----------------------------------------");
  ModifyDSData(ds);
  ds.AcceptChanges();
  Console.WriteLine("\nAfter AcceptChanges");
  Console.WriteLine("----------------------------------------");
  DisplayDSMetaData(ds);
  Console.WriteLine();
}
}
}

Listing 6—Output from Modifying DataSet Data

Changes to DataSet
----------------------------------------

Modify DataSet

Displaying MetaData for Customers

Row #0
RowState:Unchanged
    Col:ID Default:1 Original:1 Proposed:1 Current:1
    Col:Name Default:Dale Michalk Original:Mike Smith
         Proposed:Dale Michalk Current:Mike Smith
    Col:Company Default:ABC Company Original:XYZ Company
         Proposed:ABC Company Current:XYZ Company
Row #1
RowState:Deleted

Displaying MetaData for Orders

Row #0
RowState:Unchanged
    Col:ID Default:1 Original:1 Proposed:N/A Current:1
    Col:CustID Default:1 Original:1 Proposed:N/A Current:1
    Col:Date Default:5/12/2002 10:32:45 PM
         Original:5/12/2002 10:32:45 PM
         Proposed:N/A Current:5/12/2002 10:32:45 PM
    Col:Total Default:29.99 Original:29.99 Proposed:N/A
         Current:29.99
    Col:MyExpression Default:2 Original:2 Proposed:N/A Current:2
Row #1
RowState:Unchanged
    Col:ID Default:2 Original:2 Proposed:N/A Current:2
    Col:CustID Default:1 Original:1 Proposed:N/A Current:1
    Col:Date Default:5/12/2002 10:32:45 PM
         Original:5/12/2002 10:32:45 PM
         Proposed:N/A Current:5/12/2002 10:32:45 PM
    Col:Total Default:99.99 Original:99.99 Proposed:N/A
         Current:99.99
    Col:MyExpression Default:3 Original:3 Proposed:N/A Current:3
Row #2
RowState:Deleted
Row #3
RowState:Deleted

After AcceptChanges
----------------------------------------

Displaying MetaData for Customers

Row #0
RowState:Unchanged
    Col:ID Default:1 Original:1 Proposed:N/A Current:1
    Col:Name Default:Dale Michalk Original:Dale Michalk
         Proposed:N/A Current:Dale Michalk
    Col:Company Default:ABC Company Original:ABC Company
          Proposed:N/A Current:ABC Company

Displaying MetaData for Orders

Row #0
RowState:Unchanged
    Col:ID Default:1 Original:1 Proposed:N/A Current:1
    Col:CustID Default:1 Original:1 Proposed:N/A Current:1
    Col:Date Default:5/12/2002 10:32:45 PM
         Original:5/12/2002 10:32:45 PM
         Proposed:N/A Current:5/12/2002 10:32:45 PM
    Col:Total Default:29.99 Original:29.99 Proposed:N/A
         Current:29.99
    Col:MyExpression Default:2 Original:2 Proposed:N/A Current:2
Row #1
RowState:Unchanged
    Col:ID Default:2 Original:2 Proposed:N/A Current:2
    Col:CustID Default:1 Original:1 Proposed:N/A Current:1
    Col:Date Default:5/12/2002 10:32:45 PM
         Original:5/12/2002 10:32:45 PM
         Proposed:N/A Current:5/12/2002 10:32:45 PM
    Col:Total Default:99.99 Original:99.99 Proposed:N/A
         Current:99.99
    Col:MyExpression Default:3 Original:3 Proposed:N/A Current:3

Press any key to continue

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020