Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

R:BASE databases are stored in four files. When you created the SkyWrite database, R:BASE created four files: SkyWrite.RX1, SkyWrite.RX2, SkyWrite.RX3, and SkyWrite.RX4. These four files together make up a database.

 

The first file, SkyWrite.RX1, holds the information on the structure of the database including the table and column definitions. The second file, SkyWrite.RX2, holds the data. SkyWrite.RX3 holds the values of all indexed columns. The fourth file of the database, SkyWrite.RX4, holds the large object data. When you defined the database, R:BASE stored the four database files in the current directory.

 

Viewing the Database Structure

We used the [F3] key earlier in this lesson to look at database information. We can also look at database information using the R:BASE command mode-the "R:BASE R> Prompt" window. There, we'll use the LIST command to see information about the structure of the database-the columns and tables.

 

To list the tables in the SkyWrite database:

 

1.Choose Tools: "R> Prompt..." or select the R> Prompt button on the toolbar.

 

The "R:BASE R> Prompt" window opens. Whenever you are at the R:BASE command line, R:BASE displays an "R>" prompt.

 

2.Enter "LIST" at the "R> Prompt and press [Enter].

 

A list of the tables in the database is displayed.

 

To edit these settings, choose "Settings" from the menu bar, and choose "R> Prompt..." from the list of options.

 

The tables you created are listed. The screen shows the number of columns and rows in each. The total number of tables and columns in the database is more than you defined. These numbers include the R:BASE system tables. The system tables are not displayed with this LIST command.

 

To list the system tables in the SkyWrite database:

 

At the R> Prompt, enter "LIST SYS%" and press [Enter].

 

A list of the system tables in the database is displayed. Each system table begins with "SYS_" R:BASE takes care of updating and maintaining the system tables.

 

In addition to listing information about the tables in a database, you can also list information about the columns in a database. First, display the columns defined for a specific table.

 

To list information about a specific table:

 

1.At the R> Prompt, enter "LIST TABLE Customer" and press [Enter].

 

The "More output follows" dialog box is displayed in the center of the screen. You can move the dialog box so it doesn't cover the data on the screen. The dialog box will be displayed in the new location until you move it again.

 

Information about the customer table is displayed. The CustomerID column is marked as a primary key, autonumbered column.

 

2.Click the "Yes" button to display the rest of the columns in Customer.

 

Now, we'll look at all the columns defined for the SkyWrite database.

 

To list all the columns in a database:

 

1.At the R> Prompt, enter "LIST COLUMNS" and press [Enter].

 

R:BASE displays all of the columns in the database in alphabetical order. You can see which columns appear in more than one table. For example, the CustomerID column is listed in the Customer and Flights tables.

 

2.Click the "Yes" button to display more output or click the "No" button to quit.

 

Since we are done looking at the list of columns, let's clear the screen.

 

To clear the screen:

 

At the R> Prompt, enter "CLS" and press [Enter].

 

R:BASE clears the screen of all data.