How to export MS Access database along with schema? - mysql

I have got a database in MS Access format and I want to export it to MySQL. I used this tool to import the database to MySQL successfully. However when I try to do "Reverse Engineer" in MySQL Workbench to draw its schema, all I get is tables without relationhip links. Is there something I am missing?

Relationships can only be drawn for foreign keys. If you don't have foreign keys (e.g. only MYISAM tables) then you won't get any relationship. Try the migration module from MySQL Workbench to see if that gives you more in your target schema (tho no promises). If all fails you have to manually add foreignkeys and thereby getting relationships.

Related

How to seal a database

I have a MySQL database. I want it to be sealed after inserting datas so it can be unsealed by a client later.
So far, I came to that solution: export the database to a dump file, drop it, crypt the file using asymetric key (the client will get the other key).
Is there any better solution for database sealing?

tool for checking mysql relations?

I designed a MYSQL Workbench ERM with many forign keys relations etc.
I noticed that my ERM had some faults, because if I try to generate models automatically with it, it says that I have got some faulty relations.
Now is my question :
Is there any tool for checking these relations or forign keys , because Workbench ERM Designer can't do this, also if I export the script and Import it to a MYSQL Database there is no Error shown

Export part of table definition using phpMyAdmin

Is there a way to export part of MySQL table definition using phpMyAdmin?
I need to transfer 2 columns from one table to other DB, so I expect 2 "ALTER TABLE" SQL commands to be created.
Currently, there is no built in way to do this, but Schema Sync - a MySQL Schema Versioning and Migration Utility can be used:
Schema Sync will generate the SQL necessary to migrate the schema of a source database to a target database (patch script), as well as a the SQL necessary to undo the changes after you apply them (revert script).

Combine several mssql database to one mysql with php

We are handling a data aggregation project by having several microsoft sql server databases combining to one mysql database. all mssql database have the same schema.
The requirements are :
each mssql database can be imported to mysql independently
before being able to import each record to mysql we need to validates each records with a specific createrias via php.
each imported mssql database can be rollbacked. It means even it already imported to mysql, all the mssql database can be removed from the mysql.
we would still like to know where does each record imported to the mysql come from what mssql database.
All import process will be done with PHP .
we have difficulty in many aspects. we don't know what is the best approach to solve our problem.
your help will be highly appreciated.
ps: each mssql database has around 60 tables and each table can have a few hundred thousands .
Don't use PHP as a database administration utility. Any time you build a quick PHP script to transfer records directly from one database to another, you're going to cause yourself a world of hurt when that script becomes required for production operation.
You have a number of problems that you need solved:
You have multiple MSSQL databases with similar if not identical tables.
You have a single MySQL database that you want to merge the data into.
The imported data must be altered in a specific way before being merged.
You want to prevent all duplicate records in your import.
You want to know what database each record originally came from.
The solution?
Analyze the source MSSQL databases and create a merge strategy for them.
Create a database structure on the MySQL database that fits the merge strategy in #1, including all the new key constraints (like unique and foreign keys) required for the consolidation.
At this point you have two options left:
Dump the data from each of the source databases into raw data using your RDBMS administration utility of choice. Alter that data to fit your merge strategy and constraints. Document this, and then merge all of the data into your new database structure.
Use a tool like opendbcopy to map columns from one database to another and run a mass import.
Hope this helps.

MySql database structure - reverse engineer with foreign keys

I have a MySql DB structure with foreign keys, how can I generate a diagram for it with table connections for foreign keys.
I need to clear the DB so have to find the table dependencies thats why I want to generate tables with connections.
There are keys in tables such as KEYFK228141202DDB7295
What is the tool for this?
Tools I know include MySQL Workbench and SchemaSpy. SchemaSpy is not MySQL specific and may be harder to set-up but it generates better graphs IMHO.