Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?

Comment "Flexible" database keys (Score 1) 356

What I've been planning to look into as a project is the following problem:

I have several instances of a platform, each with several customers. I'd like to be able to move customers around, but this would cause all kinds of problems with primary keys and foreign key relations in our database. To make matters worse, the database doesn't contain actual foreign keys all the foreign key relationships that are used and it contains a few text-fields which would require search-and-replace on some of the foreign keys.

I know of no standard solution to fix this, but it should be possible to do. It should be possible to make a tool, feed it with a configuration file that maps out all the relationships (ideally this could be generated from the database meta-data itself) and search&replace actions. Supply it with a list of "start" keys (in my example, this would be a customerid) from which it would scan all linked records. Have it export a file format which can be imported using the tool on a different database, generating new keys and properly setting foreign keys to the new keys. For bonus points, have it de-duplicate records as specified in that configuration file.

Such a tool would probably be very interresting to a lot of people.

Benefits of the project is that (AFAIK) it's not been done before, it's quite technical in nature (no need to understand non-IT stuff) and would produce code that would be useful after it is no longer a school project. Down side is that it's going to take quite some effort to make it truely effective. Also, as of now, you can't patent it ;)

Comment Re:Showoff Gets Off Easy (Score 1) 122

He's not exposing some inherent weakness in the system

Yes he is; it's users.
It's not hacking in the modern, limited sense, it's hacking in the traditional sense.
There aren't some hacking rules that say "you can't use a password if somebody gives it to you".
If the users can't be trusted with passwords (why were they sharing a password with a collegue in the first place?), provide some other (combination of) methods of identification.

Comment Re:Batch (Score 1) 318

JCL is rather verbose and very easy to get wrong though; it's rather unforgiving.
There's good reason for this, but it ensures that few people can create working JCL from scratch.

Writing a bash script usually involves knowing how to use the features of the programs you want to access. Writing a similar script in JCL typically requires knowing most of the features you're not using as well.

Comment Re:Batch (Score 1) 318

Anything that can be handled with sed and awk would typically be handled in JCL without touching any compiled code. Stuff like DFSORT/ICETOOL are remarkable flexible, have literally decades of continued improvement behind them and can do pretty much any file operation except business logic. One of the nice things about a mainframe is that pretty much every third party application can be controlled through JCL. A bit like bash scripting, but with more control. JCL itself is a bit complex though.

Comment Re:Batch (Score 1) 318

Please explain. I'm under the impression that IBM sells a C/C++ compiler. And even failing that, doesn't gcc work?

Yes, IBM provides their own C/C++ compilers, there are a few third party commercial C compilers available (don't know about C++) and GCC works too (for instance, but google has more).

Comment Re:Batch (Score 2) 318

Indeed. And I have yet to see any programming language (excluding assembly) that can do all the things you can do in machine code. And yes, this includes C.

Why would it be so strange that not all languages cover the same abilities on machine code level?

Comment Re:Batch (Score 4, Informative) 318

Yes, I'm sure it's much easier to code in RPG. In Java/C++/PHP/C# you could probably do it in less than a dozen lines of code as well. But none of those come close to the performance of COBOL for these specific tasks.

As far as right-aligning a string; it's supported in the data division: I'm sure if I had to program RPG without any training or a manual, I wouldn't produce very good code either.

COBOL is bad at a lot of things and in a lot of ways, but it does have a few redeeming qualities. It just turns out those particular qualities are highly sought after in many large companies.

Slashdot Top Deals

Every nonzero finite dimensional inner product space has an orthonormal basis. It makes sense, when you don't think about it.