Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

question about databases

Quote Reply
question about databases
i'm just wondering a few things about links sql.. what does the re-index thing do?

cause when i use it i just see a bunch of big numbers Smile

also.. this is a technical question.. if you wanted to add a field to the database.. is there an easier way then saving the current database to another one with the new field added.. and then recreating the old table (empty) with the new field and then transfer it back using the sql new old database thingy

jerry
Quote Reply
Re: question about databases In reply to
Jerry,

If you want to program for MySQL, there is a new book out MySQL & mSQL I think by O'reiley. It's really a good explanation of the specifics of the database, with a list of the commands and functions from perl. The benefit of this book is it's specific to these two databases -- no Oracle or M$ products.

If you've read here, I'm sure you've seen the MyPHPAdmin program. You can get it from a link on the PHP3.org site. It's _really_ a very efficient way to access the MySQL database. It beats doing it at the command line, or trying to script it each time.

In LinkSQL, the database keeps it's own index, in an indexed index file. That is what the Links_index (?) file is. When you re-index, the files are all re-synced. If you add a bunch of data into the database without using the "ADD" function, this will make sure they are indexed.

Links actually seems to search on the indexed index, not the indexed database. It allows for the rated 'hits'

Alex is still working on improved algorithms, but thems the basics. There's more disk use, but less search time involved in this.

ALTER is the command you use to change the structure of the database or the type of a field.

If you use the MyPHPAdmin program, all that is hidden, and all you do is 'click'.

Just be careful about using the <BACK> key on the browser.... it causes many of the commands to be re-issued.

Between that program and the Links editor, I haven't had to go to the SQL command prompt yet.

PHP has great _utility_ features for MySQL, what PERL did for Unix.


Quote Reply
Re: question about databases In reply to
Also, you can add fields directly from the Admin menu.

Cheers,

Alex
Quote Reply
Re: question about databases In reply to
I use the ADMIN feature sometimes, and the MyPHPAdmin sometimes.

The advantage of the MyPHPAdmin is that you can quickly get views of all the different tables, and such.

The advantage of the ADMIN is that it automatically updates the *.def files.


Which is something else -- don't forget to add a button to "UPDATE DEF FILE" to re-sync the database with the DEF file. I think that was mentioned before, and while it can be done manually (command line), an option to update the DEF files can't hurt.
Quote Reply
Re: question about databases In reply to
A little trick if you want to view a table is to just type into the SQL monitor:

DESCRIBE tablename

and it will display the layout of a table.

Cheers,

Alex