Saturday, June 15, 2013

How to add Sequence Generator to a table in Oracle SQL Developer Data Modeler


Nowadays, most of the database design will use a running sequence number as the table's Primary Key instead of a code column, especially for compound key to reduce the complexity to reference to the table.

Thus, this post will show how to define a Sequence Generator for a table in Oracle SQL Developer Data Modeler.

Assumed that a table already created, with a number type column as the PK shown below.
table with PK is number type


Steps:
1. Open the Table Properties
    a) R-click on the table > properties OR d-click on the table
    b) Click on Columns node.
table properties

2. Open the Column Properties for the PK
    a) d-click on selected column
column properties for PK

2. Configure for auto increment and sequence generator.
    a) in General node, check Auto Increment
    b) in Auto Increment node, enter Sequence Name
    c) click OK


Done!

8 comments:

  1. Hello . I don't seem to find out the dialogs you have mentioned .

    I am using version 3.2.20.09 Build MAIN-09.87 of sql developer

    Appreciate your help

    ReplyDelete
    Replies
    1. Hi Melvin,
      I guess you are not using Oracle SQL Developer Data Modeler.
      It is different software from Oracle.
      Please refer here for more details about Oracle SQL Developer Data Modeler.

      Delete
  2. Just what I was looking for. Thanks

    ReplyDelete
  3. In 2000, two children swimming behind a family houseboat on Utah's Lake Powell drowned after losing consciousness when a portable generator beneath a swim deck produced dangerous fumes. Once again, poorly planned placement of a consumer-use generator was cited as the primary cause of the tragedy.visit

    ReplyDelete
  4. It has fully emerged to crown Singapore's southern shores and undoubtedly placed her on the global map of residential landmarks. I still scored the more points than I ever have in a season for GS. I think you would be hard pressed to find somebody with the same consistency I have had over the years so I am happy with that. best generator for travel trailer

    ReplyDelete
  5. I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing. best generator for travel trailer

    ReplyDelete
  6. Corner workplaces and the upper administration's lodges are completely entrusted with terrific arrangement tables that are typically rectangular or L-molded.GE APPLIANCE REPAIR & SERVICE IN SANTA BARBARA

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...