Legacy File Schema - Reverse Engineering - database

I'm currently in the process of converting over 20k database tables from Corel Paradox 4.0 format (DOS Based, with a .db extension) to SQL databases, and rather than using off the shelf software, I'm currently looking into using a light scripting language like Python (or Ruby or PHP, but Python is ideal since I'm working on a Windows desktop setup -- although I could boot one of my Linux VM's for development if needed) for me to write a set of code to simply pull all the .db files in a directory and output a set of .sql databases in just one click.
Now while I know PHP has a limited library built to specifically handle Paradox files, when it comes to Python, Ruby, and other languages I haven't had much luck.
My question now is, when it comes to writing a script to convert formats, how do I go about defining the syntax of the file to be inputted? For example, when it comes to .exe, .zip, .msi, and so on, is there a single format/syntax published for developers to follow, and if so, what are the most comprehensive/solid sources to check?
I currently have a copy of Paradox for Windows which I can use to view the fields and tables, but that isn't helping me with my scripts as it only shows a high-level overview.
Thanks very much for any information,

Why do not you want to use already existing software? For example, a quick googling yielded this toolset (I do not have Paradox databases to test, but it seems to compile correctly).

Related

what is difference between installing sqlite3 and making .sqlite file?

I'm trying to learn apollo and following the docs and this documentation using sqlite to show how to connect local database to server.
i didn't install sqlite3 but the .sqlite file is in given source.
Even though it was out of the lecture but i got curious how this works though i didn't install it.
i have searched to find why it works and what is difference between these but i couldn't find it so i reached here to ask question about what are the differences and what is better to use.
Thanks!
SQLite is a library extensively used in different programming languages like python, javascript, php etc. This library is made using C-language which implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. ".sqlite" is a database file which contains all the data stored. This file can be made by executing some code based on syntax of that particular language. For you to work on SQLite, you need to have installed it on your local machine.

Flat file database for CD

I have a .csv file with about 5-8 columns and about 1mil. rows and I would like to have it stored in simple flat file database.
Overall this should be a standalone application (one file with *.exe, installable under Windows). The application would allow basic search on the 5-8 columns. There should be very simple user interface.
This application is to be written on CD and distributed to users so should be fairly simple to administer/use.
Questions:
1) Is there already some software that would allow me to build such a application?
2) If not which program would suit best to build such a application?
I would task a programmer to build such a application if I would have clue as to what program to use (finding programmer based on the best program you would recommend).
Again, very simple application, light weight with no additional unnecessary options, dependencies etc.
My Visual Database (http://myvisualdatabase.com/)
from site:
A simple development environment databases, without the help of
specialists and programming skills, you will create a Windows
application databases. It can be as simple telephone directory and
accounting system in your business.
The result of your work will be a Windows application that does not
require installation and third-party components and the ability to
work directly from USB Flash drive.
This software uses sqlite.
Here you can find example, how to import csv file
http://myvisualdatabase.com/forum/viewtopic.php?id=1448
also for import you can use SQLite Studio

There is a PL/pgSQL free environment to develop for PostgreSQL?

I want to know if there is a free environment to develop in PL/pgSQL.
Writing the code in Notepad++, replacing the function and running it turns the process slow. I'm using pgAdmin(only to replace and run the procedure) at the moment, but this is not what I want.
I know that there is one similar question here, but this is not duplicated. All the tools to develop are paid, I want to know if there is one free.
I am very happy with following environment.
I use a programmer editor like geany or similar and I edit a file with functions - I put related functions to one file - this is similar to modules from other environments.
I don't use a copy to pgAdmin - it is terrible work - and I don't think so pgAdmin is good tool for editing and maintaining more functions - it is good for ad hoc changes. The editor is not strong - it is simply, and you can't use a usual tools like git, cvs, .. More - you cannot to organize a related functions to one entity.
If I have a one or two files, then I have a opened console, and just import a file to postgres via \i command. If I have a more larger and complex project I use a makefiles - so it automatically import only modified and depended files. This is very good and very effective when you have a project with more then one hundred functions.
If you are looking for a debugger, check http://pgfoundry.org/projects/edb-debugger/ that can be included in pgAdmin. I have never seen any other tool that can debug plpgsql, only pgAdmin.
I had similar question and guys recommended me Toad Extension for Eclipse. You can see the discussion here: Development oriented PostgreSQL IDE

Do you know a database written in Perl with DBI interface?

Do you know a database written purely in Perl with DBI interface?
Or what can be used if there is no MySql or Postgresql installed and I want to use Perl only?
Thank you.
Ok, I just wanted something that can be used with Catalyst.
What about SQLite? DBD::SQLite
I believe DBD::CSV is a simple DBD implementation that uses Text::CSV to persist data to CSV files.
That depends greatly on what you consider "database".
If you just want something to store your data, there's a number of Perl databases avialable. Some are listed here: http://www.perl.com/pub/a/2004/09/12/embedded.html
Tie::File
Berkley DB
SQLite
Please note that despite "SQLite is written in C" comments I saw here, the article explicitly states:
Conveniently, the DBI-driver for
SQLite, DBD::SQLite, already contains
the database engine itself as part of
the module - so installing this module
is all that is required to be able to
use SQLite from Perl.
However, NONE of the above is a real database engine, supporting transactions etc..., although some allow SQL-like query language access
I'm not aware of any real database engines implemented in Perl.
Perl rule 34:
If you can imagine it, there's a DBD
module for it ;)
http://search.cpan.org/search?m=module&q=DBD::&s=1
AFAIK there is no database in pure perl that is relational, it's not really economical; you might look in ACME on CPAN.
Essentially you have two choices: a pure perl module that provides a DBD package that wraps around, for example .txt, .csv, or .xml files.
If there is none, you could also implement a BDB/DBM style system of your own using pure perl, much like Ken Thompson did in C with DBM. It however, wouldn't be as complex as having SQL based relational database.
If you expect to use SQL, use an SQL based database.
DBD::DBM is a pure Perl database driver which is part of DBI itself since version 1.42 (April 2004). It can work with a variety of different database formats using the respective modules, e.g. BerkleyDB or SDBM_File (core module).
One needs to combine this with MLDBM to get a usable database (otherwise ony two columns per table are supported).
The documentation of DBD::DBM is quite extensive and provides a good overview of the different options and how to set it up.

