From: junkmail <jun...@2z...> - 2010-04-21 16:04:23
|
Thanks for all the great thoughts! If anyone has ANYTHING else on this subject, I would greatly appreciate the info. Alec, that schema design is very interesting. I've seen similar write-only setups for extremely high performance systems. It sounds like the type and sub-type may be more specific to your application domain, but I see the utility of it. The main concept I see here is using a giant table with another table to describe the custom fields. You'll never have to modify the database schema directly, but you can change the meaning of the fields on the fly and there's very little overhead to have a bunch of extra columns, correct? The entire reason for using a data model is to answer the question "What if I want to use something else for my data storage". My hope is that one day to move towards a system similar to what Alec explained because it handles many problems fairly elegantly such as auditing, performance and a flexible schema. For now I am stuck with relational databases and an existing schema of a proprietary system. I am creating a web interface that extends the functionality. Lubinski, you're describing something extremely close to what I've currently put together. As for the second system, it sounds more like you're describing an EAV system - AKA tagging with arbitrary data types. That's a very effective approach, but I'm not sure how to handle any kind of fast searchability of a system like that. I've created programs that use that for just text field entries, but I haven't taken it any further because of the search issue. Thanks for the suggestions on the ORM's Jason, I'll definitely be digging into them to see what's good and bad. I modeled a lot of my current interfaces from CakePHP, but they don't seem to be very progressive in the database area. Torpor seems like it will be able to fill in those gaps. |