database

Lookups in Multi-Tenant Database

I am developing a SaaS application and I am looking for the best way to design lookup tables, taking in consideration: The look-up tables will have predefined data shared among all the tenants Each tenant must have the ability to extend the look-up table with his own data e.g adding a car class not defined I am thinking about adding...

Faster way to import thousands of records from a single txt file into database MySQL?

I have like 50 txt files each with around 8 columns and 80,000 records. I have written a script in Matlab that reads all the files one by one and then puts it into MySQL using a single INSERT statement for each file. However doing so is taking a huge amount of time(even for a single file!). I have also tried using PHPmyAdmin which says t...

Java - saving data in BLOB file

hi there, i want to save a lot of binary data files(pdf, images, office docs...) into one single "blob" file. now i'm not sure what is better, saving stuff with java Serializable and save things to disc or to use a database like sqlite to make things happen. or is there a third, maybe better way? my question is, how well do those method...

Handling race condition in model.save() (Django)

How should one handle a possible race condition in a model's save() method? For example, the following example implements a model with an ordered list of related items. When creating a new Item the current list size is used as the its position. From what I can tell, this can go wrong if multiple Items are created concurrently (will it...

Scalable 'google suggestions'-like system.

I have 100,000 queries, and I need to create a google-like 'Suggestions' system. Much like this I need it to be pretty quick, and if possible allow for some more in-depth options (like sorting, etc.). Can anyone recommend a database system I could use for this that could handle searching through 100k+ queries while still keeping spee...

What programme to use for large database (numbers) later to use for calculation, analysis and graphic?

Currently, I am working on a folder of Excel which consist of database (number) size of 1.34GB 63 files and growing. I can continue to work in Excel but I have to separate one large piece of file into several sub-files which is not very convenience and sometimes confusing when it come to calculation, analysis and graphic. I wonder if th...

Difference between Android Service and Content Provider

I am developing an app and get confused about the idea of Service and Content Provider in Android. In practice, what will be the difference between them? Content Provider is a facade and it defines a way to share data among applications. You many attach a local database to your app or create Content Provider mapped to a universal databa...

How can I find all results with a null foreign key in MySQL?

I have 2 tables... meat and potatoes in MySQL. meat_id is the primary key for the meat table and there is a meat_id in the potatoes table that links the 2 tables. I want to find all rows in the potatoes table that don't have a valid meat_id. Any ideas? ...

mysql - orderby and left outer join issue

When I use left outer join with order by in the below query the query executes infinitely without giving a resultset. However - individually they work fine that is if I change it from left outer join to inner join. But I need all the values from interregen table below. Not understanding what could possibly be the error :( My mysql qu...

Which DB should I use?

Hi there, I am now building an application which should store and handle large amounts of data. So now I'm struggling with the question - which DB should I use. My requirements are: Handle up to ~100,000 insert commands a second (sometimes several ones from different threads). 100,000 is the peak; Most of the time the amount would b...

What is the programme for Data Base Management System?

As above, for calculation, analysis and graph. The data is purely number. How do I create the database table and the calculation/analysis/graph table separately? For example, I might want to create a separate table of "countif" from the database and etc. Please suggest the name of the programme and their pro and cons as well. ...

Serving json documents directly from couchdb

Hi, I'm wondering if serving documents from couchDB directly is an actual typical real world scenario, or if most people use it inside server code (as with traditional databases) and then serve from there ? I find couchDB pretty interesting but wonder how to integrate the database access with normal web scenarios.. there isn't so much...

Linux: MySQL: how to use a mysql databases on a mounted NTFS as mysql database in linux?

hi, i wanna use databases in D:\xampp\mysql\data in my linux mysql without moving it. so i can work on them from both linux and windows here is what i did: # mount -t ntfs -o uid=mysql,gid=mysql,dmask=002,fmask=113 /dev/sda5 /media/public/ # cd /var/lib/mysql # ln /media/public/xampp/mysql/data/my_db -s # chown -R mysql:mysql /var/lib...

PHP MySql query 2 tables that have no common attributes at the same time???

Hello All, I am trying to query 2 tables in a database, each query having nothing to do with each other, other then being on the same page. Query 1 - The first query on the page will retrieve text and images that are found throughout the page from Table A. Query 2 - The second query will retrieve several products with a image, descrip...

Trouble setting up sqlite3 with django! :/

I'm in the settings.py module, and I'm supposed to add the directory to the sqlite database. How do I know where the database is and what the full directory is? I'm using Windows 7. ...

What are the common issues surrounding storage of XML data in a relational databases?

In relation to a discussion started at this question, I've decided to put this up as a community wiki question. The root of the question is, therefore, is it appropriate to store XML data in a relational database? Are there generally better ways to implement the same goal? What database engines provide good support for XML data types (s...

Can CounchDB keep up with massive writes and reads?

I was wondering if CounchDB is able to handle a massive writes and reads to the database. The size of each write and read is small, but the number of writes and reads within a second is a lot. Since the data is changing constantly, can it keep up with the view? Thank you ...

Database design question with message boxes

I have a question and I'm not sure about the best way to design it. Basically, there are users. Each user can have a message box, and each box in turn can have several messages. The problem is, is that there are some special message boxes, including "New," and "Trash." A user is required to have these two boxes. I had some ideas abo...

Access: Names of Indices

Hi, I have a Microsoft Access Database and I need to execute a statement : **DROP INDEX Name ON Installations However, Microsoft Access says that no such index name found. The column "Name" in the Installations table does have an index on it . I know this from the Access GUI . However, I can't use the ACCESS GUI to turn off the index ...

In python, looking for an alternative to Shelve (too slow for large dictionaries).

I am storing a table using python, and I need persistance. Essentially I am storing the table as a dictionary string to numbers. And the whole is stored with shelve self.DB=shelve.open("%s%sMoleculeLibrary.shelve"%(directory,os.sep),writeback=True) I use writeback to true as I found the system tend to be unstable if I don't. So aft...