Discussion:
What kind of structure should i use to read a freedb txt file with pascal?
(too old to reply)
m***@yahoo.com
2004-12-07 21:23:07 UTC
Permalink
Hello, here is the problem:

I have to develop a DOS program in PASCAL with FREEPASCAL that reads a
small txt freedb (musics data) database (47 MB) by loading it all to
the memory. It is a final work of a course i am attending in college
called "Data Structure and Algorithms" ("Estrutura de Dados e
Algoritmos" in portuguese).

We've learned some kinds of structure like: Lists,Trees and Graphs
using variable pointers in PASCAL.

So, i HAVE to load the entire txt file to the memory using some type of
structure designed in pascal. What would be best to use? When
searching, for each key pressed by the user, the program should show a
list of 20 itens per page whith only music records starting with the
typed characters. The user may search by title, album or singer.

Could you tell me what would be the fastest structure and a quick pick
on how to implement it?
thank you all for the help.
Marcel.
Gene Wirchenko
2004-12-08 01:13:53 UTC
Permalink
Post by m***@yahoo.com
I have to develop a DOS program in PASCAL with FREEPASCAL that reads a
small txt freedb (musics data) database (47 MB) by loading it all to
the memory. It is a final work of a course i am attending in college
called "Data Structure and Algorithms" ("Estrutura de Dados e
Algoritmos" in portuguese).
We've learned some kinds of structure like: Lists,Trees and Graphs
using variable pointers in PASCAL.
So, i HAVE to load the entire txt file to the memory using some type of
structure designed in pascal. What would be best to use? When
searching, for each key pressed by the user, the program should show a
list of 20 itens per page whith only music records starting with the
typed characters. The user may search by title, album or singer.
Could you tell me what would be the fastest structure and a quick pick
on how to implement it?
thank you all for the help.
Do your own homework. I do not mind assisting someone with a
homework problem, but I am not going to do someone else's homework.

You will get a far better response if you post what you have
worked out so far and ask for comments.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
m***@yahoo.com
2004-12-08 22:56:21 UTC
Permalink
Any helpful comment about my problem?
thank you.
CBFalconer
2004-12-09 02:23:51 UTC
Permalink
Post by m***@yahoo.com
Any helpful comment about my problem?
Your problem appears to be inability to write a meaningful
article. You might consider stating what your problem actually is.
--
Chuck F (***@yahoo.com) (***@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Gerry Quinn
2004-12-09 11:52:46 UTC
Permalink
Post by m***@yahoo.com
I have to develop a DOS program in PASCAL with FREEPASCAL that reads a
small txt freedb (musics data) database (47 MB) by loading it all to
the memory. It is a final work of a course i am attending in college
called "Data Structure and Algorithms" ("Estrutura de Dados e
Algoritmos" in portuguese).
We've learned some kinds of structure like: Lists,Trees and Graphs
using variable pointers in PASCAL.
So, i HAVE to load the entire txt file to the memory using some type of
structure designed in pascal. What would be best to use? When
searching, for each key pressed by the user, the program should show a
list of 20 itens per page whith only music records starting with the
typed characters. The user may search by title, album or singer.
Could you tell me what would be the fastest structure and a quick pick
on how to implement it?
thank you all for the help.
I don't know why people are jumping down your throat so much, you are
not requesting people to do it for you!

I would comment that the problem as described is rather poorly set, and
does not give enough information as to what structure is ideal. Can the
user add new entries to the database? How many searches will he carry
out after loading it - just one, or hundreds?

Choose reasonable answers to the above questions (unless they are given
and you just didn't post them). Then the ideal structure(s) are likely
to suggest themselves, when you think about what is required to achieve
good results.

- Gerry Quinn
Gene Wirchenko
2004-12-09 16:45:34 UTC
Permalink
[snip]
Post by Gerry Quinn
Post by m***@yahoo.com
Could you tell me what would be the fastest structure and a quick pick
on how to implement it?
thank you all for the help.
I don't know why people are jumping down your throat so much, you are
not requesting people to do it for you!
He is asking us to do his analysis for him.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
Matthew Hanna
2004-12-13 20:42:30 UTC
Permalink
Post by m***@yahoo.com
I have to develop a DOS program in PASCAL with FREEPASCAL that reads a
small txt freedb (musics data) database (47 MB) by loading it all to
the memory. It is a final work of a course i am attending in college
called "Data Structure and Algorithms" ("Estrutura de Dados e
Algoritmos" in portuguese).
We've learned some kinds of structure like: Lists,Trees and Graphs
using variable pointers in PASCAL.
So, i HAVE to load the entire txt file to the memory using some type of
structure designed in pascal. What would be best to use? When
searching, for each key pressed by the user, the program should show a
list of 20 itens per page whith only music records starting with the
typed characters. The user may search by title, album or singer.
Could you tell me what would be the fastest structure and a quick pick
on how to implement it?
thank you all for the help.
Marcel.
Hash table. Really big hash table. Oh! I know! A binary tree. No!
Wait! B-Tree! No! Better still! B+Tree! That'll do it! Oh, there
are so many ways! Where to begin? How would you do it by hand? That
might be a good place to start.

Loading...