database

Is there a rake task for backing up the data in your database?

Is there a rake task for backing up the data in your database? I already have my schema backed up, but I want to make a backup of the data. It's a small MySQL database. ...

Timeout not being honoured in connection string

I have a long running SQL statement that I want to run, and no matter what I put in the "timeout=" clause of my connection string, it always seems to end after 30 seconds. I'm just using SqlHelper.ExecuteNonQuery() to execute it, and letting it take care of opening connections, etc. Is there something else that could be overriding my ti...

Database: What is Multiversion Concurrency Control (MVCC) and who supports it?

Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion Concurrency Control claims to solve this problem. What is it, and what databases support it? updated: these support it (which others?) oracle postgresql ...

What kind of database refactoring tools are there?

I am looking for something to integrate to my CI workflow. I've heard of dbdeploy (http://dbdeploy.com/) but I'm looking for something else. The reason I don't like dbdeploy is I don't want to install java on my server. I would prefer of course that the solution doesn't involve stringing some shell scripts together. ...

When do you use table clusters?

How do you determine when to use table clusters? There are two types, index and hash, to use for different cases. In your experience, have the introduction and use of table clusters paid off? If none of your tables are set up this way, modifying them to use table clusters would add to the complexity of the set up. But would the expected...

SQL Server to MySQL

I have a backup of an SQL Server DB in .bak format which I've successfully managed to restore to a local instance of SQL Server Express. I now want to export both the structure and data in a format that MySQL will accept. The tools that I use for MySQL management typically allow me to import/export .sql files, but unfortunately Microsoft...

Database compare tools

My company has a number of relatively small Access databases (2-5MB) that control our user assisted design tools. Naturally these databases evolve over time as data bugs are found and fixed and as the schema changes to support new features in the tools. Can anyone recommend a database diff tool to compare both the data and schema from ...

Is it possible to use nHibernate with Paradox database?

Is it possible to configure nHibernate to connect to Paradox database (*.db files)? ...

Why is it bad practice to make multiple database connections in one request?

A discussion about Singletons in PHP has me thinking about this issue more and more. Most people instruct that you shouldn't make a bunch of DB connections in one request, and I'm just curious as to what your reasoning is. My first thought is the expense to your script of making that many requests to the DB, but then I counter myself wit...

Simple Object to Database Product

I've been taking a look at some different products for .NET which propose to speed up development time by providing a way for business objects to map seamlessly to an automatically generated database. I've never had a problem writing a data access layer, but I'm wondering if this type of product will really save the time it claims. I als...

Sports Stat SQL Queriable DB

Anyone know of a database for player statistics (preferably covering NFL players and preferably free or very cheap) that will let you run SQL Select queries? ...

Anyone using CouchDB?

I've followed the CouchDB project with interest over the last couple of years, and see it is now an Apache Incubator project. Prior to that, the CouchDB web site was full of do not use for production code type disclaimers, so I'd done no more than keep an eye on it. I'd be interested to know your experiences if you've been using CouchDB ...

Good Free Alternative To MS Access

Consider the need to develop a lightweight desktop DB application on the Microsoft platforms. It could be done fairly easily with MS Access but I'd like to be able to distribute it to others and I don't want to pay for a runtime license. Requirements: easy distribution to others no runtime licensing issues Considerations and Cand...

PHP frameworks for simplifying CRUD

Based on experience which PHP framework makes implementing CRUD operations the easiest so that time can be spent on the more 'interesting' parts of the application? Suggested CodeIgniter Symfony CakePHP ATK Framework ...

Generating database tables from object definitions

I know that there are a few (automatic) ways to create a data access layer to manipulate an existing database (LINQ to SQL, Hibernate, etc...). But I'm getting kind of tired (and I believe that there should be a better way of doing things) of stuff like: Creating/altering tables in Visio Using Visio's "Update Database" to create/alter ...

How to work around unsupported unsigned integer field types in MS SQL?

Trying to make a MySQL-based application support MS SQL, I ran into the following issue: I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative values. MS SQL does not support the unsigned attribute on all integer types, so I have to choo...

How to select an SQL database?

We're living in a golden age of databases, with numerous high quality commercial and free databases. This is great, but the downside is there's not a simple obvious choice for someone who needs a database for his next project. What are the constraints/criteria you use for selecting a database? How well do the various databases you've ...

Get last item in a table - SQL

I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each item given a Batch Ref...

Table Scan vs. Add Index - which is quicker?

I have a table with many millions of rows. I need to find all the rows with a specific column value. That column is not in an index, so a table scan results. But would it be quicker to add an index with the column at the head (prime key following), do the query, then drop the index? I can't add an index permanently as the user is nomin...

SQL Server: Get data for only the past year

I am writing a query in which I have to get the data for only the last year What is the best way to do this SELECT ... From ... WHERE date > '8/27/2007 12:00:00 AM' ????? ...