·       Fox Pro
-        It is very powerful Database Management System.
-        It integrates development Environment allows programmer’s language.
-        It is both interpreter and true compiler.
-        An interpreted language, it translates each command into computer instructions, as it is executes the translation time, most  possibly during loops.
-        It also supports arithmetic function such as addition, subtraction, multiplication, and division.
-        It also provides many special mathematical and financial functions.
-        It works like Data Base.

·       Database
-        It is a collection of information that organized so that it can easily be accessed, managed, and updated.
-        It can be classified according to types of contents like bibliographic, full-text, numeric, and images.
-        It contain aggregations of data records or files, such as sales transactions, product catalogs and inventories, and customer profiles.

·        Relation Database
-        It is a collection of data item organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables.
-        It is invented by E. F. Codd at IBM n 1970.
-        It is the standard user and application program interface to a relation database is the structured query language (SQL).
-        SQL statements are used both for interactive queries for information from a relation database and for gathering data for reports.
-        Relation  Database Management System (RDMS) is a program which helps to create, update, and administrate a relation database.

·        Features of Fox Pro
1)     Database Creating, Updating, Deleting, Recalling, Searching Commands.
2)     Relation Database.
3)     Sorting And Indexing.
4)     Unformatted and Formatted Inputs and Outputs.
5)     Screen Builder.
6)     Procedures and Functions.
7)     Conditional Constructs.
8)     Looping Constructs.
9)     Menus and Menu Builder.
10)  RQBE.
11)  SQL.
12)  Report Generators.
13)  Project Builder.

·        Fox Pro Database
-        It is a collection of related and relevant information.
-        It could be check register, accounting ledger, payroll, client list or inventory.
-        It could be any of thousands of applications in business, education, engineering, and the professions.
-        In fox pro, record may consist a number of items such as employee code number, employees name, address, date of joining, salary,, designation etc. Number of such items in fox pro’s records are known as FIELDS and Number of fields makes up a single record of  single person, and number of such records made up an entire DATABASE.
-        Example :- Employee Registry                           
Field 1
Field 2
Field 3
Field 4
Field 5
Field 6
Code
Name
Address
Date of joining 
Salary
Designation
02380
Sumitra
S/3Delhi
20-05-2020
20,000
Cashier
02490
Aditya
S/5Delhi
30-05-2020
10,000
Accountant

File 
- In FoxPro file is a collection of records and fields.
- Row represent records and column represents field.
 
Record
- Data is stored in one horizontal line of database is called record. In other words record is a collection values in fields of table.

Field
- Field is a basic part of any database column is also called field but in perfect way field is a collection  of data of same type and nature.

Column ( col : ) width 
- The number of digit you specify with field name is called column width.

Extension of FoxPro
- “.txt”  , “.dbf” , “.prg” , “.scr” . “.fox”

Rules to create a new file
1. File name must be start with an alphabets.
2. File name has maximum of eight characters.
3. File name has only alphabets (A to Z , a to z, “   “ under score 0 to 9 digit)
4. In file name there must be no white space.
5. File name must be unique. We can’t type same name as we type earlier.

Rules to create a new field
1. File name must be start with an alphabets.
2. File name has maximum of ten characters.
3. File name has only alphabets (A to Z , a to z, “   “ under score 0 to 9 digit)
4. In file name there must be no white space.
5. File name must be unique. We can’t type same name as we type earlier.

Difference between DBMS and RDMS
DBMS
RDBMS
DBMS stands for Data Management System
RDBMS stands for relation Database Management System
In DBMS we can’t create relation between two tables
RDBMS provide facility to create relation between two tables
DBMS may satisfy less than 7 to 8 rules of E.F Codd
In RDBMS there are multilevel of security.
1)  Logging in at o/s level.
2.) Command level object level.
Each table is given extension of DBMS
Many tables are grouped in one in one database in RDBMS
DBMS use a SQL
RDBMS use a SQL
Examples of DBMS are base, FoxPro, FoxBASE
Example of RDBMS is Oracle, Access, SQL server

