database

Transactions for read-only DB access?

There seem to be very different opinions about using transactions for reading from a database. Quote from the DeveloperWorks article Transaction strategies: Models and strategies overview: Why would you need a transaction if you are only reading data? The answer is that you don't. Starting a transaction to perform a read-only ...

Does anyone know of a good library for mapping a person's name to his or her sex?

I am looking for a library or database that can provide guesses about whether a person is male or female based on his or her name or nickname. Something like john => "M", mary => "F", alex => "A", #ambiguous I am looking for something that supports names other than English names (such as Japanese, Indian, etc.). Before I get anoth...

Storage of sparse numerical data (e.g. inverted index) - any conventions?

Is there an accepted way of storing and accessing sparse numerical data (such as a search engine's inverted index / term by document matrix)? An RDBMS seems inappropriate for this kind of data, but it would be good to have it stored in some kind of database (saved to disk, running as a server, etc). Is there an accepted solution for this...

Why so few full database schemas sample online?

It is a bit strange to me about database schemas sample which I think most of the projects will need to design a database for it. but when I try to find sample online, it is really rare (eg. full database schema for Inventory Management, School Management, HumanResource management). I know that each database design is depends on the proj...

django AuditTrail vs Reversion

I am working on an new web app I need to store any changes in database to audit table(s). Purpose of such audit tables is that later on in a real physical audit we can asecertain what happened in a situation, who edited what and what was the state of db at the time of e.g. a complex calculation. So mostly audit table will be written and ...

object expected - jquery

i'm getting an error 'Object expected' for some odd reason due to jquery, and this does not 'submit' the form or enter the data into database. without jquery, the data could be entered into the database. but now it doesn't. i've used jquery mainly for validating asp.net controls. ...

Free desktop client for Oracle?

Which is the best Open Source free client for querying an Oracle database? It may additionally support other databases (MySQL, Postgres etc), since our development environment often requires switching between different databases. ...

What should one map strings to in a database ORM?

Strings are unbounded, but it seems every normal relational database requires that a column declare its maximum length. This seems to be a rather significant discrepancy and I'm curious how typical ORMs handle this. Using a 'text' column type would theoretically give you much more string-like storage, but as I understand it text columns...

Linking / Synchronising SQL DB with MySQL DB

I have a need to access data in a MS SQL database from within in MySQL and would like to know my options. The data is held across various joined tables Ideally I would like to mirror the database schema and data in MySQL so that it can be queried from within Wordpress. The data is hotel information as seen here http://www.vrxstudios.co...

Increasing Windows Mobile 5 Emulator Storage

I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows Mobile 5 emulator, ...

Interaction with a database: JQuery Ajax, Web Services

Hi, I am trying to retrieve values from a database by using JQuery Ajax to call a web service routine. The web service routine is set up properly and returns the value I require, however I'm confused about how the jquery ajax works... I don't know how to retrieve the value $.ajax({ type: 'POST', url: 'myservices.asmx/ge...

How to securely store database connection details

In an application that needs to open a database connection, the username/password details must be sent to the database. What is the most secure way of storing, and using, this data? ...

How to route to the nearest RMI Server?

In continuation to my question How to improve the performance of client server architecture application I have decided to maintain a centralized database and several slave server-database configuration. I plan to use Symmetric DS for replicating between the slave and master database. Each server-database configuration would be installed...

Error when restore sql database from .bak file

When I restore SQL database by using Microsoft SQL Server Management Studio, it fails and give me this message: TITLE: Microsoft SQL Server Management Studio Restore failed for Server 'app1'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.139...

Does 'Select' always order by primary key?

A basic simple question for all of you DBA. When I do a select, is it always guaranteed that my result will be ordered by the primary key, or should I specify it with an 'order by'? I'm using Oracle as my DB. ...

Can there be a database-agnostic SQL query to fetch top N rows?

We want to be able to select top N rows using a SQL Query. The target database could be Oracle or MySQL. Is there an elegant approach to this? (Needless to say, we're dealing with sorted data here.) ...

How do you make the Python Msqldb module use ? in stead of %s for query parameters?

MySqlDb is a fantastic Python module -- but one part is incredibly annoying. Query parameters look like this cursor.execute("select * from Books where isbn=%s", (isbn,)) whereas everywhere else in the known universe (oracle, sqlserver, access, sybase...) they look like this cursor.execute("select * from Books where isbn=?", (isbn,)) ...

Do you create classes to handle "entities" for data driven apps?

I'm a newbie and when messing around with creating database applications I always just created my forms and put all the code and bindings in there. Instead of having arrays and lists that held information I made changes to the database directly. Now that I have evolved a little bit let's say that I sold widgets to customers and kept th...

Efficient checking of possible duplicate entities

I have a requirement to produce a list of possible duplicates before a user saves an entity to the database and warn them of the possible duplicates. There are 7 criteria on which we should check the for duplicates and if at least 3 match we should flag this up to the user. The criteria will all match on ID, so there is no fuzzy string ...

Why doesn't Win32::ODBC find the ODBC.dll under Perl 5.10 and Cygwin?

I'm trying to use Perl ODBC to connect to a Microsoft SQL server. My problem is that Perl 5.10.0 is having a problem using the Win32 ODBC driver. If I run a Perl shell and execute this one line, I get errors. use Win32::ODBC; Can't load '/usr/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Win32/ODBC/ODBC.dll' for module Win32::ODBC: No ...