How do I change database of an entire diagram on Enterprise Architect? - enterprise-architect

Any way to change database property of all tables from a diagram at once? I have one diagram to a MySQL database, now I need to rewrite diagram to Oracle. Is there any way to do this, without need to change tables properties individually ?

The DBMS Options are usually updated at a package level. You can select the package that contains all the tables, Right Click -> Code Engineering -> Reset DBMS Options.
Also note, you can define how the column datatypes are converted by defining maps. To do this, Settings -> Database Datatypes -> Datatype map.

Related

How to relate a column to the row rather than the other way in anylogic

I have created a database in anylogic. Previously, I have related the information in the row to the columnn, i.e. there is a component in the row, and its properties are in the columns, and have put this in a function. Now I want to make the component the column and the properties, but don't know how to make it all relate. Below is the code I've written for the former:
site = selectFrom(parameters) .where(parameters.box_number.eq(boxNumber)) .where(parameters.site.eq(site)) .firstResult(parameters.site);
So box_number is the component and site is one of the properties. With this method, site is a column, but I want it to be a row.
You should use the SELECT WHERE SQL syntax, see https://help.anylogic.com/index.jsp?topic=%2Fcom.anylogic.help%2Fhtml%2Fconnectivity%2Fquerying.html&resultof=%22%73%65%6c%65%63%74%22%20%22%77%68%65%72%65%22%20
You can filter and load data in any format. Also, best use the database query wizard to help:

How do you change a table's schema?

We have a MySQL Workbench project with two tabs (two schemas/two databases).
If we create a table in the first tab, it's attached to the schema
magikweb_dev_igcweb.
If we create a table in the second tab, it's attached to the schema
magikweb_dev_igcweb_archive.
If we copy-paste/duplicate a table from the first tab to the second tab, the resulting table remains in the first schema. How can you change a table's schema?
Each schema is linked with a specific database, so when we use the "Synchronize Model..." feature, it links all the tables properly.
Use the model tab. You can cut out a table from one schema tab and insert it into another.
The cut-and-paste method described in another answer works well for tables with no foreign keys, and for a reasonable number of tables.
An alternative that preserves foreign keys is to export the model as a SQL script, edit it, and then import the new script into a new model.
Using MySQL Workbench v6.3:
File -> Export -> Forward Engineer SQL Script
Carefully edit SQL script. Replace references to one schema with the other, for the tables you want to move. Do this both for CREATE TABLE commands and foreign key references.
File -> New Model
File -> Import -> Reverse Engineer SQL Script
Unfortunately you will then need to recreate any diagrams. But that can be straightforward if you have the original diagram as reference (take a screenshot or export it to PNG or PDF.)
Follow this simple steps (never miss step 4 and 5) :
Open Model Tab
Choose source schema. In my case, I want to copy table users from schema abc_develop_v1 to schema abc_develop_v2 then paste to diagram . So I choose schema abc_develop_v1, right-click table users then Copy 'users'
Go to the targeted schema. In my case is schema abc_develop_v2, right-click then Paste 'users'
Next, copy table users from schema abc_develop_v2. Right-click table users then Copy 'users'
Go to your diagram and Paste 'users'.
That's all. Your table is ready in your diagram with the right schema :-)
Notes: You can double check by double-click on the table in your diagram, and look at the right corner. It will show the Schema name.
I found a less painful way to do this.
Save and backup your diagram and your schema.
Display schema's name before table's names in diagram. This will make the next step easier.
Right-click on the tables which are on the wrong schema, and select "Copy SQL to clipboard". Paste the script in a new SQL window. Repeat for each table you want to migrate.
Edit the script to change the schema name. Watch for any miss in entries, the wrong schema might be a reference at any line. Mine was mydb, which I don't remember creating. Execute the script. Now you have the tables on the right schema.
Synchronize your model. Be sure to check "Update the model" for each missing table, otherwise, the tables will be deleted from the schema :)
Drag'n'drop the newly created tables into the diagram. Then remove the ones which are using the wrong schema. Tip: tables that are not in diagram won't display a dot next to their name.
Optionally, you can delete the faulty schema from the model so this never happens again. Be sure to know what you're doing first!

Is it possible to create table templates in Filemaker?

I'm using Filemaker Pro 12 and I was wondering if there is a way of creating a template for tables. There are a number of fields I'm placing in my tables that are identical utility-fields like modification time-stamp, active/inactive flags, etc. I was hoping there was a way that I could define the skeleton of each table somehow instead of having to manually add these identical fields every time.
If you are using the Advanced version, you can copy&paste fields among tables/files.
Using the regular version, you can import records from your "default" table and specify [New Table...] as the target table. This will recreate the source table's structure in the target file. The source table does not have to contain any records for this to work.
To expand a little bit on michael-hor257k's answer, if you're using FileMaker Pro Advanced, a good practice is to create a "Default" table that has your core utility fields. When you want to make a new table in Manage Database, instead:
Highlight the Default table,
Copy & Paste the table, then
Rename the new table.

Using Select query, nothing merges onto Crystal report

I have a Crystal template that I am modifying in developer because we are changing the datasource from an Access file to our Oracle DB. I created a database field that accurately connects to Oracle and added a select statement that because pulls a field from a particular table
select s.field from table s;
On the right hand side, under database fields, I see my command and can right click and browse the data, which right now returns two values.
I also made a formula field using an Azalea barcode function that calls the values (I think, this is where stuff is going wrong, I guess)
The formula field is
BarcodeC39ASCII({Command.field})
So this should take the data and format it into the barcode, except when I use print preview or print out the report, no data is merged.
I've tested this by creating a new formula field with just the Command.field, and still no data is merged. I imagine there is something really obvious that I am missing and would appreciate any input.
So unless I misunderstood your question, you are changing your datasource from Access DB to Oracle DB, correct? Assuming that the database structure remains the same then all you should need to do is go into Database -> Set Datasource Location and set the datasource location from the Access DB to the Oracle DB and your existing report should work as it did. You might have to map some fields, but that should be the extend of it. Is that what you are trying to do?
Chris

change relationship between tables in crystal reports after creating it

I have created a crystal report and imported 3 tables and also set relationship between them using Standard Report Creation Wizard. Now I want to change relationship between tables. But how can I change it? (e.g. how to start Standard Report Creation Wizard again?)
Database | Database Expert... to
adding and removing tables
changing table names
modifying linkage
creating a Command (a 'raw' SQL statement)
Database | Set Location... to:
change the data source (change from one database instance to another) for main and subreports
see the details of each table's connection
You use the Database Expert to do this. The place where you do this is easy to miss. There's another tab in the Database Expert that lets you view/modify links.
It's here: