Setting up database subsets
The set-up of database subsets requires three setup phases.
The following information describes the three setup phases:
- Setting up user permissions and initializing the database.
- Specifying the contents of a database subset, through queries and sets, and saving it as a database subset definition (a type of folder object).
- Creating the database subset with an identical structure to the main database and populating it from a database subset definition.
All setup and maintenance is done in iBase rather than iBase Designer.
User permissions
- To define the database subset definitions requires permissions to add folder objects.
- To initialize the main database, the Database Administrator role is required.
- To create database subsets, the Database Creator role is required. If you use Data Access Control groups, full access to all tables and fields is required.
- To synchronize database subsets requires the Database Administrator role and permissions to:
- Add records
- Update records
- Delete records
- Update and delete records created by other users
Initializing the database
- In iBase, log on as a database administrator and open the main database.
- From the Tools menu, select Initialize Database for Database Subsets.
2. Defining a database subset
A database subset definition comprises queries, parameterized queries, and sets. Their constituent records are copied to the database subset when it is created.
Once added to a definition, the parameterized queries are mandatory because the user is prompted for values when creating database subsets and during synchronization. Creation and synchronization is canceled if the user cancels a parameterized query.
Deleting a set or query does not remove it from the subset definition but makes the database subset definition invalid. Invalid definitions cannot be used to create database subsets or to synchronize existing subsets that were created from this definition (unless the database subset is to be discarded after its records are uploaded to the main database).
To define a database subset:
- In the Database Explorer in iBase, right-click on the Database Subset Definitions folder type, and from the shortcut menu, select New.
3. Creating database subsets
- Retrieves the records that define the database subset.
- Creates a temporary database template from the main database and saves it in the user templates folder.
- Creates a security file and system administrator user. (See below for further information about the security file.)
- Creates an empty database subset as an Microsoft Access database based on the temporary database template. The database identifier is recorded in the main database, and Soft Delete is switched on.
- Deletes the temporary database template.
- Populates the database subset with the data.Note: The create date/time and the update date/time of each record in the database subset is set to the create date/time of the record from the main database. Similarly, the Create User and Update User is set to the Create User of the record in the main database.
- Log on to iBase as a user with the Database Creator role and open the main database. From the File menu, select Data Database Subsets Create Database Subset. Click Help if you need assistance on using this dialog.
Security files for database subsets
Each database subset has its own security file. The security file has the same name as the database subset and is created in the same folder. Do not move the security file to a different location.
You will need to specify a new system administrator user name and password when creating the database subset, which is required later when the database subset is synchronized with the main database.
You need to decide whether this user account is to be reserved for database synchronization or whether the user of this database should log on as this user to enter data. All records in the database subset have the name of the current user as the “Create User” or “Update User” after they are uploaded to the main database.
To add a different user account, you can log on to the new security file in iBase Designer and add a user in the Security Manager. You can change the details of the user accounts without affecting the viability of the database subset because when the database subset is subsequently synchronized, you only need to enter a system administrator user name and password from the subset security file.
© Copyright IBM Corporation 1991, 2020.