Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Posts
    5

    Unhappy Unanswered: Oracle Guideline

    Hello,

    Somebody knows where can I find some official documents to normalize my database?. One guideline or something like that.

    For example, the name of the index, tables, fk, pk, tablespaces, ...

    Thanks a lot.

    SRR.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Oracle Guideline

    Originally posted by ser_rom
    Hello,

    Somebody knows where can I find some official documents to normalize my database?. One guideline or something like that.

    For example, the name of the index, tables, fk, pk, tablespaces, ...

    Thanks a lot.

    SRR.
    I'm not clear what you are looking for here. Do you want guidance on HOW to normalise? Or do you want pre-designed documentation forms in which to record your design?

  3. #3
    Join Date
    Dec 2002
    Posts
    5
    Hello and thank you very much for your help.

    I need some documents to format my code SQL. Example:

    How can I call a Foreign key?. FK_...
    And an Index?. IX_....

    I need a document which explain all.

    Thanks a lot.

    SRR.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Originally posted by ser_rom
    Hello and thank you very much for your help.

    I need some documents to format my code SQL. Example:

    How can I call a Foreign key?. FK_...
    And an Index?. IX_....

    I need a document which explain all.

    Thanks a lot.

    SRR.
    You can name them however you like, though of course you should have a standard. Many Oracle designers use Oracle Designer to create databases, and adopt its default naming conventions as standard. These are:
    1) Every table has an "alias" of around 3 characters, e.g. "EMP" for EMPLOYEE, "DPT" for DEPARTMENT.
    2) Primary keys are named EMP_PK, DPT_PK
    3) Foreign keys are named EMP_DPT_FK
    4) Indexes on foreign keys are named EMP_DPT_FK_I
    5) Unique constraints are named EMP_UK1, EMP_UK2

    It seems logical then to name other indexes with a "_I" suffix also, e.g. EMP_SURNAME_I.

    Trigger names are user defined. Again, it seems logical to continue to use table aliases in their names, and to identify the type of trigger in the name, e.g. EMP_BIUR (Before Insert or Update for each Row).

    Package names are user defined. It's quite common to use a "_PKG" suffix. If the package is "about" a table then the name might be e.g. EMP_PKG.

    Procedures within packages are generally named in the form verb_noun e.g. hire_employee, calculate_bonus

    Functions within packages are generally named in the form of a noun representing the return value e.g. department_headcount, total_commission.

    (With very few exceptions, ALL procedures and functions should be in packages).

    Check constraints are often named like EMP_HIRE_DATE_CHK, EMP_SALARY_CHK.

    Have I missed anything?

    I'm sure if you search the internet for "Oracle naming standards" you will find some alternatives - the point is, there is no "official" standard that everyone in the world follows.

Posting Permissions

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