0% found this document useful (0 votes)
10 views44 pages

Lesson 1-3

This document provides an introduction to Visual FoxPro, a relational database management system (RDBMS) that allows for data manipulation and application development across various platforms. It covers fundamental concepts of databases, the history of Visual FoxPro, and basic terminology related to data fields and records. Additionally, it outlines the steps for creating and managing databases and tables within Visual FoxPro.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views44 pages

Lesson 1-3

This document provides an introduction to Visual FoxPro, a relational database management system (RDBMS) that allows for data manipulation and application development across various platforms. It covers fundamental concepts of databases, the history of Visual FoxPro, and basic terminology related to data fields and records. Additionally, it outlines the steps for creating and managing databases and tables within Visual FoxPro.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Information and

Communications Technology
LESSON 1:
INTRODUCTION TO VISUAL FOXPRO
Information and Communications
Technology

Introduction to Visual FoxPro


What is Visual FoxPro?
It’s a standalone tool for data manipulation
It’s a development tool for standalone, LAN, client-server, COM and Web
applications
It’s a database engine
It’s a programming language
It’s part of Visual Studio
It’s an integral part of Microsoft Windows
It’s a religion
Visual FoxPro is a Relational Database
Management System (RDBMS), which
allows you to work with several logically
related tables of data simultaneously. A
Table in a database contains a number
of Rows and Columns. One row in the
table is equivalent to one record and
one column is equivalent to one field.
CONCEPT OF DATABASE MANAGEMENT
SYSTEM (DBMS)
Before you understand the concept of Database
Management System. (DBMS), it is necessary that you
understand few basic terms related to DBMS.
Let us begin with data. Anything can be data, e.g., a
number, name of a person or place, address, etc.
When a data is meaningful, it is called Information and a
Database is an organized collection of related information.
You can use database for:
– retrieving desired information
– taking meaningful decision
– reorganizing information
– processing information
▪Database Management System (DBMS) is a generalized
software package used to build and manage the database,
i.e., add, modify (edit), update, delete and sort (arrange in
a particular order) information in the database.
▪DBMS also helps to retrieve the desired information in
the required format from the database.
▪Visual FoxPro is a leading database Management System.
▪It is a member of Microsoft Visual Studio.
▪Visual FoxPro is one of the Relational Database
Management System (RDBMS).
▪It is windows based Graphical User Interface (GUI) RDBMS.
▪The database is a broader concept in Visual FoxPro in which
the information is stored in related tables.
History
▪Wayne Ratliff was the programmer, working for Martin Marietta and
subcontracting for the Jet Propulsion Laboratory, who started to create a
natural-language-style database engine and manipulation language on his IMSAI
8080 computer, in assembler, in his spare time, in order to improve his chances
in the football pool.
▪One thing lead to another, and he was soon marketing the product as dBASE. It
was purchased by Ashton-Tate, then Borland, and is now owned by dBASE, Inc.
▪It was one the key products in the making of the “PC Revolution” of the 1980s
that lead to a PC on every desk. In its heyday, a number of language-compatible
“clones” such as FoxBase, Clipper, dbMAN and many others competed fiercely
for the hearts and minds and wallets of developers.
History
▪Fox Software, based in Perrysburg, Ohio, was formed and run by Dr. David
Fulton. (“Dr. Dave” as he was affectionately known, was a great showman,
who delighted in meeting and presenting to his customers. He is a major
reason that DevCon continues to this day.)
▪Fox Software created a fast, interpreted version of the dBASE runtime and
then broke the mold in going beyond the standard to introduce many
additional features.
▪FoxBase ran on Mac, DOS and Unix platforms. FoxPro, starting with
version 2.5, supported Windows as well. Fox Software was acquired by
Microsoft in March of 1992. While there was a Macintosh version of
Visual FoxPro 3.0, subsequent versions run only on the Windows platforms.
Basic Fundamentals in mastering Visual
FoxPro
▪Data - what it is all about – the application is just a way to better
manage the data
▪Language - how to interact with the data, read it in and display it.
▪The power tools, control and objects that build applications.
▪The fourth section tries to pull together all the previous sections and
provide a perspective and philosophy of how an entire application
should be put together.
Part I - It’s the Data
Terminology
A field is a single piece of information, such a person’s
first name or an item’s price.
Divide up your information so that fields can stand on
their own, and don’t need to be sub-divided when you
are processing.
For example, if your part number is composed of a part
type, a region code, a rating and a sub-part number,
such as AN-33- X4-1234, it can often be better to break
that information into separate fields and combine it
when needed, rather than try to be constantly splitting
the field when looking for all parts from one region.
Terminology
▪Each field has a single datatype.
▪Data types hold a particular kind of information; have upper
and lower limits on their capacity; and are restricted on what
information they can hold.
▪Fields may be character, integer, date, datetime (a combination
of date and time), numeric, double, float, currency logical (true
or false), memo (very long freeform text or binary data).
Specialized datatypes exist to hold OLE information (general
fields), Macintosh binary (picture fields), but are rarely used.
A collection of fields
which hold a single piece
of information are
gathered together to
form a record. For
example, you might
record a check received
from a customer as:
A collection of these
records would form a
table. The table of data
can be viewed in many
ways, but the standard
form used by the Fox
BROWSE command looks
like this:
STARTING VISUAL FOXPRO
▪The minimum hardware/software configuration of the machine
required for installing Visual FoxPro is that you should have a
Pentium Series of Computer with 32 MB RAM and 10GB of Hard Disk
Drive with Windows 95 or higher operating system.
▪In order to start with Visual FoxPro, you must ensure that Visual
FoxPro system is already installed on your computer. To invoke Visual
FoxPro, Double click the My Computer Icon on the Desktop Window.
Then double click C: drive. Now, click on Program Folder and then
Microsoft Visual Studio.
MS Visual Foxpro
MS Visual Foxpro
MS Visual Foxpro
MS Visual Foxpro
MS Visual Foxpro
Data types in Visual FoxPro
Part I – Creating a
Database
l Primary and candidate keys.