·       Commands

1.      Use
It is used for two purposes.
-        It is used for closing the currently open table.
-        It is used for closing the currently open any existing file followed by file name or table name.

2.     Clear
-        Clear command is used to clear output screen and if you want to clear content of the command window then you have to do right click and select clear option.

1.     Performing Calculation using “And” , “Display”
Create Customer
List
List field Depositor, Amount
List field Depositor, Amount
           Amount * rate / 100
Locate for depositor = “Rahul”
Display
Clear
List
Locate for depositor = “Rahul”
Display
Insert
List
Locate for depositor = “Rahul” AND Amount = 300
Display

3.      Time ( )
-        Time ( ) in FoxPro returns the current time of the computer system. This function returns the time as a character string ( hh : mm : ss ) in 24 hour format.
Syntax : Time ( )
Example : 10 : 20 : 01

4.      Date ( )
-        It is used to display the system current date maintained by the operating system.
Syntax : Date ( )
Example :  ?Date ( )
Output :  12/08/2020

5.      Second ( )
-        It is used to display the total numbers of seconds elapsed since midnight.
Syntax : Seconds ( )
Example : ?seconds
Output : 3650.733

6.      Day ( )
-        It is used to return day for from the current date expression.
System : Day
Example : a = Date ( )
                   ? Day
Output : Suppose Date is 12/08/2020

7.      Month ( )
-        Month ( ) is used to return the current months from current date in the given expression.
-        It returns the numeric value of the month.
Syntax : Month ( argument as date )
Example : a = Date ( )
                  ? Month (a)
Output : Suppose Current Date is 10/08/2020 
                  08

8.      CMonth ( )
-        It returns the current month from current date from the specified expression.
-        It always returns character value of the month instead of numeric value.
Syntax : CMonth  ( argument as date )
Example : a = date ( )
                   ? CMonth (a)
Output : Suppose current date is 14/08/2020

9.      Dtoc ( )
-        It is used to convert date to character format. Sometimes we need to print date with a character expression and it is not possible to implement directly using date ( ). Therefore, we need to convert date ( ) to character date ( ).

Note :- When we convert date ( ) to dtoc ( ) then we cannot perform any arithmetic calculation on the existing date of the system.

       Syntax : dtoc ( Date Expression)
       Example : a = date ( )
                   ?dtoc (a)
       Output :  “19/02/2020” ( date is representing into character format )

10.  Ctod
-        It is contrary command for dtoc ( ) where we convert back the character date ( ) to simple date ( ) where we can perform arithmetic operations on the date which was not possible in context to dtoc ( ).
Syntax : ctod ( Date Expression)
Example : a = date ( )
                   ?dtoc (a)
                   ?ctod (a)
Output : “19/05/2020”

11.  Dtow ( )
-        This function returns a number corresponding to the day of the week from a given date expression.

Note :- Visual FoxPro considers Sunday to be the first day of the week by default. While using down ( ) we have to pass the date as an argument to the function.

      Syntax : dtow ( Date Expression)
      Example : a = date ( )
                         ?dtow (a)
                      Suppose current date is 19/01/2020
      Output :  Which is Tuesday

12.  Ctow ( )
-        This function is used to return the character expression corresponding to the day of the week from the specified date expression.

Note :- It will always return the character expression instead of numeric expression where the starting day of week is considered as “Sunday”.

        Syntax : ctow ( Date Expression)
        Example : a = date ( )
                          ?ctow (a)
       Output :  Tuesday

·        Program
-        Set of instructions / set of statements
-        Source code.
-        Object code
-        Function / Method / Subroutine / Module
A = 20
Sum = a + b
Name = “Rahul”
-        Function is a small individual unit a large piece of program which is self sufficient to perform any task.