Loading an existing database into WWW SQL Designer? - sql

I've used WWW SQL Designer several times to design databases for applications. I'm now in charge of working on an application with a lot of tables (100+ mysql tables) and I would love to be able to look at the relations between tables in a manner similar to what WWW SQL Designer provides. It seems that it comes with the provisions to hook up to a database and provide a diagram of its structure, but I've not yet been able to figure out exactly how one would do that.

I know this is really old stuff, but I found the solution (if people are looking for it) : you have to edit the file backend/php-mysql/index.php and fill the connection settings. All you need is then to click on Import From DB, and then Load with the name of your database.
function setup_import() {
define("SERVER","localhost");
define("USER","");
define("PASSWORD","");
define("DB","information_schema");
}

http://code.google.com/p/database-diagram/
This takes a SQL structure (SQL dump) and shows a diagram :)

Can you just export the sql query that builds your existing tables, and run that in WWW SQL Designer? Most database management software has that option...

Looking at the interface of the designer, I guess that when you run it on your own PHP/MySQL server, you should be able to import existing database with "Import from DB" button in Save/Load dialog.

You could use VISIO to import the database, it will diagram it for you.

btw, have you tried SchemaBank? They are web-based and support MySQL fairly well. It eats your sql dump and generates the tables and relationships for you.

Related

SQL Database running to other computers

I have question about Entity Framework projects or ADO.NET.
How can other users use my project without import SQL database? Is there any method to automatically create database/tables?
Could you please give hints or reference article or something like that.
Thanks,
How can other users use my project without import SQL database?
If you have a project that is just starting a good choise is to use Code First. In this case every developer can use a local database.
Is there any method to automatically create database/tables?
Here comes the good part of Code first - the database will be generated for you. Another thing that helps a lot, in my opinion, is the seeding of test data - Use Code First Migrations to Seed the Database.
Further reading: Migrations
You can use enbedded dbs like derby,h2 etc.

Moving from Microsoft Access 2007 to Sql Server 2005

I have MS Access 2007 Databases and VBA modules associated with it.
I Now want to upgrade my project so as to use Sql Server 2005 and Vb.net using visual studio.net.
Can any one suggest Complete details on the transfer without much hassle or data loss.?
Thanks In Advance
Per RBarry's answer...the data migration to SQL Server is easy using the SQL Server Migration wizard. Then you will have a working microsoft access application (probably but maybe it will require polishing and tweaking).
To convert the front end (ui) to vb.net there might be a converter but even if there is one you would likely have to do a lot of it manually anyway. So you treat the access version like a prototype and you start building your app in vb.net by hand.
Seth
Start with the Ms-Access SSMA site: http://www.microsoft.com/sqlserver/2005/en/us/migration-access.aspx
I am not aware of a migration guide specifically for Access -> SqlSever, however, there is a very extensive Oracle -> SqlServer Migration Guide that you could easily cherry-pick for a project plan.
I use SQL Server to import data from Access databases. Be aware that it won't import your keys or relationships- you'll need to recreate those.
Your VBA code is specific to Access. You'll need to rewrite it in VB.NET.
The Access queries are probably going to cause you the most trouble. Simple ones can be converted with the Upsizing Wizard, but the more complex ones will have to be rewritten in SQL.
Also note SQL Server objects follow different naming conventions. An Access table is typically prefixed with tbl, SQL tables typically aren't named with a prefix.

Automatically Generate SQL from existing MS Access table

