N00b wanna learn more about database programming

Discussion in 'Programming & Software Development' started by xhanatos, Jul 9, 2007.

  1. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    No, why would SQL be easier to tune just because it's not inside a SP... If your running long queries its just gonna be harder, most likely a log file would truncate the query. Neither a log file or SP is going to tell you the cause of the problem. Just that is a problem with that paticular query or SP.


    Edit: Sorry i meant to type Postgres :(
     
    Last edited: Jul 13, 2007
  2. xsive

    xsive Member

    Joined:
    Jun 29, 2001
    Messages:
    4,343
    Oracle has a pretty good development environment for stored procedures these days in the form of SQLDeveloper. Yes, it's not as super-awesome as a fully-featured IDE but mangling an entire architecture just to fit your preferred working style isn't any kind of solution.

    Again, no kind of solution. Individual queries aren't always the problem; far more often it's the manner in which they're chained. Put the workflow where it belongs and you can maintain it in that environment. Why ask the DBA to piece together your workflow by sifting needlessly though logs?
    Better yet, why hide the contract between the database and its clients inside the code of your middleware? Why not make the contract explicit and provide the system with the flexibility to swap components or stores without refactoring? Systems need to be more dynamic and reconfigurable not less; Your proposed solution using classes leads to brittleness and is symptomatic of poor design.
     
  3. Ze.

    Ze. Member

    Joined:
    Sep 13, 2003
    Messages:
    7,871
    Location:
    Newcastle, NSW
    Actually that's not why they were originally created.

    They were created to do complex operations that couldn't easily be done in a single query or update.

    They make sense for that whether it's an administration or interface task.
    How is it any less messy than requiring someone to go through all the code that uses that particular DB and check it for conflicts?

    The fact of the matter is that if your DB is getting messy than your organisation needs better development processes along with better documentation.
    Actually triggers are great for reducing complexity when used appropiately.

    They are great for things like logging and when events that cross over multiple application areas need to be done (such as stock reordering etc).
    Whilst one may be able to do that , one will end up with a far worse application that has performance problems compared to a well integrated team that knows how to program and use the right tool for the job.
    Then you need to hire developers that know how to program instead of just knowing how to write code in one language. Database languages are just another style of programming.

    Honestly somebody who doesn't understand other styles of programming languages doesn't tend to make a good developer.

    I personally am a much better programmer because I've been exposed to different styles of programming languages.

    I know when I first learnt databases seriously (instead of just simple updates and queries) I learnt relational algebra , relation calculus and domain calculus along with normalisation before we even touched SQL.
    If you've created your stored procedures properly then updating them won't be a hassle.
    Oooh so someone who knows how to get their head out of their arse and actually look at the big picture :)

    Your a rare beast.
    I agree completely on this. Honestly it sounds like the development processes and HR policies are shit for people who don't look at the whole picture and just focus on their piece of the pie.

    IMHO Think first , think again then write , think again and rewrite if necessary.

    Use the write tool in your toolkit for the job and if you step on somebodies toes than they need to get their head out of their arse.

    The large amount of inept people in IT are part of the reason why I've got no desire to be a developer. Once I realised the large amount of them , it made the decision for me whether to head for a research career or not.
     
  4. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    I've never heard of these before. What are they?
     
  5. Ze.

    Ze. Member

    Joined:
    Sep 13, 2003
    Messages:
    7,871
    Location:
    Newcastle, NSW
  6. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    I looked them up on wikipedia and it sounds like ways of being able to pull data from a normalized database using 1 query and such. Not sure how to put it in words.

    I might get that book, always good to learn something new.
     
  7. Ze.

    Ze. Member

    Joined:
    Sep 13, 2003
    Messages:
    7,871
    Location:
    Newcastle, NSW
    It's more a way of thinking about queries, they are all equivalent in descriptive powers.

    It's the benefit of doing a proper computer science degree rather than a diploma or a McDegree like degrees with *information* in the name.
     
  8. Jaffa_Cree

    Jaffa_Cree Member

    Joined:
    Feb 26, 2002
    Messages:
    1,976
    Other thing that i am not sure if any one has noted on the benefits stored procedures are

    1/. precompiled execution plan so it runs faster than dynamic SQL
    2/. provides a more secure mechanism rather than granting direct access to tables/columns etc
    3/. Minimises the possibility of SQL injection attacks

    I am not going to argue whether it is better to use stored procedures to encapsulate minor business logic or to leave then in application code, it all comes down to the size, complexity and available resources for the intended solution/product.
     
  9. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    Is this thread over? I was finding it really interesting :(
     
  10. Ze.

    Ze. Member

    Joined:
    Sep 13, 2003
    Messages:
    7,871
    Location:
    Newcastle, NSW
    What would you like to discuss?
     
  11. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    I really don't mind. I just find it really interesting. I love programming. I learn lots from these sorta threads.
     
  12. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    and software engineers become developers, Information * become management, and computer science students become academics who have no real use outside university? (as thats what each course is about, right?)

    Anyway, totally off topic but to keep the ball rolling, Ely you might find this interesting - http://msdn2.microsoft.com/en-us/skyscrapr/default.aspx
     
  13. mordy

    mordy Member

    Joined:
    Aug 30, 2001
    Messages:
    5,100
    Location:
    melb
    thats a load of rubbish, the only difference between the comp sci course and the soft eng course is the year of working internship. As a cs graduate you are only exactly 1 year behind a soft eng graduate in terms of software developer.
     
  14. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    No shit, I was taking the piss out of his stupid comment.
     
  15. mordy

    mordy Member

    Joined:
    Aug 30, 2001
    Messages:
    5,100
    Location:
    melb
    I think his comment was aimed towards "it" graduates, not soft eng ones.
     
  16. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    *sigh* I know that. He's having a go @ IT/IS but doesnt realise why the courses are so different. Real life is a lot different to Uni, and only knowing how to program won't get you far in big business.

    I'm 22, I have staff that report to me and all have CS degrees. I design/architect and manage and develop multiple projects for multiple clients. 90% of these projects are for a large Telco/ISP so it's a tad more complex then your standard web site or db front end applications.

    I have an Bach. IT McDegree and was told I will never get anywhere with my degree/grades. Now I work directly under people considered to be in the top 1% worldwide by MS at what they do. So what advantage would I have had with a CS degree?
     
  17. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    I wanna got job like that where i can learn from lots of talentented and experienced people. :(

    New Zealand is such a hole.

    Oh, thanks for the link btw. I read www.owasp.net and www.asp.net.
     
  18. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    10,058
    Location:
    Sydney
    2005 Express is totally free and we use it on our web server. There are really no limitations besides single processor and 2(4?) GB database.
     
  19. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744
    What city do you want to work in?

    Also, what city are you in now?
     
    Last edited: Jul 17, 2007
  20. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    10,058
    Location:
    Sydney
    this sums it up:

    1. Stored Procedures: Bandwidth and Runtime Performance
    2. BLL: Maintainability.


    I'll take number 2 every time. Big Applications are COMPLICATED! Meet your concept first and OPTIMISE later !!

    heres my rule:

    O = O
    Optimisation = Obfuscation ;)
     

Share This Page

Advertisement: