Book a Demo

Author Topic: Adding existing DB to Database builder  (Read 5274 times)

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Adding existing DB to Database builder
« on: March 12, 2015, 01:57:48 pm »
How do I open with, or add to, existing (reverse engineered) database to the (new in v12) database builder?
« Last Edit: March 12, 2015, 01:58:10 pm by skiwi »
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

MMA

  • EA User
  • **
  • Posts: 63
  • Karma: +3/-0
    • View Profile
Re: Adding existing DB to Database builder
« Reply #1 on: March 12, 2015, 03:28:22 pm »
1. Create a package e.g. "MyDatabase" and set the stereotype to "Database".
2. Tagged Values window | Create following tags (3rd button from left) for "MyDatabase":
   tag "DBMS" with value like "SQL Server 2012"
   tag "DefaultOwner" with value like "dbo"
3. Move existing tables into the package
4. Tools | Database Builder

Hope that helps  ;)
« Last Edit: March 12, 2015, 03:29:10 pm by milesma »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Adding existing DB to Database builder
« Reply #2 on: March 12, 2015, 03:45:19 pm »
..Or perhaps an easier way would be to create a new Data Model from a pattern using the Model Wizard dialog, then move your existing tables below the resulting package structure.

- Right-click on a Package in the Project Browser, select Add Model using Wizard.
- Select Database, then select the appropriate data model to create.

You should now have a package structure like:
<<DataModel>> Data Model - [Database Type]
    <<Database>> [Database Type]
        Tables

Move your existing tables below the "Tables" package in this structure.  They should now be accessible from the Database Builder.

MMA

  • EA User
  • **
  • Posts: 63
  • Karma: +3/-0
    • View Profile
Re: Adding existing DB to Database builder
« Reply #3 on: March 12, 2015, 03:53:51 pm »
Aaron's solution is definitely better.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Adding existing DB to Database builder
« Reply #4 on: March 20, 2015, 09:25:03 am »
Thank you both.

Because I have a large repository of reverse-engineered (by EA) DB schema the approach I took was
  • stereotype the outermost containing folder as «DataModel»
  • stereotype the folders containing the table objects where needed as «Database» (sometimes we place different table types in different packages, e.g. reference data, and have packages for differing diagrams)
  • add tagged values "DBMS" and "DefaultOwner" to the «Database» stereotyped package
This avoided any moving or restructuring of the model.
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.