prefix table in database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

prefix table in database

Dhr. R.R. Gerbrands
Hi All,

As newbe user of vtigercrm and starting programmer, I have been reading the
forums and mailingslist archive. As vtigercrm grows, we all would like to
see an easier structure to maintain, for example of the db.
I have implemented vtigercrm on my isp with ssl for my own business ( I run
a smal firm for system administrator ) and have done also on a Novell SBS
for several of my clients.

Looking at the tablestructure of vtigercrm we have 192 tables total!
I wonder if prefix tables could be meaningfull, thinking of several
possibilities:
- If someone wants or must use only one database with several applications,
say joomla cms and vtigercrm at an isp.
- more seperation of db: on a 'per module' bases
- another seperation of db: add-on/plugins with there own prefix
- better version control of db, different prefix per version.

>From above I suggest:
.vti_ as default
.vti_a_ for addon
.vti_p_ for plugin
.vti_{modulename}_ for module

or with version control:
.vti_424_
.vti_424_a
.vti_424_p
.vti_424_{modulename}_


It would also eas the use of future migration scripts as migration could be
done in several layers.

Best Regards,

Remco Gerbrands


_______________________________________________
This vtiger.com email is sponsored by Zoho Planner. Still scribbling down your To-Do's on bits of paper & palms of your hands? Try the AJAX enabled, personal organizer online, Zoho Planner for FREE instead! http://zohoplanner.com/?vt 
Reply | Threaded
Open this post in threaded view
|

Re: prefix table in database

Mike Fedyk
A lot of those tables store many-many relationships between various
modules.  Which module owns a table when it references to more than one
module?  I've thought about this before but that really killed the idea
for me.  If a solution or policy can be made that solves it, then it
looks much more interesting.

Also I absolutely do not like storing version numbers in table or db
names.  The migration from 4.2.[0123] should be able to be done by
testing for some unique structure that is not in that version and
changing it to the current version.  Also adodb's data dictionary
functions may be able to do this for us.  I just want to make sure it
does it in a lossless fashion.

Mike

Dhr. R.R. Gerbrands wrote:

> Hi All,
>
> As newbe user of vtigercrm and starting programmer, I have been reading the
> forums and mailingslist archive. As vtigercrm grows, we all would like to
> see an easier structure to maintain, for example of the db.
> I have implemented vtigercrm on my isp with ssl for my own business ( I run
> a smal firm for system administrator ) and have done also on a Novell SBS
> for several of my clients.
>
> Looking at the tablestructure of vtigercrm we have 192 tables total!
> I wonder if prefix tables could be meaningfull, thinking of several
> possibilities:
> - If someone wants or must use only one database with several applications,
> say joomla cms and vtigercrm at an isp.
> - more seperation of db: on a 'per module' bases
> - another seperation of db: add-on/plugins with there own prefix
> - better version control of db, different prefix per version.
>
> >From above I suggest:
> .vti_ as default
> .vti_a_ for addon
> .vti_p_ for plugin
> .vti_{modulename}_ for module
>
> or with version control:
> .vti_424_
> .vti_424_a
> .vti_424_p
> .vti_424_{modulename}_
>
>
> It would also eas the use of future migration scripts as migration could be
> done in several layers.
>
> Best Regards,
>
> Remco Gerbrands
>
>
> _______________________________________________
> This vtiger.com email is sponsored by Zoho Planner. Still scribbling down your To-Do's on bits of paper & palms of your hands? Try the AJAX enabled, personal organizer online, Zoho Planner for FREE instead! http://zohoplanner.com/?vt 
>
>  
_______________________________________________
This vtiger.com email is sponsored by Zoho Planner. Still scribbling down your To-Do's on bits of paper & palms of your hands? Try the AJAX enabled, personal organizer online, Zoho Planner for FREE instead! http://zohoplanner.com/?vt 
Reply | Threaded
Open this post in threaded view
|

Re: prefix table in database

Dhr. R.R. Gerbrands
Hi Mike,

I'll agree with your arguments against version control, I've got no idea if
adodb helps us with this.
So let's forget that one, for prefix tables.

Let me then suggest this for references: comparing module map/directory
naming and table naming.
Looking at the modules and the current names for tables, then I see in the
map module for example 'accounts' Looking at the tables I find 9 tables
starting with account, I presumed they are related to the module 'accounts'?

It's more or less the same for these module_map names:
accounts
activity
contact
customview
email (i would include tables starting with mail also)
notes
products
quotes
reports
rss
users

Can this be used as references?

Or use all tables originating from the module, for example from squirrelmail
in one prefix table name.


> .vti_ as default
> .vti_a_ for addon
> .vti_p_ for plugin
> .vti_{modulename}_ for module

Best regards,

Remco Gerbrands



-----Oorspronkelijk bericht-----
Van: [hidden email]
[mailto:[hidden email]]Namens Mike
Fedyk
Verzonden: woensdag 22 maart 2006 9:02
Aan: [hidden email]
Onderwerp: Re: [Vtigercrm-developers] prefix table in database


A lot of those tables store many-many relationships between various
modules.  Which module owns a table when it references to more than one
module?  I've thought about this before but that really killed the idea
for me.  If a solution or policy can be made that solves it, then it
looks much more interesting.

Also I absolutely do not like storing version numbers in table or db
names.  The migration from 4.2.[0123] should be able to be done by
testing for some unique structure that is not in that version and
changing it to the current version.  Also adodb's data dictionary
functions may be able to do this for us.  I just want to make sure it
does it in a lossless fashion.

Mike

_______________________________________________
This vtiger.com email is sponsored by Zoho Planner. Still scribbling down your To-Do's on bits of paper & palms of your hands? Try the AJAX enabled, personal organizer online, Zoho Planner for FREE instead! http://zohoplanner.com/?vt