472,330 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,330 software developers and data experts.

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
Mar 10 '09 #1
5 2444
debasisdas
8,127 Expert 4TB
In oracle you need to define your own objects as desired.
Mar 11 '09 #2
amitpatel66
2,367 Expert 2GB
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
Mar 11 '09 #3
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....
Mar 11 '09 #4
debasisdas
8,127 Expert 4TB
come out of your laziness and start writing the code.
Mar 12 '09 #5
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
Mar 12 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jason_s_ford | last post by:
I have several sql server databases that were recently moved to a new server. In the process of migrating the databases, any triggers and...
10
by: Vilson farias | last post by:
Greetings, I'm getting a big performance problem and I would like to ask you what would be the reason, but first I need to explain how it...
4
by: MaRcElO PeReIrA | last post by:
Hi guys, I have been using the following table (short, short, short version): CREATE TABLE products ( prod_id SERIAL, description TEXT );
3
by: Darrel | last post by:
I have a table that stores the content for a web site I'm making. Each one has a unique ID so I can grab it via the querystring. Since it's being...
1
by: D. Dante Lorenso | last post by:
In a previous thread, it was determined that rather than use a table sequence for my primary key, I might consider using a compound primary key of...
1
by: D. Dante Lorenso | last post by:
In a previous thread, it was determined that rather than use a table sequence for my primary key, I might consider using a compound primary key of...
5
by: Michael Fuhr | last post by:
I'd like to propose that certain GRANTs on a table cascade to the table's implicit sequences. In the current implementation (as of 7.4.5 and...
1
by: James Robinson | last post by:
Just a sanity check -- data fed into pg using the COPY tablename (col1, col2) FROM stdin; ... data \. Does not cause referential triggers to...
4
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.