In a text-mode form I have 4 lines of 78 chars. The lines are indipendent (created by 4 @ GET commands) but they contain one long text. It happens that when the user need to add a word in the first line and the text doesn't fit, it is truncated and must be repeated at the start of the next line...
Porting this form to GUI I wondering which is the best way, since I also have to limit the char number (and i think I can do it) and the space on the printed form (and this is more difficult....)
I also created 4 fields in the database, char 78, TEXT1, TEXT2, TEXT3, TEXT4 = 312 bytes. This is lower than the standard 512 bytes of DBT file... about 70000 records * (512-312) = 14 MB saved...
Since a lot of these lines are empty I was thinking about normalizing the DB, creating a new dbf with fields:
DOCURECORD N 7
LINENUMB N 1
TEXT C 78
Index on docurecord, linenumb
Saving and retrieving the lines is done on the DBF, and only for not empty fields...
are there other possible solutions I can't foresse now ?
some issues about storing variable lenght fields...
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: some issues about storing variable lenght fields...
I think this is rightly optimized.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: some issues about storing variable lenght fields...
Hi Francesco
Does your method ( relating a second table ) is about first normalization ?
Regards
--
Esgici
Did you tried DBFFPT RDD ?mrduck wrote:This is lower than the standard 512 bytes of DBT file... about 70000 records * (512-312) = 14 MB saved...
...are there other possible solution?
Does your method ( relating a second table ) is about first normalization ?
Regards
--
Esgici
Viva INTERNATIONAL HMG
Re: some issues about storing variable lenght fields...
No, I didn't. I'm still using plain DBFNTX...esgici wrote:Hi Francesco
Did you tried DBFFPT RDD ?mrduck wrote:This is lower than the standard 512 bytes of DBT file... about 70000 records * (512-312) = 14 MB saved...
...are there other possible solution?
yes and no: "yes" since I'm applying that kind of normalizazion, "no" because the fields are not used in searches.. .actually I have a relation 1:m where m < 5 and I seem to remember that normalization can't be limited in this way... but ok, faded memory...Does your method ( relating a second table ) is about first normalization ?
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: some issues about storing variable lenght fields...
Thanks to clarification
Regards
--
Esgici
Regards
--
Esgici
Viva INTERNATIONAL HMG