I've just designed a large database by playing around in MS Access. Now that I'm happy with the design, I need to be able to generate this same database (tables, relationships, etc.) from code.
Rather than hand-writing the SQL CREATE statements (which will be long, tedious, and error-prone process), I was wondering whether there was a shortcut. I seem to recall from my limited exposure to MySql that I was able to export an entire database as an SQL statement that can then be run in order to regenerate that database.
Do you know of a way to do this in MS Access, either through the GUI, or programmatically?
I just found and tried out this tool: jet-tool. It seems to work well for Access 2010.
For free for 30 days (then $30) you can give DBWScript a go, looks like its what you are asking for, although not in native Access GUI or programmatically
The quick and dirty, easy, perfectly legitimate way to do this is just copy the .mdb file. Empty out the data if you need to - usually there are static tables that are handy to leave populated, however.
I use a free utility called MDB Viewer Plus (http://www.alexnolan.net/software/mdb_viewer_plus.htm).
Launch it, open your db, then select your table.
On top menu, select "Table > Generate SQL - CREATE".
I don't know what tools you have on your development machine, so this may or may not be helpful.
You can easily transfer your Access database to Microsoft SQL Server using the Upsizing Wizard.
The express edition of SQL Server is available for free > here.
You will also want to get the free Management Studio Express.
Using these free graphical-based tools you can easily generate the SQL statements to re-create the database. You will have the Create statements you are looking for and they will be placed in a text file.
The Bullzip is very good to this. Very simple. See bullzip Access to MySQL for example
It is possible export any tables to SQL or migrate automatically.
Access to MySQL is a small program that will convert Microsoft Access Databases to MySQL.
Wizard interface.
Transfer data directly from one server to another.
Create a dump file.
Select tables to transfer.
Select fields to transfer.
Transfer password protected databases.
Supports both shared security and user-level security.
Optional transfer of indexes.
Optional transfer of records.
Optional transfer of default values in field definitions.
Identifies and transfers auto number field types.
Command line interface.
Easy install, uninstall and upgrade.
The thing that you're mentioning in MySQL is sql dumping. Very useful feature. If you want to migrate the database to mysql, here's a helpful article.
http://www.kitebird.com/articles/access-migrate.html#TOC_4
I have been using for years a tool called database.net from https://fishcodelib.com/Database.htm
I generally use it on client's site as a portable version of SSMS (drop and run), but it can handle a multitude of RDBMSes, including Access.
Connect to your mdb/accdb, right click any table, choose SCRIPT AS, Create, and you're done.
If you right click Tables header, you can select multiple tables to generate, but I think it's a feature of the paid version.
I have no acquaintance with them, just a happy client.
I found an easy way to go:
Export-> ODBC Database
and then retrieve the SQL form there (e.g via pgadmin on postgres)
Compare'Em
http://home.gci.net/~mike-noel/CompareEM-LITE/CompareEM.htm
The free version creates VBA while the $10 pro version gives you DDL statements.

How do I edit a text field (or ntext) in SQL Server 2000 or 2005 using the GUI?

Is there a way to do this with SQL Server tools?
If not, is there a 3rd party tool that does this?
There doesn't seem to be a good way to edit longer text columns in the SQL Server Managers for SQL Server 2000 or 2005. While SQL Server Manager is really not for editing data in your db, what other tool does Microsoft provide that would normally allow you to do this? Every other field is pretty easy to edit, except long text fields. In Access, you could hit shift-f2 and it would pop up a nice dialog to edit your text in.
alt text http://techinterview.org/edit.png
Generally, SQL Management Studio is an administrative tool for your database and not meant for data entry other than a quick edit here or there. Generally you would script the data or it would be entered by an application that uses the database for persistence.
(Although I have pointed Access to my SQL Server DB for a better quick and dirty UI.)
This may fight your bill - SQL LOB Editor.
The other option you might want to look at is EMS SQL Studio for SQL Server.
Marc
If you are specifically after a nice big multi-line edit dialogs, then yes you definitely need to look outside of the Microsoft SSMS line of tools. They don't support it.
This is just stupid. Enterprise Manager for SQL Server 2000 handled multiline text just fine. Just silly to go backward and loose functionality that was pre-existing. Not like it is rocket science to reproduce formatted text. Someone really dropped the ball on this one.
In the Management Console, isn't it possible to do an "Open Table" context-menu action and then edit the data from there?
I totally recommend DBVisualizer. The nice thing about it is, it supports a long list of databases and generic all JDBC Drivers (since it is written in Java). You can browse your various databases, change data and explore schema in nice graphs. It comes as a free and a personal edition for 149 $ and is totally worth it! Look at this matrix for a comparison.
You'll be able to edit text and ntext in SQL Server 2000, 2005 and surly for upcoming versions as well.
If I had to make the edits only occasionally I would probably use SQL Query Analyzer and just script the UPDATE command.
If that was too inconvenient I would next look at linking to the database in Access, and to really quick and dirty ease of use I would just use an AutoForm to generate a UI for the table. If you don't have Access I believe OpenOffice Base can connect through ODBC and has similar form building functionality.

Importing data to MySQL from MS SQL

I want to import data from MS SQL Server, run it through some sort of regexp to filter out stuff, and import it into MySQL. I then, for each query, wish to display a relevant image from a third database. What would be the easiest way to do this, importing and linking wise?
Thank you.
Clarification: It is a php application to filter data from another database, and then for each record show an associated image from a 3rd database. It is from scratch...
You can try the MySQL Migration Toolkit.
http://dev.mysql.com/downloads/gui-tools/5.0.html
Now archived at http://downloads.mysql.com/archives.php?p=mysql-migration-toolkit
use SQL Management Studio (or Enterprise Manager depending on version) with the SQL Server import wizerd to get it into MS SQL.
From there you can export it to Mysql using the MySQL connector drivers.
As for as displaying an image from a third database, that is completely up to the code you have written in your application.
I would use the Microsoft SQL Server Data Publishing Wizard (free). You can use it to script your entire database (including insert statements.) You'll have to edit this script a little bit probably to get it to run in MySQL. Now you just have a regex problem. You can try:
Manipulating the data in MS SQL via a query, or from code (using regex) the transfer.
Running your regexes on the script file itself, maybe try some macros, find and replace, etc.
Manipulating the data in MySQL via a query, or from code (using regex) after the transfer.