Sie sind auf Seite 1von 20

Fox pro

Fox pro is one of the leading management system software for the pc. Fox pro is also called relational database management system. Fox pro helps you to design database files as per the requirements and as per the specified format. It also helps you to edit, view and change data in the database through simple built in. Once the database is ready, you can use it to retrieve selected information from it. The retrieve information can be displayed or printed as per the desired report format. The best part is that the data entered and stored is flexible that is you can change or modify the contents as well as the structure of a database any number of times.

CREATING A DATABASE FILE WITH FOXPRO


Creating a database file implies designing and structure to store some specific information and to assist the computer and fox pro before you store the actual information In a database file, you tell fox pro about the structure of the file. The structure defines how the information will be stored in that database file that is how many fields are there in the files and what information is stored in each fields. The structure also limits the lengths of the data stored in each field, so to create a database file you have to first specify its structure. Let us create a DB file to store the names and address, let us further break the address part in three parts- address, city and pin. You can create a database file by selecting file new that is the new option from the file, pull down menu. Step 1: Take Print screen of open window.

Step 2: Defining database structure This dialog box is used to define the structure for the db file being created. Now, concentrate on specifying the structure for your address db file. While defining the structure, you specify the following details: 1. Unique field name for each field name i.e. each fields must have a name that is not being used by any other field. 2. Field types i.e. the type of data such as numeric or character to be stored in each field. 3. Width of each field. For numeric field, also specify the number of decimal digits.

Step 3: print screen of the soft copy When you decide to create a db file for a particular application, you already know the type of data to be stored in it.

VARIOUS DATA TYPES IN FOX PRO Different types of fields are used to store different types of data. For instance, to store salary of a person, numeric field is used and the date field is used to store the work of a person. Fox pro supports the following field types. 1. 2. 3. 4. 5. 6. 7. CHARACTER NUMERIC FLOAT DATE LOGICAL MEMO GENERAL

CHARACTER The character field can store all printable characters. For e.g. in the address database file, if we have four fields such as name, locality, city and pin. So, all the fields such as name, locality and city will be stored as character values and pin would be stored as numeric value.

NUMERIC As the name numeric field suggest, these fields can hold only numeric data, thus you can only store digits 0,1,2,3,4,5,6,7,8,9,decimal point. A numeric field can be up to 20 digits wide. The numeric field can also have a decimal part. The width of the decimal part can be 0 to 18 digits. Some examples of numbers you can store in numeric fields are 15, 15.32, -0.98, +45.There are certain entries such as numbers, pin codes, account numbers, employee codes etc. that are stored using numeric data type.

FLOAT The float field is quite similar to the numeric field. The float field too can be up to 20 digits wide; can have a decimal point and decimal part. The float type data is used for scientific calculations.

DATE Date data type is used to store dates. The dates are stored in a specific format in a database file that is MM/DB/YY. Fox pro always assign a width of 8 bytes for a date field.

LOGICAL The logical field is a special one byte long field that is used to store either T for TRUE or F for FALSE in it. While entering data in a logical field, you may enter T or F, Y for YES and N for NO. Logical fields are particularly useful for storing information that has only two states e.g., pass/fail, present/absent, permanent/ temporary.

MEMO The memo field is a special field where you can store any amount of data. This is particularly useful for storing long textual information. It can store maximum 4000 characters. Further, you can also store binary data in MEMO fields.

GENERAL The general type field is used to imbed objects created in one windows applications within fox pro database. For instance, you can use a general field to include a complete pie chart or even a word processed document.

SAVING DATABASE STRUCTURE STEP 1: After you have defined your field, the cursor is positioned under name. PRESS ENTER and the cursor jumps to the OK push button.

Step 2: Press enter or click the mouse on the OK PRESS BUTTON.

List command
It is used to display the contents of a database either on screen or on printer. Before list command is used, a database must be in use. 1. 2. 3. 4. List: It displays record number and content of current database file. List structure: it displays the structure of current database file. List field: it displays the content of specified fields. List for expression: it displays records matching the specified expression.

Display command
1. Display: display record number and contents of current record.

2. Display all: display all records and waits for the user to press a key before displaying is continued. 3. Display record: display record no. and contents of record number. 4. Display structure: display database structure. 5. Display fields: display contents of specified fields. 6. Display next: displays record number and contents of next n records. 7. Display expression $ field name: displays records numbers that have strings within the specified fields that match the string in the expression.

Insert command
Interior of the database it is used to insert new records within the interior of the database. 1. Insert: insert a record after the current record. Then displays a record entry mark, to let the user to type the content of each field.

Edit command
It is used to change the contents of one or more records in a current database. 1. Edit: display the content of the current record in an editing mask. Editing is achieved by typing in new information, deleting old information, or both.

Delete command
It is used to mark for record for deletion. 1. 2. 3. 4. 5. Delete: marks the current record for deletion. Delete record: marks record n for deletion. Delete next n: marks next n records for deletion. Delete all: marks all record within the database for deletion. Delete expression: marks all the records for deletion that match a specified expression.

Recall command
It is used to unmark those records that were marked for deletion with delete command.

Recall: Unmark the current record for deletion.

Pack command
The pack command permanently remove the marked records from the database in use, re sequence the record numbers and releases the space occupied by the deleted records. When the pack command is issued, it removes the marked records permanently. Once a database record has been packed with pack, the deleted records cannot be recalled.

6. 7.

Das könnte Ihnen auch gefallen