Menu

Database summary -> text file?

Robert
2004-12-12
2013-01-28
  • Robert

    Robert - 2004-12-12

    I just installed wikindx2 and think its brilliant.  Must comment on an installation oddity which I encountered.

    I installed it on a commercial hosting service on which I have a database chared with other applications.  I configured config.php, ftp'ed the files up, and navigated to the front page to complete installation.  At this time I encountered a (fatal) problem which I guess might be related to permissions or the hosting service's db limits but couldn't be bothered to actually figure out: only some of the tables ended up getting configured.

    To make a long story short: I ended up manually (well, using PHPmyAdmin web interface) uploading the createMySQL.txt into the database.  So now everything worked... almost.

    Next problem was that any resources I inserted could not be listed: "No resources found in database" or something like that, despite the fact that I could interrogate and view resources through PHPMyAdmin.

    A Help forum thread indicated that a "database summary" was to be found in table WKX_database_summary, and I discovered that this table had no entries.  I entered one record into the table, reflecting how many resources I had inserted, and viola! everything worked.

    The result is, partly, that I am curious why that table was not initialised with file createMySQL.txt.  For the other part, however, I would like to suggest that a text file might be more appropriate for this kind of information - since there is only ever one record in this table!

    Further, for those of us whose webhosts limit how many tables are allowed in our database, 37 tables is an awful lot!  I'm wondering if there might be some rationalisation of tables; for example, paraphrase and quote seem like rather similar tables to me.  I may indeed try some measure of trimming myself.  Would there be wider interest in this?

    R.

     
    • Mark Grimshaw

      Mark Grimshaw - 2004-12-13

      Hi,

      Thanks for the complimentary comments.

      I also had that problem once with half-created tables on a commercial ISP.  Now that someone else has had it it may be worthwhile at the very least writing some sort of system sanity check at start up that  checks all tables are present and correct and, if not, at least gives some idea how to fix it (probably start again from scratch).

      I'm aware that commercial servers place limits on the number of databases available (hence the particular naming of the WIKINDX tables) but this is the first I've heard of limits on no. of tables.  There are a variety of reasons why there are so many tables - optimization of table sizes with appropriate data sizes, ability to use relational structure of databases, ability to use built-in functions of databases, easy for WIKINDX to upgrade the underlying structure of the databases automatically at each update.  I don't want to go down the route of reducing the number of databases but I'm happy for others to try - hopefully joining as developers since such efforts will no doubt force some much needed (in places) code clean-up to deal with the two possible options.

      The reason WKX_database_summary is not initialized in createMySQL.txt is that there is a fair bit of system checking (not enough obviously - see above) each time WIKINDX is run (see wikindx2/core/systemcheck/SYSTEMCHECK.php and wikindx2/core/init/INIT.php).  One thing that is checked is the database version number in WKX_database_summary - differences between this and a newer number in INIT.php will trigger a database upgrade from updateMySQL.txt.  Not a very good reason I agree but if you want a better one then - "it's for historical reasons".

       
    • Mark Grimshaw

      Mark Grimshaw - 2004-12-14

      v2.3 (coded but not yet released) now populates WKX_group and WKX_database_summary from createMySQL.txt rather than from within the PHP scripts.  I'm hoping this will get rid of similar problems.

      As a matter of interest, how many tables does your ISP limit you to?

       

Log in to post a comment.

MongoDB Logo MongoDB