News:

Support the VirtueMart project and become a member

Main Menu

Feature request: use fewer tables?

Started by norris, February 19, 2015, 03:11:58 AM

Previous topic - Next topic

norris

Thanks for this great product; it works really well for the small environmental & social justice organization for which I volunteer.

One thing to maybe keep in mind if you're doing major rewrites in the future: it'd be great if VM could use fewer tables.  Our hosting plan limits us to 1000 tables, and VM uses about 175 right now, which is a big chunk.  Most of those are due to multilingual translations...every new language adds 7 new tables, one each for categories, manufacturers, products, vendors, etc.  One relatively easy change might be to just use one table for all languages, and have a language code column to differentiate, rather than needing separate tables.

Just an idea...thanks again!

Milbo

If you really think you need more than 110 languages, then just go to another host. You may educate yourself here http://en.wikipedia.org/wiki/Database_normalization
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

norris

Thanks Milbo.  We have other software (forum, wordpress site network, a CRM) also using tables, so we don't have the full 1000 available for Virtuemart.  If that were the case, no problem indeed!  I cleaned up other tables recently so we're OK for a while, but if we install more software and/or add enough new languages to virtuemart and sites to our WP network, we'll be hitting the limit again.  Freeing up the 100+ VM tables devoted to translations would go a long ways towards avoiding that.

As an example of what I had in mind, the Falang multilingual add-on for Joomla! handles unlimited languages in just two tables.  It stores the id and type (menu, module, article, etc) of the base language item, the translation language, and the translated value.

I can understand if you don't want to put effort into redesigning the table structure...probably most people don't encounter limitations around it.  Like I said, just an idea!

Milbo

Yeh, but for any installed language it becomes slower. VM has always the same speed. There are also a lot other specialities, which you are not aware of. For example you could use for 50 products just one langue row. As I said, read the link about database normalisation to understand a bit of the complexity. Additionally it is very uncommon and to use for different software the same database.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/