|

|
Instructions for Segmenting a Database
|
When a database has reached its maximum size (2 gigabytes) for a single file, it needs to be "split". Splitting a database means creating multiple disk files (called segments) that together hold the entire database. The maximum size for a single segment is 2 gigabytes. There can be up to 64 segments to a database - thus 128 gigabytes total space.
To create segments, the 4D Tools are used.
Segmenting on Windows
- Rename the existing files (KIDSSIEP.4DD and KIDSSIEP.4DR) to be "oldKIDSSIEP.4DD" and "oldKIDSSIEP.4DR". This is done so the new database files can have the same name (KIDSSIEP) as the previous database.
- Open 4D Tools and specify the compiled database (KIDSSIEP.4DC) as the file to open. To see the .4DC file, you will need to change the popup menu at the bottom of the Open dialog to be Compiled Database. When asked, specify oldKIDSSIEP.4DD as the data file to open.
- Go to the Maintain page of the 4D Tools.
- Click on the "Compact..." button at the bottom of the page. This will bring up a "Create a data file..." dialog.
- Click on the "Split" button.
- This will bring up another dialog - this one to create segments. There will be an option for setting segment size with an initial value of 0. Do not change it. Leave it set to 0. This will specify that segments can be max size (2 gigabytes).
- Click the "Add" button. This will bring up a Save dialog. The default name supplied for saving the file will probably be KIDSSIEP2.4DD. Change this name to "KIDSSIEP.4DD". Then click the Save button.
- Click the "Add" button again. This will bring up the Save dialog again. The default name for saving this file will probably be KIDSSIEP2.4DS. Change this name to "KIDSSIEP.4DS". (Note the "S" in the suffix - .4DS instead of .4DD.) Click the Save button.
- At this point, the database consists of two segments, each of which can contain up to 2 gigabytes of data. Since the database is already 2 gigabytes, you probably should create another segment now so this process does not have to be repeated anytime soon.
- Click the "Add" button a third time. This will bring up the Save dialog. The default name this time will probably be KIDSSIEP22.4DS. Change the name to "KIDSSIEP2.4DS". (Note the "S" in the suffix and the single "2" in the name after the "P".) Click the Save button.
- There will now be three segments listed in the scrolling list of file names. Click the OK button.
- Note: If you want to create more than 3 segments, then the fourth should have a name of KIDSSIEP3.4DS, the fifth should have a name of KIDSSIEP4.4DS, etc.
- After clicking the OK button, the 4D Tools will start the compacting process. Since you have 2 gigabytes of data, this may take some time. The result will be one file (KIDSSIEP.4DD) that is still about 2 gigabytes in size. The other two files will be very small (around 18K bytes). As data is added to your database, these other two files will grow - each will have a maximum size of 2 gigabytes. Therefore, after the Tools are done, you will have a database capable of storing up to 6 gigabytes of data.
- After the database is compacted, click the Quit button.
- Note that there will be only a single .4DR file - KIDSSIEP.4DR. The second and third segments to not have their own .4DR files.
The database now consists of 4 files -
KIDSSIEP.4DD
KIDSSIEP.4DR
KIDSSIEP.4DS
KIDSSIEP2.4DS
These three segments (each individual disk files, plus the KIDSSIEP.4DR file) combined now will contain your database. Whenever anything is done to the database (e.g., making backups), all four files must be included. You should not change the names of these files once they are created. When the WebKIDSS program is started up, you will specify only the first file (KIDSSIEP.4DD) as the datafile. 4D will know that it has been segmented and what the other segments are named.
Segmenting on Macintosh
- Rename the existing data file (KIDSSIEP.data) to be "oldKIDSSIEP.data". This is done so the new database files can have the same name (KIDSSIEP) as the previous database.
- Open 4D Tools and specify the compiled database (KIDSSIEP) as the file to open. To see the KIDSSIEP file, you will need to change the popup menu at the bottom of the Open dialog to be Compiled Database. When asked, specify oldKIDSSIEP.data as the data file to open.
- Go to the Maintain page of the 4D Tools.
- Click on the "Compact..." button at the bottom of the page. This will bring up a "Create a data file..." dialog.
- Click on the "Split" button.
- This will bring up another dialog - this one to create segments. There will be an option for setting segment size with an initial value of 0. Do not change it. Leave it set to 0. This will specify that segments can be max size (2 gigabytes).
- Click the "Add" button. This will bring up a Save dialog. The default name supplied for saving the file will probably be KIDSSIEP2.data. Change this name to "KIDSSIEP.data". Then click the Save button.
- Click the "Add" button again. This will bring up the Save dialog again. The default name for saving this file will probably be KIDSSIEP2.d2. Change this name to "KIDSSIEP.d2". (Note the ".d" in the suffix - .d2 instead of .data.) Click the Save button.
- At this point, the database consists of two segments, each of which can contain up to 2 gigabytes of data. Since the database is already 2 gigabytes, you probably should create another segment now so this process does not have to be repeated anytime soon.
- Click the "Add" button a third time. This will bring up the Save dialog. The default name this time will probably be KIDSSIEP2.d3. Change the name to "KIDSSIEP.d3". Click the Save button.
- There will now be three segments listed in the scrolling list of file names. Click the OK button.
- Note: If you want to create more than 3 segments, then the fourth should have a name of KIDSSIEP.d4, the fifth should have a name of KIDSSIEP.d5, etc.
- After clicking the OK button, the 4D Tools will start the compacting process. Since you have 2 gigabytes of data, this may take some time. The result will be one file (KIDSSIEP.data) that is still about 2 gigabytes in size. The other two files will be very small (around 18K bytes). As data is added to your database, these other two files will grow - each will have a maximum size of 2 gigabytes. Therefore, after the Tools are done, you will have a database capable of storing up to 6 gigabytes of data.
- After the database is compacted, click the Quit button.
The database now consists of 3 files -
KIDSSIEP.data
KIDSSIEP.d2
KIDSSIEP.d3
These three segments (each individual disk files) combined now will contain your database. Whenever anything is done to the database (e.g., making backups), all three files must be included. You should not change the names of these files once they are created. When the WebKIDSS program is started up, you will specify only the first file (KIDSSIEP.data) as the datafile. 4D will know that it has been segmented and what the other segments are named.