473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Linking of Schemas

19
Hello,

Is there anybody can help me on how can I make an auto number across all my 15 schemas. I need to create it for tagging of my equipment.

Thanks,
Jam
Nov 13 '08
60 4571
Pilgrim333
127 100+
If there was no application at all then the sequence was working perfeclty from sqlplus
There is no problem with the sequence, with or without the application.

Budget does not come in to play here. The application is already available. It need to be customized by including the functionality of having a auto number generation across multiple schemas of a database. And yes why not an application have more than 150 tables if there are 15 schemas involved. Its just an assumption and nothing else which can be clarified if @OP answers the question of letting know to how many tables are used in each schema by the application.
Budget is meant, if your database can't handle 150 triggers, then you should get a more powerful system.
The application should not be customized, the autonumbering should happen at the database side. Even if the database has a 1000+ tables.

Pilgrim.
Nov 19 '08 #51
amitpatel66
2,367 Expert 2GB
It doesnt make sense creating 150 odd triggers. What if in future, number of table increases, one cannot keep creating a trigger.

If and only if the number of tables are less (totalling all the tables across 15 schemas that are used by an application) and there will not be any new table inclusion in future then creating a trigger is acceptable. Again it have to be tested before it could work.
Nov 19 '08 #52
amitpatel66
2,367 Expert 2GB
There is no problem with the sequence, with or without the application.

Pilgrim.
There is a problem with the sequence when accessed from application, then what are be discussing here for so so long??
Nov 19 '08 #53
Pilgrim333
127 100+
There is a problem with the sequence when accessed from application, then what are be discussing here for so so long??
The application is not accessing the sequence, the poster just updated the autokey of the application once with the value of the sequence and expected that it would automatically link it with the sequence.

So, there is no problem with the sequence when accessed from the application, because the application is not accessing the sequence.

Pilgrim.
Nov 19 '08 #54
amitpatel66
2,367 Expert 2GB
The application is not accessing the sequence, the poster just updated the autokey of the application once with the value of the sequence and expected that it would automatically link it with the sequence.

Pilgrim.
This doesnt mean that the sequence is accessed from an application? If you really dont want to make the sequence work from application then why should it be linked to an application?

Anyways I can utilize this time and rethink of any other solution for this issue rather just increasing the size of this thread, becuase its important that @OP understands what I am trying to say.
Nov 19 '08 #55
Pilgrim333
127 100+
It isn't accessed from the application by the autokey.

@OP

Meanwhile, in googley land...

It seems that this problems is something more people have. Someone posted it on his blog, hopefully it will help you, and you need not go through all the trouble of making (all) the triggers.

Maximo and unique id's

Pilgrim.
Nov 19 '08 #56
jam26
19
Hello Experts,

I already made to link all my schemas to the sequence using Trigger. This may not be possible without your help.

Thank You Very Much!!!!

Jam
Nov 20 '08 #57
jam26
19
Hello Experts,

Now that I have connected the sequence across all schemas, Is it possible that I connect my other database on this sequence using trigger?

Thanks,
Jam
Nov 24 '08 #58
Pilgrim333
127 100+
Hi,

I don't know what you mean. It is possible to use the sequence for numbering in tables in another database. The sequence can be used through a database link. Syntax for that is:

Expand|Select|Wrap|Line Numbers
  1. select <sequenceschema>.<seqname>.nextval@<dblink> from Dual ; 
If you just want to insert data in tables in the database where the sequence resides, from other databases and use the sequence, that is no problem. It doesn't matter from where you insert the data in the tables, because you implemented the use of the sequence in the triggers of the tables, the sequence will always be used.

Pilgrim.
Nov 24 '08 #59
jam26
19
Thank you very much Pilgrim. I made a DB link successfully and its now working. :-)


Jam
Nov 26 '08 #60
Pilgrim333
127 100+
Good to hear Jam, congrats on getting it working.

A good lesson, when implementing bussiness rules, autonumbering etc. that needs to be done on a table, always implement it in the table triggers. This way you ensure that these necessities will always be met, no matter what interface is used for manipulating data.

If you have more issues, please let us know.

Pilgrim.
Nov 26 '08 #61

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

Similar topics

0
by: kyancy | last post by:
Hello All. We have several XML schemas to describe common component document parts. We then create new XML schemas as necessary that use "xsd:import schemaLocation=whateverLocation.." to include...
30
by: btober | last post by:
Whenever I create a temporary table, with something like CREATE TEMPORARY TABLE temptable1 AS SELECT * FROM paid.ad_hoc_query; New schemas appear, with names like "pg_temp_1". I guess the...
7
by: Roderick A. Anderson | last post by:
I'm looking for some input on a configuration I'm implementing. The long term goal is to providing hosting for companies and organizations with a basic/generic set of applications that use...
4
by: anonymous | last post by:
When I use the schema collection to apply many schemas to one XML instance document, I get an error if I do not qualify every element with the appropriate namespace. Both the W3C site and this...
2
by: John Jenkins | last post by:
Hi, I have a lot of schemas to load into a schema collection. I load them in by reading each one into a XMLTextReader from disk and add them into a schema collection. I have a couple of issues to...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
1
by: CSN | last post by:
I have two machines between which I exchange dumps a lot. On the first (Windows/cygwin), pgsql was set up with "Administrator" as the main superuser - who owns all schemas in template0 and...
6
by: Dennis Gearon | last post by:
This post is as much about getting some questions answered as leaving the following definitions in the archives for the next person. After a quick perview of the web, I came up with the...
3
by: Sami Marzouki | last post by:
Hi, What I'm trying to do is: - To write a Web.config with custom sections. (Done) - To write a xsd schema for this custom sections.(Done) - Tell the Web.config to take the two schemas. When...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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,...

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.