Please Help - Avoid default name when creating constraints

Here I am creating two very simple tables:
create table supplier
     id number not null,
     constraint pk_supplier primary key (id)
create table product
id number not null,
supplier_id number not null,
constraint pk_product primary key (id),
constraint fk_product_supplier_id
foreign key (supplier_id) references supplier(id)
After done while I choose to view table constraint information by using:
select table_name, constraint_name
from user_cons_columns
where lower(table_name) = 'product';
I get result:
TABLE_NAME                     CONSTRAINT_NAME
PRODUCT                        SYS_C005441
PRODUCT                        SYS_C005442
PRODUCT                        PK_PRODUCT
PRODUCT                        FK_PRODUCT_SUPPLIER_ID
What is the "SYS_C005441" and "SYS_C005442" for? Can I avoid creating them?
Thanks

Justin Cave wrote:
Are you suggest not explicitly naming all your constraints? Or just the NOT NULL ones?No, not at all. Did not even thought that far when I responded. Bit of foot in mouth as I only thought of not null constraints. Blame it on a lack of coffee. :-)
I usually name primary & foreign key and check constraints. But not null constraints - too much of an effort to name them IMO.
But you do raise an interesting topic. Why bother naming some constraints (e.g. PK and FK) and not others (e.g. not null)? So playing devil's advocate, why should we be naming constraints at all?
It sounds like you're suggesting that all constraints should get system default names. Well, one can argue that the same effort of naming other constraints is not worth it - why have null constraints as the exception to implicit naming? I would think that the issue I raised also applies to all constraints.
You have multiple foreign key constraints for INVOICE_ID - how do you name these? I would like both the table and column names as this will provide the meaning needed when seeing the constraint being violated. But with 30 chars only, that is a problem. So invariable one needs to start to abbreviate table and column names in order to make it meaningful constraint name. Been there many times - disliked the constraint name I came up with every time, as it was a compromise and not the actual naming format I would have preferred.
If that's what you're suggesting, doesn't that create problems for you when different environments have different constraint names? I know personally that I'd much rather have named constraints so that when there are constraint violation errors in production, I can start troubleshooting the problem in my local environment without first determining how to map the production constraint name to my local database's constraint name. Understand your point - and yes, it can be an issue. But by the same token, why should an application user ever see a default Oracle exception? With the exception of system-type exceptions (e.g. no more tablespace space, eof on communcation channel), all other exceptions should be custom application exceptions.
Showing for example a "+ORA-00001: unique constraint (xxx.xxxxx) violated+" is wrong IMO. The app code should trap that exception and raise a meaningful and unique application exception for that. The user seeing anything other than a custom app exception, should itself be an exception.
And I'd much rather be able to put the constraint name in a script that is to be promoted through the environments rather than coming up with a process that uses dynamic SQL to figure out the name of the constraint I want to do something to. Well, I would not rely on a constraint name itself to determine what it is. Just because it says fk_invoiceid_invoices does not mean that is is a foreign key on column invoice_id and references the invoices table. The safe/proper thing to do would be to query the data dictionary and confirm just what that constraint is.
I suppose if you know that all the lower environments are very recent clones of production rather than running all the scripts in source control that these problems may not be particularly large. But I'm curious if you have some better approach to handling them (or if I'm completely misinterpreting what you're suggesting).Not sure if you recall some feature discussion with Tom and others (was on asktom?) when someone came up with this core issue and suggested it be addressed by allowing one to define an exception message with the definition of the constraint. Cannot recall the exact syntax proposed, but I do remember thinking that it was not a shabby idea - as this solves the problem of having to invent a meaningful name using 30 chars only. And it also removes the need for trapping that constraint violation in all app code that may cause the exception and raising a custom and meaningful app exception instead. Not too mention that plain and direct SQL access will show the same exception message.
Perhaps in Oracle 12c? I assume the c as it seems that The Next Big Thing is cloud computing and surely Oracle 12 will somehow try to exploit that buzzword - as it has with i (Internet) and g (Grid) versions. ;-)

