Hello All,

I need a bit of advice regarding my final year project. I dont want any help with code but just on what path I should take. My project based on using triggers to solve business problems. I am not sure, on how I should approach this really. if I had a busines problem, it would have made it easier. But, I have not got a business problem. It just make its really complicated. Can you guys give me some advice, on how I should approach it?

Thanks for all your help

Recommended Answers

All 2 Replies

Well, one thing I inexplicably see an awful lot of in business database applications is change-logging; that is, for any change to the database, extra code is built to make sure those changes (and who's responsible) are stored somewhere. It's one of the things that triggers are perfect for, but they just don't get used very often. I'm not sure if that gives you any ideas, but it might be a start.

I recently learned about Triggers myself.

The one use I had for them, was I had a table with a collection of values, when I inserted the record (or updated it), I had a trigger fire that would take the values, ran a mathimatical equation using them and produce a value it would write in a new column. I did this to reduce the amount of code clutter I had in my C# program (that wrote the data to the table), and kept it consistent. The algroithm computed an average of 3 columns actually. It's nice because I know that even if I manually enter the SQL table outside of my program, that average value with stay consistent.

Also another example is at my job we have a database that is structured around 30 or so tables. One table is kind of the root of them all, an Environment table. If you were to delete and environment, there is a Cascade type event on all the other tables that will remove any records related to the one environemnt. It's a nice way of cleaning up data no longer needed or accidently created.

So there are two examples, computing an average, and preventing stray data

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.