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
Mar 11, 2014 18:43
so if my installer knows what custom fields to create, i can do all that upfront and not worry about schema permissions
Mar 11, 2014 18:42
well, i guess some may use blobs or json, but EAV is much more popular (for obvious reasons)
Mar 11, 2014 18:41
from all the searching i've done, EAV is the only way people do custom 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?
Mar 11, 2014 18:34
Amen on "all your options are bad"...
Mar 11, 2014 18:21
@psr I smell what you're steppin in. I'll consider that, thanks.
Mar 11, 2014 17:40
word. i'd still like to try my idea, though on a personal project or something. definitely not ready for DBAs in enterprises
Mar 11, 2014 17:36
@MichaelT thanks for letting me pick your brain a bit.
Mar 11, 2014 17:35
it's good to see a real-world example. still looks hairy, but i don't think i have much of a choice.
Mar 11, 2014 17:32
oy
Mar 11, 2014 17:32
yeah
Mar 11, 2014 17:31
but it sounds like the safest option
Mar 11, 2014 17:31
true. the EAV still doesn't sound like a great option... i may have a lot of custom attributes for a lot of things...
Mar 11, 2014 17:29
i wonder if it would be reasonable for an admin to create the database with software i give them, and then the actual web application wouldn't touch the schema after that
Mar 11, 2014 17:28
the clients i'm targeting will probably be in a bigger, more formal IT environment than i currently am
Mar 11, 2014 17:27
hm. that actually sounds like the biggest problem so far
Mar 11, 2014 17:26
interesting
Mar 11, 2014 17:25
so i'd have an ICreateTableCommand interface or something like that, and then the MSSQLCreateTableCommand and PostgresCreateTableCommand, etc.
Mar 11, 2014 17:24
i was also thinking that since i've abandoned the ORM, it might be relatively easy for me to create the necessary DDL for the different vendors and just use abstraction there
Mar 11, 2014 17:22
that's nice. i imagine it would be hard to query by json objects though
Mar 11, 2014 17:21
and that problem really isn't avoided by the EAV model either
Mar 11, 2014 17:21
i'll probably also have the type information in the config file, so while it's not type-safe, i can still work with it
Mar 11, 2014 17:21
however usually object.ToString() is sufficient
Mar 11, 2014 17:20
correct. another downside.
Mar 11, 2014 17:20
or i can get the column names from the config file
Mar 11, 2014 17:20
select * is an option
Mar 11, 2014 17:20
so i'd have a public IDictionary<string, object> GetAttributes() or something of the like
Mar 11, 2014 17:19
and i can manually control how the results of a query are materialized into model objects
Mar 11, 2014 17:19
which allows me to write my raw SQL
Mar 11, 2014 17:18
in particular i'm using dapper
Mar 11, 2014 17:18
ah. yeah one thing you correctly assume in your answer is that i've more-or-less abandoned the ORM
Mar 11, 2014 17:17
just one line in the attribute table maps directly to one thing in the thing table, and a simple join would give us all the custom info we need about that thing
Mar 11, 2014 17:16
the extra columns would just be extra information about the thing. there wouldn't be any foreign keys or constraints or anything
Mar 11, 2014 17:15
however i was also thinking that the extra columns could be set up in a configuration file by a power user, and we can remove much of that meta programming by referring to the config file
Mar 11, 2014 17:14
i don't question that part
Mar 11, 2014 17:14
right, yeah that's definitely a downside
Mar 11, 2014 17:14
ah yeah, sorry. i'm in IRC mode, not stackexchange mode
Mar 11, 2014 17:12
If your database is designed like this, where your attribute table only has one single column, i don't see upgrades being a problem simply because you'd never upgrade that table. Would you say that's a naive assumption on my part?
Mar 11, 2014 17:11
I see how a lot of your downsides are pretty big, though I wonder about a couple of them. For example, the clean upgrades bit and the users adding a column name that's a reserved word.
Mar 11, 2014 17:09
@MichaelT I have a question for your answer here: programmers.stackexchange.com/a/231943/7935
 

 Root Access

For all you Super Users out there. You have backups, right?
Mar 3, 2014 21:41
SL is dying unfortunately
Mar 3, 2014 21:40
yeah, i'm starting to come to the same conclusion
Mar 3, 2014 21:39
well if you trust what they say at justbeamit, it passes through their service but they don't "record" the file you're sending. still wouldn't trust it with anything private though
Mar 3, 2014 21:38
anyway... so no suggestions on a user-friendly FTP-ish upload button that runs on my own server?
Mar 3, 2014 21:37
eh, it's a step in the right direction
Mar 3, 2014 21:36
it's a pretty neat site if you know your friend is ready to download the file now
Mar 3, 2014 21:36
Mar 3, 2014 21:35
but if you have a 10 GB file you want to send, you gotta have your own always-on physically accessible server
Mar 3, 2014 21:34
at that point, it's no different than hosting your file on dropbox and posting a link to it in a standard email