@blakeyrat said:
Please. I've seen databases designed by "developers who have been there before." They've inevitably shit. Most developers hate SQL, have no clue how relations work, and create shitty database schemas. They treat your expensive high-tech database server as some kind of high-capacity copy of Excel. Not all. But most.
Please. I've seen databases designed by "professional DBAs" that are inevitably shit. Did I tell you about the customer table that had a separate address table, and the address table had a separate "AddressLine" table (to account for PO box, Suite number, or other delivery information because AddressLine1 and AddressLine2 would violate the holiest-of-holy normalization rules) and the address table had the city in a separate "city" table and the states were in another "state" table, so I had to join like five tables just to get the lousy address. This is good design? Throw in some XML, and we have an enterprise system!
Thanks to that structure, if Cincinnati, Iowa and Cincinnati, Ohio ever decide to change their names at the same time to the same new name, it's only one database update! And that's savings you can take to the bank!
Look, I agree a database shouldn't be some stupid data store of opaque varchar blobs. But you have to agree that DBAs can shit out some real crap, too. And my little FAQ example is real crap.
@blakeyrat said:
@JeffS said:I'll give you that a one-to-many relationship between Q and A might be useful instead of a straight one-to-one, but, unless you're TopCod3r, you can't give me reasonable examples for the other possibilities a many-to-many allows.
I gave a couple of them near the top of the post. And like I said there, the only combination that doesn't make sense is having an answer with zero questions-- of course if they coded the database correctly, there's a Constraint installed to prevent that.
Why would I want a single answer shared among multiple questions? (Oooooo, I know... like an answer "No" so if we ever want to change all our "No"s to "Yes"s, it's just one database update!)
I'm starting to think the WTF is you. Anybody who designs a space shuttle when requirements call for a paper airplane...
What's that old CS quotation about premature optimization?