Represents a relational database query result instance. DataTable can be result of a query with $Database.Get or you can create an empty DataTable instance with $Database.Empty method.

DataTable is a small version of real database table and does not contain all rows in database table and all values are stored in memory until DataTable.Save called.

DataTable rows can be accessed with DataTable.Rows or DataTable.Each method.

If you want perform some search specific rows by values you can also use the DataTable.ToDictionary method to get a dictionary (Hash table or Map) for fast accessing.

To add a new row you can simply use DataTable.Add or DataTableDictionary.Ensure to add or update row.

If your data stored in xml then you can use DataTable.ImportFromXml method to import all xml nodes as table rows.

After all changes (insert, delete or update) completed you can persist all changes to into database with DataTable.Save method.

General Database Operation Workflow