Similar Messages

  • Please help, my iMac crashed when i open safari and my screen was blinking, then blackout and force to restart.

    Please help, my iMac crashed when i open safari and my screen was blinking, then blackout and force to restart. Why is this happening? This is the crash report from my iMac.
    Anonymous UUID:       0CC51978-99A7-1665-7EFF-A04BF2E05D6E
    Sun Aug  3 20:45:04 2014
    panic(cpu 0 caller 0xffffff80100dc24e): Kernel trap at 0xffffff801005248e, type 13=general protection, registers:
    CR0: 0x0000000080010033, CR2: 0x00007fff73cf3638, CR3: 0x000000000952f04e, CR4: 0x00000000000606e0
    RAX: 0xffb9b9b9ffbbbbbb, RBX: 0xffffff801c66d3c0, RCX: 0x0000000000000030, RDX: 0xffffff801c66d418
    RSP: 0xffffff80abb23c80, RBP: 0xffffff80abb23cd0, RSI: 0x0000000000000001, RDI: 0xffffff801c66d3c0
    R8:  0x0000000000000001, R9:  0xffffff8010601910, R10: 0x00000000000003ff, R11: 0xffffffffffffffff
    R12: 0x0000000000000000, R13: 0xffffff801cff60d8, R14: 0xffffff801c9fefd8, R15: 0x0000000000000000
    RFL: 0x0000000000010287, RIP: 0xffffff801005248e, CS:  0x0000000000000008, SS:  0x0000000000000010
    Fault CR2: 0x00007fff73cf3638, Error code: 0x0000000000000000, Fault CPU: 0x0
    Backtrace (CPU 0), Frame : Return Address
    0xffffff8084698c50 : 0xffffff8010022f79
    0xffffff8084698cd0 : 0xffffff80100dc24e
    0xffffff8084698ea0 : 0xffffff80100f3746
    0xffffff8084698ec0 : 0xffffff801005248e
    0xffffff80abb23cd0 : 0xffffff8010051dc9
    0xffffff80abb23dd0 : 0xffffff7f909ef726
    0xffffff80abb23e50 : 0xffffff7f909ef15c
    0xffffff80abb23ed0 : 0xffffff7f909eee0b
    0xffffff80abb23f20 : 0xffffff80104353b5
    0xffffff80abb23f50 : 0xffffff8010440a33
    0xffffff80abb23fb0 : 0xffffff80100f3f46
          Kernel Extensions in backtrace:
             com.apple.kec.pthread(1.0)[882075E6-12C4-3225-8750-928715183739]@0xffffff7f909e a000->0xffffff7f909f4fff
    BSD process name corresponding to current thread: ReportCrash
    Mac OS version:
    13E28
    Kernel version:
    Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64
    Kernel UUID: BBFADD17-672B-35A2-9B7F-E4B12213E4B8
    Kernel slide:     0x000000000fe00000
    Kernel text base: 0xffffff8010000000
    System model name: iMac12,2 (Mac-942B59F58194171B)

    Both Memory Clean and Clean My Mac could have cause the damage which triggered the kp.
    I would back up your Mac, erase and reinstall. Then Migrate your user data from the backup.
    Uninstalling Tuxera is a troubleshooting process. You don't have to keep it uinstalled, just long enough to test to see if it is causing the problems.
    However, if it doesn't happen regularly, it would be hard to determine if it was the cause.  And, as I mentioned, I don't think it would be the cause.

  • I purchased as a Download Lightroom 5.5, My pc got a virus. I saved Lightroom on ext. drive. I am trying to reload onto pc BUT it's asking me for a serial number..I cannot find receipt. Please help. I registered when I downloaded purchase.

    I purchased as a Download Lightroom 5.5, My pc got a virus. I saved Lightroom on ext. drive. I am trying to reload onto pc BUT it's asking me for a serial number..I cannot find receipt. Please help. I registered when I downloaded purchase.

    Find your serial number quickly
    You might want to develop a more secure system of saving your serial numbers and other critical information.

  • Please help me to visible the create event menu in workflow administrator.

    Hi All,
    please help me to visible the create event menu in workflow administrator.
    (select workflow administrators responsibility navigate to administrator workflow -->
    Business events-->events-->here i am seeing only search options,but i required create event,subscriptions.... )
    Regards
    Gopinath

    Hi,
    please help me to visible the create event menu in workflow administrator.
    (select workflow administrators responsibility navigate to administrator workflow -->
    Business events-->events-->here i am seeing only search options,but i required create event,subscriptions.... )You should find "Create Event" and "Create Events Groups" buttons in the same page under "Results : No Search Conducted".
    Regards,
    Hussein

  • Hi can someone please help, my imac crashed, when i try to start it up, it just beeps loudly 3 times, then there is a pause before it beeps 3 more times, this just continues to happen, any sugestions? please help

    Hi can someone please help, my imac crashed, when i try to start it up, it just beeps loudly 3 times, then there is a pause before it beeps 3 more times, this just continues to happen, any sugestions? please help

    allanpar wrote:
    i am having to use my laptop to post this question, missing my imac so much, its just not the same using this slow windows laptop.
    Then maybe it's time to buy a new Windows notebook.
    The RAM has either gone bad or somehow become unseated. Also there is the chance that the RAM slots have failed.

  • Help!!! - When Creating Customer  I get this ERROR "Provide a positive integer for minimum customer balance amount or percent when balance amount overdue type is amount or percent respectively."

    When Creating Customer  I get this ERROR "Provide a positive integer for minimum customer balance amount or percent when balance amount overdue type is amount or percent respectively."
    I tried troubleshooting when I saw the another post and created with a new customer profile class, but still getting an error, though I created another profile like below and attached this to another existing customer it worked, but when I tried creating a new customer it is still giving me the error. I am Using Oracle Applications R12.1.1
    Steps I followed in Creating a New customer Profile
    ==== Make sure the new Customer Profile class which you will create is in active state. Cross check below steps while defining a customer Profile class.. e.g. Name : DEFAULT (and it's active)
    *1) Profile Class Tab :*
    a) Balance FWD Billing : Not enabled
    b) Invoicing --> Tax Printing ( Summarize By Tax Name), Grouping Rule (DEFAULT)
    c) Set Terms as per ur requirement , do allow discount & Override terms
    d) Set Dunning as per your requirement,
    e) Filled in Collectors info as per your requirement with Credit Check enabled...
    f) Receipt --> Auto cash Rule set as 'Standard'..
    *2) Late Charge Profile* Set it as per requirement
    *3) Profile Class Amounts* e.g Say Currency set as "USD"
    a) Credit Limit : 100000
    b) Order Credit Limit : 100000
    c) Minimum Receipt Amount : 1.00
    d) Min statement amount : 1.00
    e) don't put any value in Exchange Rate type (e.g, monthly, Plan etc..)
    f) Minimum Customer Balance : Amount ------> Value: 5.00
    g) Minimum Invoice Balance : Amount ------> Value: 5.00
    h) Minimum Charge per invoice : 1, Maximum Charge per Invoice : 100 Under Interest Charge
    i) mention Type as Fixed Rate, Value : 10
    j) You can avoid setting the Penalty Charge for the time being..
    Step-2_ a) Open a customer ..*go to Bill to site details* --> Click on Profile Tab --> Under Profile Class field please include new profile class which is created by you (e.g DEFAULT) . b) Go to Profile Amounts Tab --> Click(Show) on Currency USD --> Verify the set up here as well   I could see this.
    When I tried creating an new Customer using the new profile, it's repeating the same error. Please help.

    Hi
    You get this error when profile class amounts are not set for all the currency.  Go back to your profile and ensure that the profile amounts are set for all the currencies found, whether you are using it or not.
    Regards

  • Cannot select name when creating new DC

    Hi all,
    It seems I encounter this kind of problems over and over again when dealing with NWDI )-:
    In this thread Cannot select vendor when creating new DC I couldn't select vendor.
    I installed a new NWDI system (version is 7.18), did all the post installation steps including the configuration of a name server on the SLD but I cannot select "name" and the vendor I entered is not shown (even if enter it manually I cannot select name so it doesn't help - see snapshot).
    [snapshot|http://img134.imageshack.us/i/nwdi.jpg/]
    Snapshot: http://img134.imageshack.us/i/nwdi.jpg/
    I did name server config on : http://server:port/dtr/system-tools/administration/NameServerConfiguration
    Name prefixes are defined under 'Name Reservation -> Development Component Name' - I used <x.y>/* and <x.y>/tst (x.y is namespace like com.omri).
    I updated CMS after setting the name server, restart J2EE and did all kind of voodoo without success.
    I use local SLD which is part of the J2EE.
    I don't get any error messages (from NWDI/SLD/NWDS).
    I don't remember this kind of problem with NWDI on 6.40 versions.
    Moreover I installed and configured several systems on 7.12 & 7.13 versions without any problems but with 7.14 & 7.18 I've problem with setting the name server...
    Please help,
    Thanks,
    Omri

    Solved it on my own by deleting and creating the track again (with the same settings!!!)

  • CrystalReport into Business Objects - Change default name when saving

    Hello everyone,
    i'm asking a question here because I don't know anywhere else people who have sufficient skill to answer.
    I hope the thread is posted in the right section, if not, sorry and please move it where it belongs.
    I'll try to simply explain my problem.
    I have Business Objects XI 3.1 enterprise and i use InfoView to open a CrystalReport report.
    When I export it, (the extension does not matter) the location window opens and the default name is CrystalReportViewer.xxx .
    What I need is to not show to the customer the default name but the name of the report itself.
    Anyone has an idea?
    Thank you a lot!
    Cric

    We have a similar request for our companies deployment. Unfortunately I found that this is normal behavior for the application and that an enhancement request has already been opened (ADAPT01550068).
    SAP note 1491438 can provide you with additional information. Hope this helps.
    Edited by: Rodney Barrera on Feb 17, 2012 5:11 PM

  • PDF Bookmarks - Change Default Width When Creating PDF File from InDesign

    When creating a PDF file (from Indesign CS4) I automatically create the PDF bookmarks based on the InDesign document's Table of Contents.
    But by default the width in the bookmarks is always set at "Fit Page".
    Is there a way to change the default to "Fit Width" in Indesign before the PDF is created?
    It's too much trouble to change every bookmark in the PDF after it's created.
    Thanks for any help in advance!

    Thanks, Steve. I have actually previously done what "fogharty" suggests and it does work if I want to set the pages to "fit width" or a variety of other options. However, none of the options is inherit zoom which is what I, and many other from the sound of the thread, need and want. We want to respect our end users--not dictate how they must view our PDFs. Hopefully, Adobe will listen and make this option available soon.

  • PLEASE HELP! Error Message When Trying to Publish Site

    No matter how many of these errors I fix (edit the file and re-upload it onto the site), Muse comes up with a new error every time I try and publish. How can I resolve this issue, so I can publish my updated site. It should not be a problem with the files considering I have been able to publish the same files in the past...something is wrong with Muse itself.
    PLEASE HELP!!@

    Business Catalyst does not support special characters in file names (i.e. "&"). Through normal paths of placing or importing files, Muse will automatically alter the file names during publish to remove the special characters. The one exception path I'm aware of is an .oam file from Edge, where Muse doesn't have enough knowledge of what all is within the .oam package to safely alter the file names.
    When the error occurs, is it always for a file that contains a special character in the file name?
    How many files are being uploaded?
    If you click "Resume" does the Publish process:
    A) Proceeds and completes
    B) Puts up the same dialog for the same file
    C) Puts up a similar dialog, but for a different file
    D) Other?
    Thanks.

  • Help;;;;;cant select calendar when creating inventory organization parameters

    hello there i am trying to define a new inventory organization. i have created inventory organization. i opened organization parameters and in the inventory parameters tab, when i tried to enter calendar, it is saying list of values has no entries. it is giving following error:
    frm-41830: list of values contains no entries.
    please help me
    tommy.

    It seems that you don't define a work calender and build it. see the document
    http://www.google.com.hk/url?sa=t&rct=j&q=Oracle+inventory++Implementation+Guide&source=web&cd=1&cad=rja&ved=0CCsQFjAA&u…

  • Please help! Artist names not appearing in ipod after syncing!

    Hey there everyone, I really really need some help with this problem that I have now had for 2 months. I have this problem on 3 different ipods so I know it is not a problem with the ipod, it is with itunes.
    My itunes library is in perfect order and set up how I want it to be when in my ipod, e.g, every song has the artist, album and song name in the correct places in the 'get info' tab, and appears in the correct places in the itunes library.
    However, when I synchronise my ipod with itunes, the artist tab in the ipod consistently says 'no artists'. However, the songs are in the songs tab and albums in the albums tab, but it doesn't register the artists. Because of this I can't search for the artists I want.
    I have spoken to apple numerous times and they haven't been able to tell me what is wrong with it. I'm at my wits end with this and so greatly appreciate any help or advice anyone can give.
    Things I have tried so far include, changing ipods, selecting all as part of a compilation, deleting the music from itunes and then putting back into itunes. None of this has worked.
    Please help
    Thanks

    *When I rip CD's onto iTunes and then upload them onto my iPod some of them DON'T APPEAR ON THE 'ARTIST' section of my iPod Nano.*
    There are usually two things that contribute to songs not appearing under Artist on the iPod, both due to information either in or missing from the Get Info>Info tab against the song in iTunes. 1) the song has no album name associated with it or 2) the song is marked as part of a compilation.
    If tracks are missing an Album name in the Info tab, this information needs to be filled in. The no album one is a bit quirky as the songs will appear under certain circumstances (for instance I read somewhere that if you have at least two tracks with different album names the rest will appear), however the simplest remedy is just add None or Miscellaneous to all the blanks in place of a title. See this link for more detail: I don't see some of my songs when browsing by artist on my iPod
    Also if the tracks are ticked in the Get Info>Info tab as part of a compilation, they will not appear under Artist on the iPod. Highlight a song in iTunes that you know is not appearing correctly on your iPod. Right click on it and choose Get Info and click the Info tab (alternatively choose Get Info from the File menu), if "Part of a Compilation" is marked untick it and afterwards update your iPod, you should find it now appears as normal. Setting "Compilations" on your iPod main menu prevents you getting lots of single artist entries when you load an album by various artists.

  • I forgot my password and my birthday and email does not recognize. please help me, it happen when I buy my new iphone5s and change the Apple ID of my old iPhone 4.

    i have a new iPhone 5s, it does not recognize my password, when I try to restore it my birthday and email does not recognize, it only happen when I change my old iPhone 4 and change the Apple ID of it. please help me, all my phone now does not recognize my password.

    To change to iCloud ID on your phone you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID then sign in with the new ID.  If you don't know the password for the old ID, and if the old ID is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • PLEASE HELP! Pages Quitting When Opening

    Pages keeps quitting when I am trying to open a document I have been working on for 3 days! Not sure why. I can't get it open anymore. PLEASE HELP!
    I am happy to provide the file if someone can help me.
    I have updated my software and also validated my fonts (these are things that I have researched to see if it would work- but didn't)
    I am really stressing as I need this document tomorrow
    I was even saving the file 3 different names as backups and none will open, yet when I go to open any other files they opens fine.
    It happened when Pages just quit unexpectly and then I couldn't re-open the file again. ARRRRHHHHH!
    PLEASE HELP!

    Have you inserted lots of large (Mb) images?
    Keep these as small in both dimensions and resolution as possible.
    Also keep the amount of effects like shadows, reflections transparency, charts etc low in both the interests of good taste, legibility and speed.
    Peter

  • Please Help! InCopy crashes when I try to export...

    Please help me!
    InCopy crashes when I try to export to PDF. The file I'm working in was originally an InDesign CS3 file that was converted to InDesign CS4 when we upgraded our software. We've run into some BIG PROBLEMS with CS4, and so we've exported our CS4 InDesign files as CS3 .INX files so we can work on them in InDesign CS3.
    I've isolated that the problem is only when I try to export pages that have a large ad that goes through the gutter of the newspaper spread. All other pages PDF fine from InCopy CS3.
    I opened an old CS3 file (that was never converted to CS4), and double checked that I can still export the whole file to PDF including the pages that have ads going through the gutter.
    Is this a bug with CS4 files? Does anyone have any suggestions on how to fix the problem? NOTE: I already tried splitting the box for the ad into 2 separate boxes (one on each page), but InCopy still crashes when I try to export either one of the pages that has content through the gutter.
    Thanks for any help you can give me.
    - Valerie

    I've moved your question to the Adobe ExportPDF forum for that service.

Maybe you are looking for