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

How Should I Handle 2 Databases?

Quote Reply
How Should I Handle 2 Databases?
I will be running two databases on my site in the near future. They will be completely different, with different locations on the server and different fields. What will I have to do to accomplish this? Will one, hacked license work, or am I better off with two copies of Links running?

Thanks!

Quote Reply
Re: How Should I Handle 2 Databases? In reply to
Two suggestions:

1) Use another databas with separate tables for the second database.
2) Use copies of LINKS SQL scripts for the second database.

A lot of hacking is involved to make the scripts work with multiple databases with only one copy of the scripts.

Regards,

Eliot

Quote Reply
Re: How Should I Handle 2 Databases? In reply to
Go ask Alex... <G>

To paraphrase a popular sub-culture song.

Anyway, because so many things are hard-coded in the logic to use one default Links.pm file, one Links.Links table, one Links.Category table, etc, the effort required to run two different databases is quite large. Somewhere around January (+/- 2 months) I posted several articles musing about this. I've posted a few since then addressing specific issues in database normalization and keys that _could_ be addressed in a future release to allow multiple "databases" or sets of tables to run so that each sub-tree, category, etc could have it's own "look" and it's own "links" table with it's own field definitions -- such as for classifieds, shopping, links, etc.

Since I'm not trying (aiding or abetting) anyone in breaking the license, and there has been no official word from alex on this issue, I've not taken it any further. But, if you are interested in running two separate "links" tables (essentially databases) from the same script, the key is page.cgi and the use of the dynamic parameter (and others), and using full table names -- as above: Links.Links, Links2.Links, etc.

Please don't ask for any more, either here or privately. You are on your own with this one until GT clarifies the issues.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/