Creating a Database l Persistent relationships between database tables.


l Long names for tables and fields.

When you create a database, you gather l Captions on fields that display in Browse windows and
Grid columns as headers.
tables together into one collection and gain
the benefit of data dictionary features. l Default values on fields.

A data dictionary gives you greater l The default control class used in forms.
flexibility in designing and modifying the l Input masks and display formats for fields.
database, and frees you from having to
write code to create field-level and row- l Field-level rules and record-level rules.
level validation or to ensure the uniqueness l Triggers.
of values within primary key fields. The l Stored procedures.
Visual
l Connections to remote data sources.
FoxPro data dictionary enables you to
create or specify: l Local and remote views.
l Comments for each field, table, and database.
Collecting Tables into a Database
To collect tables into a database, you need to create a database container to hold all of the objects such as views,
connections, and stored procedures associated with the tables that make up your database.
To create a new database
In the Project Manager, select the Data tab, then select Databases from the list and choose New.
-or-
l Use the CREATE DATABASE command.
For example, the following code creates and exclusively opens a new database called Sample:
CREATE DATABASE Sample
When you create a new database, it is empty,
containing no associated tables or other
objects. Adding a table creates links between
the table file and the database container. The
link information stored in the database about a
table is a forward link.
The link information stored in the table about
the database container is the backlink.
Adding Tables to a Database
Each Visual FoxPro table can exist in one of two states:
1. either as a free table, which is a .dbf file that is not associated with any
database, or
2. as a database table, which is a .dbf file that is associated with a database.
Tables associated with a database can have properties that tables outside a
database do not have, such as field-level and record-level rules, triggers, and
persistent relationships.
You associate tables with a database by creating them within an open database,
or by adding existing tables to a database.
To add a free table to a database
In the Project Manager, select Tables from the All tab or the Data tab, then choose Add.
-or-
l Use the ADD TABLE command.
For example, the following code opens the testdata database and adds the orditems table:
OPEN DATABASE testdata
ADD TABLE orditems
You must explicitly add an existing free table to a database to make it a part of a database. Modifying the structure
of a free
table does not cause Visual FoxPro to add the free table to a database, even if a database is open when you issue
the MODIFY
STRUCTURE command.

You might also like