database

Binary Data in MySQL

How do I store binary data in MySQL? ...

Throw Error In MySQL Trigger

If I have a trigger BEFORE UPDATE on a table. How can I throw an error that prevents the update on that table?...

Flat File Databases in PHP

What are your best practices around creating flat file database structures in PHP? A lot of the more mature PHP flat file frameworks I see out there attempt to implement SQL-like query syntax, which is over the top for my purposes in most cases (I would just use a database at that point). Are there any elegant tricks out there to get g...

XSD DataSets and ignoring foreign keys

I have and pretty standard table setup in a current application using the .net XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column for the primary department. This column is a foreign key to my Departments table, where I store the basic department name, id, notes. This i...

How do I version my MS SQL database in SVN?

I've been wanting to get my databases under version control. Does anyone have any advice or recommended articles to get me started? I'll always want to have at least some data in there (as alumb mentions: user types and administrators). And I'll probably often want a large collection of generated test data for performance measurement....

SQLite and XSD

Does anybody know if there is a way to create a SQLite database based on an XSD DataSet? In the past I've just used a basic SQLite manager, but want to fuse things a bit more with my .NET development if possible....

Is there a version control system for database structure changes?

I often run into the following problem. I work on some changes to a project that require new tables or columns in the database. I make the database modifications and continue my work. Usually, I remember to write down the changes so that they can be replicated on the live system. However, I don't always remember what I've changed and I ...

.NET Migrations Engine

I was once under the belief that Microsoft was working on an official, ruby-like, Migration framework. However, I haven't been able to find any additional information (or even the original source of my belief). Does anyone know any information about an official migration framework? or possibly an open source one? ...

cx_Oracle - How do I access Oracle from Python?

How do I get started? ...

cx_Oracle - what is the best way to iterate over a result set?

There are several ways, what is the best one? ...

Swap unique indexed column values in database.

I have a database table and one of the fields (not primary key) is having unique index on it. Now I want to swap values under this column for two rows. How could this be done? Two hack I know are: Delete both rows and re-insert them Update rows with some other value and swap and then update to actual value. But I don't want to go for...

Connect PHP to an AS/400

I've got an upcoming project wherein I will need to connect our website (PHP5/Apache 1.3/OpenBSD 4.1) to our back-end system running on a iSeries with OS400 V5R3 so that I can access some tables stored there. I've done some checking around but am running into some roadblocks. From what I've seen the DB2 extensions and DB2 software from ...

Embedded Database for .net that can run off a network

I was (and still am) looking for an embedded database to be used in a .net (c#) application. The caveat: The Application (or at least the database) is stored on a Network drive, but only used by 1 user at a time. Now, my first idea was SQL Server Compact edition. That is really nicely integreated, but it can not run off a network. Fire...

VFP .NET OLEdb provider does not work in Win 64-Bits. Help

I wrote a windows service using VB that read some legacy data from Visual Foxpro Databases to be inserted in SQL 2005. The problem is this use to run fine in Windows server 2003 32-Bits, but the client recently moved to Windows 2003 64-Bits and now the service won't work. I'm getting a message the the VFP .NET OLEdb provider is not found...

Object Oriented vs Relational Databases

Objects oriented databases seem like a really cool idea to me, no need to worry about mapping your domain model to your database model, no messing around with sql or ORM tools. The way I understand it, relational DBs offer some advantages when there is massive amounts of data, and searching an indexing need to be done. To my mind 99% of...

Editing database records by multiple users

I have designed database tables (normalised, on an MS SQL server) and created a standalone windows front end for an application that will be used by a handful of users to add and edit information. We will add a web interface to allow searching accross our production area at a later date. I am concerned that if two users start editing the...

How do I connect to a database and loop over a recordset in C#?

What's the simplest way to connect and query a database for a set of records in C#? ...

How does database indexing work?

Given that indexing is so important as your dataset increases in size, can someone explain how indexing works at a database agnostic level? For information on queries to index a field, check out http://stackoverflow.com/questions/1156/how-do-i-index-a-database-field...

How do I index a database field

Hopefully, I can get answers for each database server. For an outline of how indexing works check out: http://stackoverflow.com/questions/1108/how-does-database-indexing-work...

How big can a MySQL database get before performance starts to degrade.

At what point does a MySQL database start to lose performance? Does physical database size matter? Do number of records matter? Is any performance degradation linear or exponential? Ive got (what I believe to be) a large database, almost 2GB and about 15M records. Should I be cleaning this out, or am I OK for another few years? ...