database

Use sqlite database from Android app resources

Hi everyone! I've started Android programming recently so bear with me :) I develop an app which has all of its content stored in database.sql file. I've implemented a subclass of SQLiteOpenHelper and added database.sql to my project assets. public class DBHelper extends SQLiteOpenHelper { public DBHelper (Context ctx) { super(ctx, ...

How much is too much data for and XML file, and what are some file based database alternatives?

I'm writing an application that keep track of a library of music, and I need a way to store the list of tracks, albums and other data. Usually for something like this I would use an XML file to save the data. And then I would use an ADO.NET DataTable to manipulate the data. But this program could potentially be saving a large number of d...

Making joomla use innoDB and support transaction

I am new to joomla and have just discovered that it uses myISAM database engine by default. I already searched the joomla forum and extension directory, and even in google but got no useful result. Since joomla is such a big community, I am not sure why nobody seems to have an answer to it. I would like to know if there is any well-kno...

MS Access: searching a column for a star/asterisk

I'm looking for a way to search a column of string datatype which contains a * - the problem is that the star or asterisk is a reserved symbol. The following query doesn't work properly: select * from users where instr(pattern,"*") How can you write an Access query to search a column for an asterisk? ...

Database independence

We are in the early stages for putting a design for a big business application that will have multiple modules. One of the requirements is that the application should be database independent, it should support sql server, oracle, mysql and DB2. From what I have read on the web is that database independence is a very bad idea, it would r...

how to import mysql tables to SOLR

i can never understand how solr works. it just talks about schema files all the way but how do i import content from the database to it with a painless method? i have tried to figure it out by reading their tutorials but it just mess up my head. its written for the Einsteins out there cause apparently there are a lot of people who als...

sychronizing two heterogeneous databases

Hi, I have 2 heterogeneous databases. One in mysql and one in ms sql. I want to keep them in sync. There will be flow of data periodically and information flow will be both ways Anyone got any strategies / approaches to it ?? ...

Many-to-many without intermediate table - is it possible?

I have two entities that usually have one-to-many relationship, but in rare cases should have an opportunity to be many-to-many. I don't want to join the tables with the intermediate table for every query - and i guess there are preferable patterns for "rare many-to-many", - (perhaps with additional table for m-t-m, with duplicate recor...

entity, document and fields corresponds to?

when using solr i often come across these 3 words. what do they correspond to in a database. and while we are on it..does one create an xml file of the whole database with multiple tables and them import it to solr? ...

selecting only values having difference greater than 0 (no negatives and 0)

hi!! i've two columns in mysql db table votes : accept and reject i want to query only the top result after the accept-reject column values table : votes ================= accept | reject ================= 7 | 9 5 | 1 2 | 15 5 | 1 i want just the positive and top value, here 5-1 = 4 actually, i've lo...

How to deal with the 200MB limit of Godaddy database?

Hello. For the 'unlimited plan', Godaddy's web hosting offers 'unlimited' databases (SQL Server & MySQL). However what beats me is the maximum size of each database, which is 200MB. I am not sure if this is a challenge to many out there but it would be for me as the time passes. So what I am looking for is a mechanism to be able to grow...

execute a query right after connexion in cakePHP

I want to execute a mysql query right after connecting to the database to enable utf-8 SET NAMES 'utf-8' COLLATE 'utf8_unicode_ci' and i want an answer either for a specific model all for the whole application ...

VS2008 Web Service Project missing Data Menu and Data Sources

VS2008 Web Service Project missing Data Menu and Data Sources: Simply invisible, Can't find it and just cant add a connection to my database using that wizard. why is it missing? ...

ORM library for automatically mapping foreign keys in Python or Ruby

A frequent task I run into at work is writing scripts against pre-existing databases. Sometimes I'm connecting to Oracle, other times it might be MySql or even sql server. What I would like is a tool which would reverse-engineer the database's tables and foreign keys and allow me to write OO-style scripts against the database. This coul...

Selecting rows connected with set of rows from second table

I have three tables: project (idproject, name) color (idcolor, name) project_has_color (idproject, idcolor) Now I need to select projects connected with set of colors, for example: blue (1), red (2), green (3): SELECT p.idproject, p.name FROM project p, project_has_color c WHERE p.idproject=c.idproject AND c.idcolor IN (1,2,3) gi...

Save Client side time in database

Hi All I am developing an application, i need date and time of the user who is accessing(ie Client's date time), how can i get it to server side........? ...

Accessing remote server database from iphone?

hi, Is there any way to access the remote server database from the iphone? except the way of json or by xml. Can i get sample code? ...

Monitoring /Watching database (activity) programtically

hi guys, i'm just a newbie to database. i was wondering how to monitor a database for changes programatically. Suppose i want to have a .net application which would run after every 100th or(nth) row insertion or row deletion or updation . how can it be achieved? I know little about triggers.they can be used to fire executable. But i hea...

ASP.NET LINQ Database vendors

Will Linq work against any database (i.e) MySQL,Sybase,Oracle,DB2? ...

PHP - How to use arrays for form input and update respective database records

I'm new to PHP... I want to know how to populate a form from mySQL. I'm stumped at the input section where I am trying to allow the user to select choices for radio button /checkbox for each record. thanks in advance for anyone's help! TC Here's a snippet of my code: <?php $mQuantity = 1; $con = mysql_connect("localhost","t","c");...