Better to use the sequence of one or more?

Hello

I have several tables, each with its own primary key. I don't like what are the values of primary keys; they do not have to be sequential or anything. Should I set a separate sequence for each table, or just set a single sequence and reuse it for all tables? Is how important it? Thanks for your help.

928546 wrote:
Hello

I have several tables, each with its own primary key. I don't like what are the values of primary keys; they do not have to be sequential or anything. Should I set a separate sequence for each table, or just set a single sequence and reuse it for all tables? Is how important it? Thanks for your help.

His 'clean' to have a specific sequence for each table. If nothing else, it's how things are generally implemented and when others see your design are likely to expect. In practice, is not relevant.

In addition, users can become unhappy when the sequence numbers are missing (which will ensure your suggested design). It matters little that they aren't really missing something, the numbers can make users think that documents are missing. It seems preferable to have consecutive sequence values in the tables (it can also tell you later if records have been deleted)

Tags: Database

Similar Questions

  • When I try to edit a room photo in photoshop elements 12, I'm not able to use the slider or one of the drop down menus. All I have is a black circle with a line through it.

    When I try to edit a room photo in photoshop elements 12, I'm not able to use the slider or one of the drop down menus. All I have is a black circle with a line through it.

    Most likely, the images are 16-bit/channel.

    Go to Image > Mode and click on 8-bit/channel and see if that solves the problem.

  • How can I use the sequence of the string "\u00e5" in myfile.txt converted unic

    How can I use the sequence of the string "\u00e5" in myfile.txt converted to unicode in my application?

    I have a text file, MyFile.txt, with some sequences represented unicode:
    \u00e5
    \u00e4
    \u00f6
    etc.

    This is the file contains unicode, not the character it represents: a, a and o.
    I get the sequence of the file and save it to a vector. When I tried to use it on a JButton, I see the "\u00e5" string and not the character that I assumed.

     
            read file codes ...
            ...
         Vector<String> glyphVector = readGlyphIndex.getUnicodeFiles();     // to retrieve the vector with unicode sequence and save it to glyphVector
         String unicode = glyphVector.get(0);     //get the first unicode sequence
            System.out.println(unicode);    //displays \u00e5 and not å in the console.
         jButton.setText(unicode);   //jButton is a JButton and it shows the string \00e5 and not the character å
            ...
    The question is how to convert the sequence of string to be a unicode escape in the code?

    In order to make it clear:
    //from
    jButton.setText("\\u00e5");
    //to
    jButton.setText("\u00e5");
    Thanks in advance!

    Dragonfly
    String s = Character.toString((char) unicodeInInt);
    

    Strictly speaking, if unicodeInInt is a Unicode code point (for example, it can be greater than 0xFFFF) then the correct code would be this:

    String s = new String(Character.toChars(unicodeInInt));
    

    However, since the "\u" notation allows only 4 hexadecimal digits (and need to 0xFFFF code points > Unicode represented by their UTF-16 encoding), the code above is not enough for this particular case.

  • Microsoft Fixit error "an error occurred during the download of one or more components and cannot run the Troubleshooter"

    Original title: cannot run FixIt.

    With the help of Vista Home Premium, sp2, 32-bit on Toshiba Satalite A135

    I tried for days to find a solution for the reason why I can't run software 'MR FIXIT' or "MICROSOFT FIXIT" auto diagnostic I downloaded several versions of the software and saved, but when I try to launch it I stopped.  The following message appears: "toubleshooting cannot continue b/c an error has occurred."  An error occurred during the download of one or more components and cannot run the troubleshooter. »
    These versions I've tried lately:
    microsoftfixit. Program.installuninstall.RNP.84258196752136210.7.1.Run
    microsoftfixit. Program.installuninstall.Run
    microsoftfixit. WinSecurity.fisc.8425861308153696.4.1.Run
    microsoftfixit. Wu.FISC.8425861308153696.4.2.run
    852581157233326805.5.1.run
    I don't know if the problem is related, but I was also impossible to install the download: security for microsoft .net 1.1 SP1 framework update... (kb2656353).  I tried to install this download since January of 2012.  The reason why I tried to use the auto diagnostic software should fix my problem of installation of the security update.  I remember somewhere along the way, getting the error message that some files were corrupt.  Your help would be greatly appreciated.

    Hello

    Are able to run fix it?

    You can also post your query in Microsoft solve this forum. Please visit the link below to find a community that will support what ask you:

    http://social.Microsoft.com/forums/is/fixitcenter/threads

  • Error ORA-16724: could not resolve the deficit for one or more databases in waiting

    I came to work today with the following error is displayed:

    February 5, 2014 01:27:19 error ORA-16778: make the mistake of transport for one or more databases.


    Looks like this error disappeared but now I have the following error:

    February 5, 2014 11:52:40 error ORA-16724: could not resolve the deficit for one or more databases in waiting

    I did some research on the forums and I think I need backup and restore, but I'm not sure.

    Here are some questions that I saw others asking in the forums:

    PRIMARY:

    Select max(sequence#) from v$ archived_log; -24589

    Select current_scn in the database of v$. -871568619

    SECONDARY:

    Select max(sequence#) from v$ archived_log; -24589

    Select max(sequence#) from v$ archived_log in case of application = 'YES '; -24562

    Select current_scn in the database of v$. -870987797

    Select * from v$ archive_gap;

    Thread # Low_Sequence # High_Sequence #.

    1 24563 24563

    Looks like everything is working, but the error is still appearing in OEM primer.

    The issue ended up being with the control file. I followed of many blog posts on how to roll forward the database before and they all said to restore the control file before you recover the database. I followed this paper: http://docs.oracle.com/cd/B28359_01/server.111/b28294/rman.htm#CIHIAADC and it worked as expected. The old control file has had 6 data files that were in a different place than the others. The new control file, I created the primary had all the files of data in one place. After correcting the control to point to the locations correct datafile all started working again.

  • I want to play an avi file from Limewire on windows media player and everytime I try I get the error message one or more codecs you need is maybe missing. What should I do?

    I'm having a problem with Windows Media Player 11. I download a file from Limewire 5.3.6 play in wmp, and it won't work at all. I get an error message saying; "Windows media could not read the file. One or more codecs may be missing. I tried to download the codecs and that did not work.

    I'm having a problem with Windows Media Player 11. I download a file from Limewire 5.3.6 play in wmp, and it won't work at all. I get an error message saying; "Windows media could not read the file. One or more codecs may be missing. I tried to download the codecs and that did not work.

    ===================================
    The following free utility can help you identify
    the codec you need.

    Download GSpot
    http://www.free-codecs.com/download/GSpot.htm
    (left-click the text: "Download GSpot")
    (on the next screen...
    left click: 'Download [GSpot 2.70]')

    GSpot Super quick start
    http://www.headbands.com/GSpot/v26x/Quick_Start.html

    Evaluation of video files and Codecs with GSpot
    http://www.windowsmoviemakers.NET/PapaJohn/68/GSpot.aspx

    Good luck.
    John Inzer - MS - MVP - digital media experience

  • I use a Mac.  I "upgraded" to of LR4 LR5.  I don't want to be a member of the "creative cloud."  I just want to use the software that I bought, more precisely to load on my SmugMug account.  Is it possible to use an add-on for this?  Opening and L

    I use a Mac.  I "upgraded" to of LR4 LR5.  I don't want to be a member of the "creative cloud."  I just want to use the software that I bought, more precisely to load on my SmugMug account.  Is it possible to use an add-on for this?  Opening and LR4 were easy, but I think it's impossible without subscribing to CC.

    do you mean that you get a page Adobe Adobe ID, wondering like that? If you have followed my second just method?

    If this is the case, this isn't an obligation to subscribe to the CC, but just a completely - a free Adobe ID, email and a password which can identify you.

    In fact, it is the same name of username/password used to log-in on this forum.

  • Just had help installation cc 2014. get this dialog box when I open the app. One or more files in the folder required for the operation of photoshop adobe are missing. Help

    Just had help installation cc 2014. get this dialog box when I open the app. One or more files in the folder required for the operation of photoshop adobe are missing. Help

    Run the cleanup tool to remove Ps CC 2014:http://www.adobe.com/support/contact/cscleanertool.html .

    Restart the computer and then try to reinstall Ps CC 2014.

    Kind regards

    Ashutosh

  • What is better to use the database or persistence.

    Hello friends,

    I have a doubt in relation to the use of the database and persistence.

    I'm working on an application based on OS_v5.0, I use a database to store my data or persistence.

    While it will be better to use as prospect of memory and speed.

    Thank you

    There is no right answer here.  Include critical factors

    (a) the data structure - is that he opposes or ranks

    (b) the size of the data,

    (c) how the data should be used

    (d) what coding effort, you are willing to put in.

    You must weigh all these factors before making a decision.

    Maybe you can give some pointers in each of these areas and we can suggest how we were?

  • How can I remove the microsoft account and use the address as one alias on another?

    So I have two microsoft accounts using gmail addresses, the first is the one who has all my data (throughout the onedrive, Skype, xbox, windows, etc.) and the second has nothing. I want to do is delete the second so that I can use the address as primary on the first alias (as is my most used gmail account). Is this possible?

    account 1: * e-mail address is removed from the privacy *.

    account 2: * e-mail address is removed from the privacy *.

    Hi Dan,.

    Thanks for posting in the Microsoft Community.

    From the description, it seems that you want to remove one of the two Microsoft accounts.

    Once you remove the secondary account from Microsoft, you can use the primary address, but you can go as an alias. 

    To remove a Microsoft account, you can see the Microsoft article and check if that helps:

    http://Windows.Microsoft.com/en-us/Windows-8/remove-account

    Note: Before deleting an account Microsoft make a backup of data.

    You can also consult the Microsoft account and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Live/account-close-account

    To remove the Gmail account, you can green light, making the Gmail Web site.

    Just reply to the State of the question.

    Thank you.

  • use the sequence grouping conditional Dynamics

    Hi experts,

    I have a simple task (?) - I want number (assign) groups (increase the number of Group) based on a condition.

    Here is an example: create groups numbered according to the number of Department (as per the same collection)
    create table emp as
    select * from scott.emp;
    
    CREATE SEQUENCE group_no;
    SELECT group_no.NEXTVAL FROM DUAL;
    SELECT group_no.CURRVAL FROM DUAL;
    
    /* automatic grouping - NOT WORKING!!!! */ 
      select ename, deptno, deptno_next, deptno_prev, 
       case when (deptno_next > deptno) then group_no.nextval else 1 end grp 
        from
          (select ename, deptno,
                  lead(deptno) over (order by deptno) deptno_next,
                  lag(deptno) over (order by deptno) deptno_prev
          from emp
          );
    PROBLEM:
    It seems that the sequence is increased, even when the condition for a new number is not satisfied!
    NAME      DEPTNO                 DEPTNO_NEXT            DEPTNO_PREV            GRP                    
    ---------- ---------------------- ---------------------- ---------------------- ---------------------- 
    CLARK      10                     10                                            1                      
    KING       10                     10                     10                     1                      
    MILLER     10                     20                     10                     130                    
    JONES      20                     20                     10                     1                      
    FORD       20                     20                     20                     1                      
    ADAMS      20                     20                     20                     1                      
    SMITH      20                     20                     20                     1                      
    SCOTT      20                     30                     20                     135                   
    WARD       30                     30                     20                     1                      
    TURNER     30                     30                     30                     1                      
    ALLEN      30                     30                     30                     1                      
    JAMES      30                     30                     30                     1                      
    BLAKE      30                     30                     30                     1                      
    MARTIN     30                                            30                     1
    Instead of
    else 1
    I use group_no.currval (same group number, when does not change do not Department). I know, I need to cover the previous number as well, but I did simple, because the problem here seems to be the sequence...

    Forward your support :-)
    Duik

    Published by: user10939560 on 08.10.2012 07:42

    Published by: user10939560 on 08.10.2012 07:44

    Published by: user10939560 on 08.10.2012 07:45

    Published by: user10939560 on 08.10.2012 07:48

    Published by: user10939560 on 08.10.2012 07:49

    "I want number (assign) groups (increase the number of Group) based on a condition."

    But he did exactly want you want. The number of groups is increasing. It is not contiguous, which
    You can not guarantee for sequences of anyway.

    However, if I understand you correctly, it's maybe you need:

          select ename,deptno,
          dense_rank() over (order by deptno) grp
          from emp;
    

    If this isn't the case, please explain in more detail what you are trying to do.

    Published by: Paul Horth on October 8, 2012 08:06

  • How to use the sequence of client web proxy.

    Hello

    I created a sequence in the database.

    And I'm sure in EntityImpl as:

    SequenceImpl sequence = new SequenceImpl ("Sequence_name", getDBTransaction);
    setAttribute (sequence.getSequenceNumber)

    I'll put the attribute with the val sequence automatically.


    But I want to get the value of the sequence in the web proxy client generated by WSDL.

    Right now, I'm writing the same code and imported files.
    But it gives me error that:

    java.lang.nullPointException.


    How to access the sequence in the web proxy client generated by WSDL.

    Hello

    expose a method on the ViewObject and make it available to the service interface. In the Web Services it is meaningless to create dependencies between a customer and the details of the implementation of the service.

    Frank

  • How to use the conditions where there are more than two options

    I have a blade that collects information from the user and then makes decisions based on the values entered. On a slide I use the widget drop-down list and list of"basic", "Intermediate" and "Advanced". I hoped to do is use the Coditional Structure as follows:

    1. If the Basic was selected slide goto BasicQuickQuiz
    2. If the intermediary has been selected goto slide IntermediateQuickQuiz
    3. If Advanced was selected slide goto AdvancedQuick Quiz

    I can make this work for Basic or intermediate, but I don't see how (or even if) I have a multi level if statement.
    My work is about:
    1. a button added logic:
    So basic, then got otherwise BasicQuickQuiz goto IntermediateQuickQuiz

    2. on the Enter slide on IntermediateQuickQuiz event:
    If the intermediary, then keep, otherwise goto slide AdvancedQuick Quiz

    It works, but it seems awkward - y at - it another way that this goal could be achieved?

    Tim

    What I was hoping to see was the ability to create several Else If statements within the only condition. I've changed it now to add two conditional statements, one after the other, but still find this unscrupulous feature.
    I will record a feature request to add a Select Case block / Switch style fuction to this group.
    However, since it is new I can live with the workflow (for this version of Cp anyway!)

    Tim

  • Acrobat does not support the conversion of one or more of your files in PDF format.

    When Adobe Acrobat Standard DC 2015 release (Classic) | Version 2015.006.30121 is installed using the Customization Wizard of Acrobat.   The files of Office files option is not available when you use the files tool combine.

    Also, it does not install the Adobe PDF printer.

    If I install standard Acrobat using the web installation program, it installs the adobe printer and and I can combine PDF files.

    The views on how I can have the functionality of adding files Microsoft Office .docx, .pptx, .xlsx to the tool to combine the packaging while mst files.

    Thank you Mc-Lovin'

    I think I discovered why office files are missing

    In the Customization Wizard

    Select features

    Select Create Adobe PDF

    Initial state, select this feature will be installed on local hard drive

    Select Microsoft Office and do the same thing

    Select Microsoft Outlook to do the same thing

    Select the Visio to do the same thing

    Save the transform file and install Acrobat by using the transform file.

    I have not yet tested, but it sounds like the right solution.

  • lighting of 3 leds using the sequence meal and time delay VI express?

    run the vi and a LED light, 1 second later, the 2nd led should light, 2 seconds later the 3rd led must light up then everything must stay on for 3 seconds, I need to use a flat sequence with 3 images and express time in each image

    Tips or advice would be grateful im a little new to this iv not been mess autour with her and to this day no luck

    Nevermind I got it

Maybe you are looking for

  • DataMouse problem

    My datamouse grows every time that I move it quickly. I updated all the updates and turned my MacBook on and outside, but the problem is still there. Someone knows how I get it? Sorry for the bad English... !

  • suddenly changed iPhoto event display

    Photos events suddenly appear only full size, one at a time. All photos of the event have been previously displayed in small size on the screen, and I could choose one or more for export or print. My setting for events is pictures of the event shows.

  • Can I change my Game Center account without changing the devices all Apple ID?

    I have a game I started playing my old Game Center, but I want to continue to play it without having to change my Apple ID in the genres. What I'm basically asking is: Can I change my Apple ID only on my Game Center and not in the device?

  • IOMEGA ScreenPlay Director error 12

    Hello I just found out that I bought my ScreenPlay Director exactly 3 years so I'm afraid it's really just out of warranty today... When I start the camera, I get the screen below (error 12: content present, please restart your product), with additio

  • How to stop a script of long-run, or leave in the first place?

    How to stop a longrunning script to stop or start in the first place. It does in itself. I don't know what it is. The only reason for which we know that it is running is because from time to time, we get a box popping up to say something like "this c