Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Sample Database

Our sample database stores account information for a small bank. There are three tables:

  • Account stores information about bank accounts. Columns are AccountId, Owner, AccountType, and Balance. The primary key is AccountId.

  • IdGen has one column—NextAccountId. There is only one row. This table is used to provide a simple mechanism for generating IDs for new accounts, in a manner that works the same for both the Access database and the SQL Server database.

  • Transaction stores information about account transactions. Columns are XactType, AccountId, and Amount. There is a parent/child relationship between the Account and Transaction tables. (For demonstration purposes, this relationship is deliberately omitted from the Access database.)

The download file contains an Access version of the database, SimpleBank.mdb; and a script, CreateSimpleBank.sql, for setting up a SQL Server version of the database.

  • + Share This
  • 🔖 Save To Your Account