Introduction to Data Management
Accessing Databases With NonStop SQL
3-8 15873 Tandem Computers Incorporated
Partitioning a table geographically allows you to place data where it is used most
often, optimizing its access to users at that site. Even if a large table fits on a single
volume, partitioning it across many disks can improve access efficiency. This
distribution supports simultaneous access to different partitions of the same table.
NonStop SQL handles the partitions for you automatically—you access and update a
partitioned table just as though it were stored on a single disk.
Audited Tables
When you make changes to your database, you should do so in the context of TMF
transactions. This requires that you audit most tables affected by your transactions,
and that you define the start and finish of each transaction in your application. These
steps allow TMF to back out incomplete transactions and to use audit trails to recover
transactions lost because of system or media failures.
To protect your transactions, all NonStop SQL tables are audited automatically, unless
you specify otherwise. For most tables, you will want to retain auditing—but for
some tables, such as those containing log entries, you should suspend this capability.
A view is fully audited if all of the tables on which it is based are audited. The view
has mixed auditing, however, if only some of its underlying tables are audited.
More information about TMF transactions appears in Section 7.
Views If you frequently need to access data from several related tables, you can select the
columns and rows you want to use and then create a view that saves a named
definition of these columns and rows. This view is a virtual table; the data in it is not
stored separately, but is computed from the table or tables on which the view is based.
Views allow users and applications to look at data as if it were exclusively their own.
Conversely, views eliminate the need to keep many copies of the same data for
different users. Views increase productivity; when you use a view, you need not
refer to the names of individual columns or specify selection criteria for rows—you
just indicate the name of the view.
There are two types of views: protection views and shorthand views. Protection
views, as noted earlier, are used mainly for security and privacy. A protection view is
derived from only one table, but that same table can support many protection views.
A protection view can have different security restrictions from its underlying table.
So, you can protect an entire view, or columns within it, from unauthorized access.
You can modify the data in a protection view, provided that the view definition does
not prohibit modification.