database

How can I get dead lock in this situation?

In my client application I have a method like this (in practice it's more complex, but I've left the main part): public void btnUpdate_Click(...) { ... dataAdapter.Update(...); ... dataAdapter.Fill(...); // here I got exception one time } The exception I found in logs says "Deadlock found when trying to get lock; try restartin...

Are there database testing tools for python (like sqlunit)?

Are there database testing tools for python (like sqlunit)? I want to test the DAL that is built using sqlalchemy ...

ETL Tools and Build Tools

I have familiarities with software automated build tools ( such as Automated Build Studio). Now I am looking at ETL tools. The one thing crosses my mind is that, I can do anything I can do in ETL tools by using a software build tool. ETL tools are tailored for data loading and manipulation for which a lot of scripts are needed in order...

Database Feature Comparison Matrix

Does anyone know of a table or chart that compares the features of SQL Server, SQLite, and MySQL (maybe Oracle too) ? An example of what I'm looking for exists at DEVX, but doesn't include SQL Sever or SQLite ...

querying domino from php

I've been tasked to extract data from a Domino and commit changes to it using PHP or web. I'm really new to Domino. I've been researching and it seems i must use urlcommands but i can't seem to find a way to directly extract/import data from Domino like a regular database. Another research of mine and i realized i need to code inside Des...

Does Invision Power Board v3.0.3 store un-encoded versions of message posts?

Edit: This is an IPB (Invision Power Board) forum, not PHPBB as originally posted. My humble apologies. I'm trying to write a widget that displays a sampling of popular topics in our forum. However, parsing bbcode tags is a bit of a pain. We're using the PEAR BBCodeParser, so handling bbcode tags isn't a problem. But the real issue ...

Hibernate: how do I retrieve my entities from a ScrollableResults?

I do a query that returns a list of entities. How can I retrieve the entities from a ScrollableResults: Session s = ....; Query q = s.createQuery("....") # returns 100000s rows ScrollableResults sr = q.scroll(); sr.scroll(45999); # just a number Employee employee = ??? How do I get an employee in the last line of code ...

Rails foreign key logic

If I am not wrong then Rails has its own foreign key logic implemented using ActiveRecord. Is that to help performance i.e. so that you don't rely on the database for the additional processing logic or make frequent database transactions? Or is it for some other reason? ...

Force postgres dump to use copy rather than INSERTS

Hi, While restoring some database backups I noticed that pg_dump is actually using INSERTS rather than COPY. I am not even specifying -d flag but it's still using INSERTS for every database / table I try to dump which is why restores take hours rather than minutes. According to the pg docs pg_dump should use COPY by default but in my c...

HTML5 DB error callback, how to know the sql request throwing error ?

I use the html5 database in safari like that (simplified code) : createContent : function() { this.database.transaction(function(transaction){ for (var elm in lotOfElm) { transaction.executeSql('INSERT....VALUES (?, ...?)', [elm.att1, elm.att2...], nullDataHandler, errorHandler); } }); }, errorHandler: fun...

Is there any way to observe change in Database table through Hibernate?

In my application, I am storing a small table containing 50 records in a singleton class because the data in this table hardly changes - e.g. the list of countries. Although, the concept is not good, I have to continue with it right now. Is there any solution in Hibernate which observe change in the table and on change, invoke a method...

Am I right that InnoDb is better for frequent concurrent updates and inserts than MyISAM?

Hello, We have a websites with hundreds of visitors every day and tens of thousands queries a day. So, some tables in the database are updated very rarely, some tables are updated few times a minute and some tables are updated ~10 times a seconds. MyISAM uses table-level locking for updates and InnoDb uses row-level locking. So, as I und...

mySQL - Insert into three tables

I recently asked this question. I have a relational database with three tables. The first containts id's that relate to the second. The second contains id's that relate to the third. The third contains the results I am after. Is it possible with a single query to query an id in the first table which g...

Database Change Management using hand generated scripts

My need is fairly basic and I don't want to rebuild the wheel. I like to script my database and have written scripts to update it from one version to the next ie 001-create-tables.sql, 002-alter-column.sql etc. What I want is a simple tool command line or MsBuild that will look at a database see what version the database is at (usin...

mySQL - Prevent double booking

I am trying to work out the best way to stop double 'booking' in my application. I have a table of unique id's each can be sold only once. My current idea is to use a transaction to check if the chosen products are available, if they are then insert into a 'status' column that it is 'reserved' along with inserting a 'time of update' th...

Does Nested Sets model work with article with many categories (many-to-many)?

Hi guys, I've been using the adjacency model for hierarchical data for the longest time and was searching the internet for a more efficient way to traverse trees until I read about Nested Sets yesterday. I liked the idea but have a few doubts............. Now I just wanted to know if it is possible to use the Nested Sets model for many...

City Country State Datebase

I am looking for a good City, Country State database It does not have to be crazy detailed, something that has a good coverage of Cities and their corresponding State,Countries in the world will do it for me. Appreciate if you can point me some links. Thanks ...

Explaining why "Just add another column to the DB" is a bad idea, to non programmers.

I have sales people and bean counters who are trying to sell customizations to clients, which is fine. But when a complex change request comes in that I send back a large estimate for, they get confused. Often they come back at me with "Why can't you just add another column?" which by another, they mean a dozen or so custom columns PER...

How can I delete pairs of matching rows?

I have a table which contains sales order data (order number, product number, sales price, etc.). However, the table is littered with corrections and various other invalid data. One of the main issues is that corrections were entered by adding a new row with a negative total equal to the amount of a previous order. The sales people were...

How do databases deal with data tables that cannot fit in memory?

Suppose you have a really large table, say a few billion unordered rows, and now you want to index it for fast lookups. Or maybe you are going to bulk load it and order it on the disk with a clustered index. Obviously, when you get to a quantity of data this size you have to stop assuming that you can do things like sorting in memory (...