We're using SQL Server (2005, currently), we're also using Toplink. Toplink does not support IDENTITY COLUMNs. So, the Java team here decided that we are adding a TABLE to hold all "sequences", that is, one row per sequence with a BIGINT s
We're using SQL Server (2005, currently), we're also using Toplink. Toplink does not support IDENTITY COLUMNs. So, the Java team here decided that we are adding a TABLE to hold all "sequences", that is, one row per sequence with a BIGINT stating what we're it's up to.
I have never seen a full user/security implementation in the database. Databases have supported them for years, and does it very well, with logging, fine-grained control, and it is guaranteed to work. The attitude, however, is "User's in the database?" Manager's won't have it. "No way. We'll give an application id and handle it in code." Security in the database? The programmers scoff. "It's so hard to change, the application already checks security, no reason to implement in the database too." How about relational integrity? They "let" DBA's get away with it, but for the most part, noone wants it. "Why restrict the data that can go in, and hurt loads and cause more errors. The application knows what to use." Here i see it yet again with IDENTITY. "Our tool doesn't support it, so we'll implement it ourselves." But in Oracle itself which supports it you'll use it with a TRIGGER? Not if the programmers have their way. "I want to get the id myself and put it in the TABLE. Why fiddle with a RETURNING clause." At least their happy with Toplink on that one.
In general, programmers want complete control with nothing inhibiting them. So why use a database? Because it's a convenient way to store and retrieve data. IOW, it's just a fancy flat file. Leave it to programmers, and they will reimplement databases one java routine at a time.
Put a programmer in the database and he'll use TRIGGERs to implement code, use CURSORs due to not understanding set logic, and not use VIEWs, SYNONYMs, or PROCEDUREs to do any simple INSERTs. IOW, they take the easy route.
UI is usually a mess of code, because usage has to seem simple but is quite complex. They do magic in code that i'm not as good at. But when it comes to databases, why don't programmer's respect database coders and designers? Why won't they accept that we can do databases better than they can and just trust our decisions just like we respect theirs?
It's at times like this that i just give up. I give them whatever they want. I'll suggest that which is good, but i'm not going to fight a losing battle.