Generate Data Change Scripts from VSTS Database Edition

I'm using the GDR release of VSTS Database edition source control the DB and generate deployment scripts. It works pretty well but the problem is that it only seems to handle scripting and deploying the schema. It stops short of handling scripting and deployment of the actual data itself (i.e. the lookup and standing data which also deployed with the DB).
I know it's easy enough to write the deployment scripts by hand, but is this what every one does? Is there a recommended way of deploying data with the VSTS deployment engine? Is there some tooling that help with this - I don't mean a full product like SQLCompare, just something that fills the gap with VSTS DB.
Thanks in advance.
Kaneda
The VSTS: DB best practices blog advocates using post-deployment scripts to insert reference data into temporary tables, then update the target tables based on the delta (ie update x inner join temp where x.something <> temp.something)
There's some suggestions floating around that this might make a powertool, and at least one MVP has written a tool to generate those scripts.
(NB: I haven't tried this - I only just found out about it myself)
Personally I would still stick with RedGate if I had any choice in the matter.
GDR comes with a data comparison engine, but as far as I've been able to tell so far a data comparison can't even be stored in a project (let alone be properly supported by it) - so it's pretty ad-hoc. Unlike a Schema Compare, there is no File \ Save As.
The comparison engine can be automated via DDE but that's automation within the Visual Studio IDE, and not really suitable for some kind of scripted installation process. As much as anything there's no way I could see to specify which tables to include in the comparison (since all you get to do via DDE is open the wizard for the user to select)
Alternatively all the functionality appears to reside in Microsoft.VisualStudio.TeamSystem.DataPackage.dll , but since the API documentation hasn't been written yet (the help doco that comes with GDR is full of errors as it is) it's going to be a bit of a hit-and-miss adventure to work out where to start.
As someone who's used RedGate's SqlCompare, SqlDataCompare and their respective APIs to do this before, much of the GDR functionality seems a bit half-baked to me.
What I will probably do this time round is sync the data with a SSIS package (export to CSV at build time / import from CSV at install time), but I'd far rather be using the SqlDataCompare API (or SqlPackager) right now.

Resources