473,486 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

39 New Member
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 2480
debasisdas
8,127 Recognized Expert Expert
In oracle you need to define your own objects as desired.
Mar 11 '09 #2
amitpatel66
2,367 Recognized Expert Top Contributor
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
BiffMaGriff
39 New Member
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 Recognized Expert Expert
come out of your laziness and start writing the code.
Mar 12 '09 #5
BiffMaGriff
39 New Member
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
2070
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 constraints attached to tables were removed on accident. ...
10
2753
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 happens. Let's suppose I can't use sequences (it seams...
4
2078
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
1577
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 done via a query string, I didn't want to use...
1
1250
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 customer_id and customer_seq where the...
1
1792
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 customer_id and customer_seq where the...
5
4956
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 8.0.0beta3), a table owner must typically issue GRANT...
1
2052
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 fire (i.e. foreign keys), right? It seems to...
4
5690
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
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.