SDMW Identifier Name ConversionThis is a featured page

We will use the following convention when converting identifier (table, column, view, procedure,.. ) names in the next release of the SQL Developer Migration Workbench (SDMW 1.5). Many of these conventions are currently being used in the current release (SDMW 1.2.1).
But they have been enhanced after receiving input from customers (Trevor, Greg)

The difference in the next release will be.
  1. Identifiers with invalid first characters have the char "A" pre pended to the front. In the current release A replaced the first character. Thereby saving the naming convention of the original
  2. Invalid characters in identifiers are replaced with underscores. But no more than 1 underscore in a row will be used, to save space.Also and underscore will not be placed at the start or end of an identifier
  3. Identifiers are truncated to 30 bytes not 30 characters.
  4. Identifiers which match keywords/reserve words will have an underscore appended to them

Collisions/Duplicate Names
If an identifier clashes with another identifier (2 table names with the same name) for whatever reason, the second identifier will be renamed.
"_<number>" will be appended to the name after making sure that the entire lenght of the new name is less than 30 bytes long.
Example:
2 SQL Server tables.
  • thisisaverlongtablenamelongerthanoraclecanhandle1
  • thisisaverlongtablenamelongerthanoraclecanhandle1
Converted to
  • THISISAVERLONGTABLENAMELONGERT
  • THISISAVERLONGTABLENAMELONGE_1

If there where 11 similar names, the11th table would be converted to
  • THISISAVERLONGTABLENAMELONG_10

Examples

  • Identifier length must be less than 30 bytes
  • singlebyte chars :thisidentifiernameiswaytoolongonly30bytesallowedinoracle
      • converted to : THISIDENTIFIERNAMEISWAYTOOLONG
    • mulitbyte chars: üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
      • converted to: ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
  • We remove quotes and square brakets as our current conversion does not allow for case sensitive migration of identifiers
    • "tablename"'
      • converted to: TABLENAME
    • [Organisation Details by Date]
      • converted to: ORGANISATION_DETAILS_BY_DATE
  • The first character must be an alpha character from your character set,not a number #$...
    • 01 Booking Data'
      • converted to: A01_BOOKING_DATA
  • The remaining characters must be an alphanumeric character from your character set but can also be '_', '$', '#'
    • "T - This Appn Detail - MAIN TABLE"
      • converted to:T_THIS_APPN_DETAIL_MAIN_TABLE
    • "Net Rate _twin share_"
      • converted to:NET_RATE_TWIN_SHARE_
    • "A _ B"
      • converted to: A_B
    • "££table££Name££"
      • TABLE_NAME
  • Reserved words cannot be used as identifier names
    • SELECT
      • converted to: SELECT_
  • Identifier names not allowed to start with "SYS_"
    • SYS_tablename
      • converted to: SIS_TABLENAME



dermoton
dermoton
Latest page update: made by dermoton , Dec 7 2007, 7:22 AM EST (about this update About This Update dermoton Edited by dermoton

93 words added
5 words deleted

view changes

- complete history)
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)