Why do I have to manually make sequences and triggers for primary keys?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BiffMaGriff
    New Member
    • Aug 2007
    • 39

    Why do I have to manually make sequences and triggers for primary keys?

    Hi All,

    I'm an experienced MS SQL guy and I'm learning Oracle for my new job.
    I've been asking around and apparently no-one has ever used a tool that would automatically create sequences for a primary key and the trigger that would go along with it to automatically populate the primary key field. You know something that is done in MS SQLServer with the click of a single button. ;-)

    Along with that I would like a tool that would generate audit tables and the associated triggers for me based on a given table as well as the ability to reorder columns.

    Does a freeware application like this exist?
    If not I guess I'll take an afternoon and hack it out. :(

    -Biff
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    In oracle you need to define your own objects as desired.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      You can use a TOAD,SQL Developers etc to create these objects. In TOAD you can create a SEQUENCE,DB LINK etc without writing much code. But NO it is not possible to associate SEQUENCE and TRIGGER by single click. You need to:

      1. Create a SEQUENCE
      2. Use that SEQUENCE in a TRIGGER to populate a Primary Key value

      Comment

      • BiffMaGriff
        New Member
        • Aug 2007
        • 39

        #4
        Yeah I understand that is how you do it. My point is that we shouldn't have to write that out every time we make a new table. It should be done for us! I'm lazy and I want to create applications fast. Any extra steps beyond defining a schema should be automatic!
        Some bright boy out there must have made something to do this for us....

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          come out of your laziness and start writing the code.

          Comment

          • BiffMaGriff
            New Member
            • Aug 2007
            • 39

            #6
            I don't understand Oracle people, everywhere I've asked I get the same answer. "Just code it"
            Why do things the long, hard, boring way?

            I prefer the short, easy, exciting way.
            It doesn't matter anyhow as I've already written my own app to do this for me.
            2 hours of my time is worth it to never have to code a sequence, trigger or audit table again.
            Biff - 1 Oracle - 0

            -Biff

            Comment

            Working...