Building database base tables from large input file 
Author Message
 Building database base tables from large input file

I'm building five base tables for a database using an
input file (in ASCII format). If broken into fields, the
input file would exceed 255 fields.

Is there any mechanism that allows the programmer to have
VFP6 build base tables with a common key?

The method I'm using seems clunky. I'm setting-up a series
of template tables, each with the fields I want plus
filler fields to hold the data I want in other tables,
then copying these into corresponding tables without the
filler fields.

I appreciate any help.

CM



Sat, 03 Sep 2005 08:46:58 GMT  
 Building database base tables from large input file
The first step in creating a relational database management system is to
normalize the tables. Rule number 1: no repeating fields.
A table with > 255 columns is obviously not normalized.

That siad, you can split the rows in the text table if you copy the hold
shebang to a Memo and scan the memo
CREATE CURSOR cursor1 (100 fields )
APPEND FROM textfile.txt TYPE DELIMITED ;
    [WITH <char field delimiter>] [WITH CHARACTER <column separarator> ]
There are the first 100 fields, Now for the rest.
CREATE CURSOR x (temp M)
APPEND BLANK
APPEND MEMO Temp FROM textfile.txt
SET MEMOWIDTH TO 10000
FOR i = 1 TO MEMLINES(temp)
use functions like MLINE(), _MLINE, GETWORDNUM() , SUBSTR(), AT() to grab
data from fields 101 and up.
INSERT INTO Cursor2 VALUES (... )
Sticking them into an array lets' insert them more simply
INSERT INTO Cursor2 FROM ARRAY zz
NEXT

-Anders


Quote:
> I'm building five base tables for a database using an
> input file (in ASCII format). If broken into fields, the
> input file would exceed 255 fields.

> Is there any mechanism that allows the programmer to have
> VFP6 build base tables with a common key?

> The method I'm using seems clunky. I'm setting-up a series
> of template tables, each with the fields I want plus
> filler fields to hold the data I want in other tables,
> then copying these into corresponding tables without the
> filler fields.

> I appreciate any help.

> CM



Sat, 03 Sep 2005 18:59:04 GMT  
 Building database base tables from large input file
Hi CM:

As Anders says, the first step is data normalization.  Along those lines,
here is a great web site that offers illustrations on how to perform the
data normalization process:

http://www.datamodel.org/NormalizationRules.html

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

The first step in creating a relational database management system is to
normalize the tables. Rule number 1: no repeating fields.
A table with > 255 columns is obviously not normalized.

That siad, you can split the rows in the text table if you copy the hold
shebang to a Memo and scan the memo
CREATE CURSOR cursor1 (100 fields )
APPEND FROM textfile.txt TYPE DELIMITED ;
    [WITH <char field delimiter>] [WITH CHARACTER <column separarator> ]
There are the first 100 fields, Now for the rest.
CREATE CURSOR x (temp M)
APPEND BLANK
APPEND MEMO Temp FROM textfile.txt
SET MEMOWIDTH TO 10000
FOR i = 1 TO MEMLINES(temp)
use functions like MLINE(), _MLINE, GETWORDNUM() , SUBSTR(), AT() to grab
data from fields 101 and up.
INSERT INTO Cursor2 VALUES (... )
Sticking them into an array lets' insert them more simply
INSERT INTO Cursor2 FROM ARRAY zz
NEXT

-Anders


Quote:
> I'm building five base tables for a database using an
> input file (in ASCII format). If broken into fields, the
> input file would exceed 255 fields.

> Is there any mechanism that allows the programmer to have
> VFP6 build base tables with a common key?

> The method I'm using seems clunky. I'm setting-up a series
> of template tables, each with the fields I want plus
> filler fields to hold the data I want in other tables,
> then copying these into corresponding tables without the
> filler fields.

> I appreciate any help.

> CM



Tue, 13 Sep 2005 02:23:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing to Host-Based Database to File-Server Database

2. Large .exe file after building (Help)

3. vfp6.0 build exe file large?

4. large flat-file database

5. Corrupted DBF files when indexing Large tables

6. Large Data Bases and Access

7. How Large can a Data Base be?

8. Large application EXE built by VFP 6.0

9. How to: Create new database files (tables) in VFP 3.0

10. Regenerating a .CDX file for table within a database

11. How large can a FoxPro database be? (realistically)

12. How large can a FoxPro database be? (realistic

 

 
Powered by phpBB® Forum Software