Home » RDBMS Server » Server Administration » dump question
dump question [message #369168] Tue, 04 April 2000 10:48 Go to next message
Kevin
Messages: 45
Registered: February 2000
Member
This may seem very obvious, but should I create a table(s) with entries for every index in all of my tables in the database, so when one wants to do an insert to a table that contains an index, they can use that particular sequence number index? Is there a better mechanism?
Re: dump question [message #369180 is a reply to message #369168] Wed, 05 April 2000 17:12 Go to previous messageGo to next message
Cpchin
Messages: 17
Registered: December 1999
Junior Member
Hi, do you know how the index works in Oracle? Or you just want to use a sequence number to sequence your data?

Index is created based on the column(s) you are specified, it can be primary key, unique index or composite index which can consists of several fields. The index is stored separate from the data, the index will have the column value and the rowid of the data record.

When you insert a record to the table, the index will automatically be updated. You cannot see the index or choose a sequence from the index.
Re: dump question [message #369186 is a reply to message #369168] Thu, 06 April 2000 10:42 Go to previous messageGo to next message
Kevin
Messages: 45
Registered: February 2000
Member
I have used tables and indexes and created them for years, without thinking about it, or the occasion never came up. The closest I came to this
situation was inserting into the a temp table from some other table which had the same field as a key. But if I create a table, then do an insert into it, and it has an index which is the primary key, and defined not null, how do I do the insert? Given that the two fields are activity and description, and activity is the primary key and defined not null. I would use :
insert into isun.activity (description) values ('this must be the place');
but what do I use for activity?
Re: dump question [message #369187 is a reply to message #369168] Thu, 06 April 2000 10:49 Go to previous message
Kevin
Messages: 45
Registered: February 2000
Member
I have used tables and indexes and created them for years, without thinking about it, or the occasion never came up. The closest I came to this
situation was inserting into the a temp table from some other table which had the same field as a key. But if I create a table, then do an insert into it, and it has an index which is the primary key, and defined not null, how do I do the insert? Given that the two fields are activity and description, and activity is the primary key and defined not null. I would use :
insert into isun.activity (description) values ('this must be the place');
but what do I use for activity?
I assume I use a sequence. And I read that it is good practice to use a table of sequences to keep them organized. Is this correct?
Previous Topic: Re: Oracle error messages
Next Topic: Active XACTS in rollback segs
Goto Forum:
  


Current Time: Tue Apr 16 03:28:13 CDT 2024