Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003

    Unanswered: synonyms versus schemaname variable

    The user's defauly schema is different than the target schema for sql. We are using JDBC.

    I have two options

    1) use Synonyms to point to targetSchemName.ObjectName. Requires no change to code.

    2) Specify schema name in property file, read it in Java and suffix it to Table name in all JDBC SQL stmts in Java.

    What is pros and cons of each approach and what is prefferec.


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    There can be some downside cost to using PUBLIC synonyms.
    1) There is some slight overhead involved with doing recursive I/O.
    2) If you have more than one package installed in the same DB,
    you can run into a problem when both want to use the same PUBLIC synonym to point to "their" object.

  3. #3
    Join Date
    Jul 2003
    how about a non-public synonym?
    why not do that?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Nov 2002
    Desk, slightly south of keyboard
    Go with synonyms, it gives you much more flexibility in the future.

    You could redesign the entire core schema with no noticeable effect on your application through the proper use of synonyms and some forethought into what you are creating now.

    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts