Conversation started Mar 11, 2014 at 18:31.
user55340
Mar 11, 2014 18:31
If you were doing it inhouse, maybe not. But if it was a "here's a solution to install" that requires that you enter the schema owner / user for a schema that was created for this user, I'd be wary.
psr
psr
@MichaelT As you should. It might also have to be "this needs its own database server to run because your crazy to put other stuff on the same machine". The problem is that when it comes to user defined fields in a database all your options are bad, so you still might consider it for some use cases.
Amen on "all your options are bad"...
user55340
@psr Yep. They are all bad. The best approach then is likely to chose the most mainstream one that is well understood in hopes that the next person to touch the software will also understand it and be able to use and extend it with the minimal amount of additional work.
psr
psr
@MichaelT You would say EAV is most mainstream?
user55340
I've seen it in a number of applications that I've installed where its customizable (user defined fields).
Mar 11, 2014 18:40
how do DBAs in larger orgs prefer to have their databases created? would the developer/vendor hand them an SQL script every time, or would they allow a compiled program to create the tables?
psr
psr
I would guess EAV is most mainstream, but it's hard to know.
from all the searching i've done, EAV is the only way people do custom fields
well, i guess some may use blobs or json, but EAV is much more popular (for obvious reasons)
user55340
@Phil I've seen both. Having the install application do it has the nice bit that it can detect what the version of the database is and do the upgrade appropriately.
so if my installer knows what custom fields to create, i can do all that upfront and not worry about schema permissions
user55340
The installer would have access to create/alter tables in the schema, but the webapp wouldn't run as that user.
Mar 11, 2014 18:44
right. but if the table is already created with all the custom fields it needs, it would only need to do standard select/insert/update/deletes
user55340
It could (for example) look to see what tables exist and say "none? create everything from scratch". Or "there's a version table? select version from current_version - ahh, this is 2.1. To do a 2.1 to 2.5 upgrade I need to do this..."
sounds like a rake task to me!
user55340
@Ampt Yep.
psr
psr
@Phil If you need custom fields but know them at install time then that would work.
migrations woooooooooooo
user55340
Mar 11, 2014 18:47
Typically, they would leave the rows of the EAV table untouched, though they might add columns to the tables if necessary to add new functionallity.
 
Conversation ended Mar 11, 2014 at 18:47.