FoxPop
 

www.foxpop.co.uk

 


POWERBASE TUTORIAL 4

by Laurie Jane Kern

Navigating the Schema

Tutorial 3 finished with the download of a sample address book, based on the design and specification we chose. Now we are going to use the Sample Address Book (02) to explore the structure of PowerBase.

Let us start by looking at the Schema. If your database does not have a Schema window showing, then go to Menu| File|Create New|Schema view...

 

tut4pic1a.gif (11066 bytes)

 

When a new Schema View is created it is a small square window. Just click on the tab in the bottom right-hand corner and you can alter its shape to suit yourself. As you can see in the Schema view below, there is a tree structure here and at the top is a file cabinet that represents the entire database. Double tap this icon and you will be shown a properties dialog box with information about the database. You cannot change anything here, but have a look at the information displayed, then close it down.

Now go down one level and look at the Table Contacts we have created. Click the + sign to the left of the Table name, and you will see we have 3 areas: Fields, Groups and Views.

 

 

Start with the section labeled Fields (with a small fence icon beside it). Expand this section and you can see all of the fields we created in the last tutorial. Each field has its data type described by an icon: letters for a text field, a little notepad for the data type memo and a key for an auto number. We haven't yet used all the fields of type: date, number, object, but those icons are just as intuitive! In the Schema view, the information within each section is ordered alphabetically, and not as we have ordered it; so locate one of the email fields, double click on it and you can see the properties dialog box for a Field. When you need to work with properties, you can access them through the database Schema.

Using the screen shot below look first at the Details tab.

 

 

Notice that on the Details tab you can change the name of the field but not the data type. As the email field has the data type of text, you can also change the size of the field i.e. the number of characters held in the field. (see tutorial 3)

Next, look at the Attributes tab, using the screen shot below.

 

Fields may have some or all of the following attributes - the screen shot above shows what is available for a text field.

Allowed to change. If set, PowerBase allows you to edit the field contents.

Allow zero value. If not set, PowerBase will not allow you to save a record if the field in question contains the value zero.

Allow blank field. If set the field can contain no data. Clearing the attribute requires data to be entered.

Default value from last record edited. If this attribute is set, then when adding a new record to a table, PowerBase sets the initial value to that belonging to the last record you edited.

Default value expression. You may define an expression that will be evaluated to provide the default value for the field when a new record is created.

Search when finding. If set, it allows PowerBase to search this field when it is attempting to match records when ‘Finding’ records.

Search for phone number. If set it allows PowerBase to search this field when attempting to provide telephone numbers.

For the moment ignore the third tab of our properties dialog box, it will be covered later as you customize some fields. But again, this tab will change according to the field type.

The next section of the Schema is the Groups section.

tut4pic5b.gif (9154 bytes)

Every database has a default view labelled All Records. Now expand the Group section, as shown above,   double click on the All Records  group, and you will find a dialog box like this -

tut4pic5a.gif (11076 bytes)

 

The Group section gives you a way to store a reusable sort order, and criteria for selecting records, and can be applied to a data View. To demonstrate this simple sorting capability, move to Views, double click, select List View and double click again. You should see the 5 sample entries displayed in familiar List view. Now, if you click on a column header in List view, the table is sorted using that column as the sort criteria. Groups are good for selecting and sorting, for example selecting those records of people living in London and sorting them by postal code and then by last name.

In comparison the Find facility, (the "Find" box at the bottom of the window) can only be used to find those people in London and it can't be saved. Similarly if you want to find those people who are in London and are the contact type "Friend", again that can't be done using Find. You will be creating some Groups later, when you have more data in your address book, for the moment you just need to note what this section can do.

Now move to the last section in the Schema labeled Views, and add and edit something in the database. Expand the '+' symbol next to the word Views and you can see there are 2 views: List View and Card View.

 

 

First double click the List view and you get a grid similar to SHEET. Now add a record in this view. If you want another imaginary entry, add the following information.

Title

Ms

First name

Emily

Last name

Bronte

Address Line1

Wuthering Heights

Address Line2

 

City

Howarth

Region

Yorkshire

Postal Code

SR1 5AB

Country

UK

Telephone Home

+44 113 222333

Telephone Work

+44 113 233444

Mobile

+44 606 444555

Fax

+44 123 255666

Email 1

emily@bronte.co.uk

Email 2

ebronte@wuthering.co.uk

URL

www.heathcliffe.co.uk

Contact Type

business

Notes

Somewhat fevered imagination, but might become an author one day!

Entering new data is very simple, just put your cursor in the column labeled Title and then press the button on the button bar labeled New Record, you are in edit mode. Enter the text shown above, and press the Enter key to move to the next field. If there is not enough room to see what you are typing, press the Tab key to open an "Edit Text" box; this gives you much more space to work.

When you are finished press Cntrl +S or click the OK button to close the Edit box, and then press Enter to move to the next field. When you have completed the entire entry, click the Save button at the top left of the window or press Cntrl+S.

You now have entered an entire record. If you want resize the columns then you can do it in a smilar manner to resizing a column in Sheet, by dragging the column divider, or highlight a cell and then use Shift + the directional keys to alter the display to suit yourself. This technique works in Card view too!

Close this view and open up the Card view. This view has only one record per "card" where in List view you can see all the records displayed in rows. In Card view you can enter another new record, perhaps enter information about yourself, so we will now have two new records in the table. While in Card view, try altering the display.

Before you close PowerBase down I suggest you now play with the navigation buttons at the bottom of the PowerBase window, to cycle forward and backwards through the records. Try using the Find field which we mentioned above, (if you have used find in DATA, you know how to use it here.) Then go back to List view and click on the column headers to see the sort order change.

This lesson may have seemed a bit dry, but it is important to understand the Schema and the basic views. In the next few lessons you will learn how to import a table with data and then merge data into a table. You will be adding relational fields and adding the relational tables that go along with them, as well as how to add fields that calculate a person’s age. If you are not familiar with the basics of the Schema, you will not know how to change things when the need arises.

Download the sample Address Book (03) which brings you up to date with the end of tutorial 4

© LJKern and FoxPop 1999

[Previous] [Index] [Next]