There are a lot of database migration tools available for Ruby, .NET, SQL Server, etc.
Is there anything good for Access/VBA? I've had to roll my own a few times, but I'd really like to offload that burden onto a well-written tool.
The ideal solution would be something like FluentMigrator or RikMigrations with classes or modules that contain DAO code.
When there are only new columns to add personally I tend to do this in the user interface. I have a temporary table in the backend database which is never locked by any users and when creating a new column I add it 1st to this table and double check all the properties are correct. Then when the users are not using the backend database I copy and paste it, then allow users back in.
This means the backend database is unavailable for the shortest period of time and I am not rushed when creating the columns.
Related
So I'm moving from MS Access to MySQL:
In MS Access you can store certain INSERT, DELETE, and UPDATE queries as objects alongside your tables. Thus for anyone who don't understand computers that well, they can click on the objects and automatically run the queries to alter the master table for various business functions.
In MySQL, where and how do you store these queries, I seem to be only able to make tables. When I write a piece of code using the SQL editor, I can only save it to a remote location (such as my local desktop) and not onto the MySQL database, where it's accessible for my coworkers.
If you can't save it onto the server, how would I write a piece of code and execute it within the database that would be easily usable by others.
Thanks
The answer to this question is going to depend on your environment, your users, and your bandwidth to support any given solution. You are gaining a lot by making the switch from Access to MySQL, however you are losing some of the the WYSIWYG features. (e.g., Access forms that can bind directly to your data source.)
There are many approaches:
If your users are more advanced, simply having access to the database using MySQL Workbench may suffice. From there they would have access to run views, stored procedures, or to create their own custom queries.
Another option would be to script your objects using Python and provide a simple gui using TkInter. Python is generally thought of as an easy to use language; with built in suppport for MySQL and TkInter is its "default" interface.
Using the LAMP architecture is another largely popular paradigm using MySQL as the backend database.
There is also nothing stopping you from using Access to link to your MySQL db using MySQL as an external data source.
I hope this provides enough info to help you begin whittling down your options.
My company has an existing framework for online medical data entry. We are now working with some doctors in China who are interested in using this framework, however they have some concerns.
On the technical side, the online data entry forms are written in Racket and saved into a MySQL database on a server in Europe after entry. Their concerns are that in some hospitals, Internet connection might be unstable and thus doctors might lose data that was just entered into a form.
So the question is, is there some possibility to somehow buffer the data offline on the respective doctor's workstation before attempting a save to the MySQL database, in order to reduce the risk of data loss. My first instinct was to answer no, because whatever measures the application might take, it's still a web application, so when the Internet connection breaks, there won't be any possibility on the application side to save the data.
Am I right with my guess or might there be a way of accomplishing this? Another idea was creating a completely new application used for data entry and just send the data to the database when data entry is complete; this is however not feasible for the scope of this project.
Thanks in advance!
You can create a local MySQL database, make all the data from the forms be inserted into this database an then when you're sure you have internet connection you export this data to the remote MySQL database, from a different GUI preferably.
Take a look at this page http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html and check if it helps.
I am developing a web application in which a user can Create a table in data base. I am thinking on taking the attribute names and table description from user and put them into SQL query and execute it. But the drawback is that if this application is installed somewhere else all the db connection parameters have to be changed secondly it will be hard coded. Or is this the approach in software industry?
Another approach I can think of is taking all the information about creating a new table from user and inserting them into one table and have some kind of trigger on this table which creates a new table everytime when insertion is performed into the first table.What would be the SQL Script for such thing if my approach is correct?
I am using SPRING - MVC, Hibernate, MySQL, REST web service
Please correct me if I am thinking in wrong direction. TO be honest I am not clear on how I am going to do this.
Thanks
This is risky, since a database schema with a vague and ever-expanding schema will become difficult to manage. Your problem isn't how to manage the credentials, which you would have to handle securely whether users were creating tables or not. Your problem is why it seems necessary for users to create tables.
Are you building an interface to manage arbitrary databases? Maybe phpmyadmin would give your users everything they need.
Or are you doing something not quite so general purpose and open ended? Perhaps with a sufficiently rich table design, you can give the users what they want without requiring that they build their own tables. What information do users have to put in a table that it looks like they need to build their own?
If you are more specific with your objectives, we could be more helpful.
i have 2 questions when i use access:
i create a form with comboBox and calenders, i want to choose an employee
from combobox and from date and to date and when i click ok i will send these
parameters to a query to return the result in a query (result is the calculation
of it's salary).
i know how to release an access project to be useful to user that can't
access tables and queries only forms.
is there any way to change the access project from release mode to development
one, because supposed that an error occurred, how to solve it without loosing
my data.
Note: i don't have client/server i develop a program and i release it and
give this release to the user, after a specific time this user tell me that
an error occurred, and he need data inserted from this program to database.
i can solve this problems and release another version of program, but the
main problem is how to take all data from the old program to the new one.
-- You can reference form control in a query:
SELECT FROM MyTable
WHERE EmployeeID = Forms!MyForm!cboEmployee
AND SomeDate BETWEEN Forms!MyForm!txtDateStart And Forms!MyForm!txtDateEnd
You could also build an SQL string and use it as the record source for a form or in VBA.
-- Access should be split into front-end (forms, reports, etc) and back-end (data). When you make changes to the front-end, you create a new mde or accde and send that to the users. The data stays on a server in the back-end.
See: http://msdn.microsoft.com/en-us/library/aa167840(v=office.11).aspx
EDIT
From your comments, it seems that each application has a single user, if this is the case, splitting is not essential, but it can still be a good idea. The user will get two databases, one for data and one for forms etc and only the one for forms gets replaced. You will need to include a routine to locate and link the back-end tables.
However, if this is not possible, an mde or accde does not hide the data, you can send your revised copy and include a routine to import from the previous mde/accde.
EDIT 2
There are wizards that will split your database for you and link the tables. Where you find them varies slightly from version to version, but they are under the menu item Database Tools. The only problem with this is that the linked table holds the location for the back-end, which is on your computer, not on your users computer. Linked tables are how you access data in the second database. These act as if there are tables in the first database, except you cannot change them. Unfortunately, linked tables hold the location of the back-end, so this will have to be changed if you are sending it to a users. You can either write code, or show your user how to use the linked table manager. This may lead to confusion and may not be worth the effort for one PC. (See also http://www.alvechurchdata.co.uk/accsplit.htm)
Alternatively, you can split the database on your PC and make all the changes to forms etc that you want, then add some code that will import the tables and other data for the user into your new copy. The user will follow the instructions in your code to import the tables. As an aside, you will find that development is a lot safer on a split database. You should also decompile from time to time, which you can find at http://www.granite.ab.ca/access/decompile.htm.
If you want to protect your code, you can create a compiled version of this new copy, the extension for a compiled Access database is *.accde, for 2007 onward and *.mde for prior versions. This is what I thought you meant by 'i know how to release an access project'.
I'm trying to split a database into two pieces -- a backend that updates automatically, and a front-end that allows searching and adding/editing comments. The data in the source database is pulled together from multiple tables into a pair of queries, and I want to use these queries as the source of the current database.
Access 2007 supports splitting a database into multiple pieces, but not in the way I'm looking for. It keeps the tables in the source database and puts all the forms, queries, reports, and macros into the new database. The tables and queries are already in the back-end, and this new database should just provide a good GUI to the end-user.
Access 2007 also supports linked tables, but these can only use a table as a source, not a query object.
I was thinking that the best way to do this would be to do a SQL query along the lines of
SELECT * FROM SourceQuery IN "C:\Path\To\ExternalDB.accdb";
Is what I'm working towards even possible, and would this be the best way to do it?
Since its still relatively early in the project, rearchitecting the database isn't out of the question, but is something I'd prefer to avoid.
You described the usual Access BE-FE division correctly: only tables in the back-end. I'm aware not all DB programs do it that way, but this is Access and my approach would be to honor the usual division. (And you hardly have a choice in that you can't "link to a query" in Access.)
Reviewing your comment ('There is a specific reason ...'), I think this would possibly mean
adding a few more tables to the back-end, essentially buckets (import-data in ready form; export 1; export 2) that allow all users to get to consistent processed data;
making a small admin FE that sits next to the BE and stores your modules, queries for export, and export routines; and
having some redundant queries on the user FE. This is vexing in my own work. I just try to design sturdy stable "building block" queries in those roles, and keep their number to a minimum.
Hope I'm understanding you correctly, but the most sensible solution would be to link the tables in the backend DB and copy the queries to the UI database. Those queries would still be able to access the uderlying tables (via the linked tables) without issues and would be accessible through normal means to your forms and VBA code.
Is there a particular reason you don't want the queries in the UI database?