database

Joining links together in a dictionary

Hi guys, I'm student here, new to python and programming in general. I have a dictionary links which holds a tuple mapped to a number. How can I join the second url in the second tuple together with the urljoin() function? What I'm trying to do is get complete links so I can run a recursive function search() which takes a complete url a...

How to merge existing row with new data in SQLite?

I have a database full of simple note data, with columns for title, due date, priority, and details. There is also a _id column PRIMARY KEY int. Say I have a note in the table already with some data filled and the rest null. I also have a set of data that will fill all those fields. Is there a way that I can only write data to the fi...

Table and column naming conventions when plural and singular forms are odd or the same

In my search I found mostly arguments for whether to use plurality in database naming conventions, and ways to handle it in either case. I have decided I prefer plural table names, so I don't want to argue that. I need to represent an animal's species and genus and so on in a database. The plural and singular form for 'species' are the ...

Good embedded database solution (like SQLite) for .Net

I am looking for file based storage solutions that I can use with a .Net project. THey need to have a sql-like interface for storing and retrieving data. They need to have relatively little overhead and must not require any additional components installed by the end user. I am hopping for a .dll that I can reference and use. Cool poi...

Suitable GUI for sorting rows at database level and/or WYSIWYG level?

Consider an Explorer-like list view with a number of columns. The data is fetched from a database, and the rows can be sorted by clicking the column headers. When you click column A, you expect the fetched data to be sorted by A - at the database level ("ORDER BY" at the selected column). However, sometimes it is desirable to sort the d...

insert into database from Joomla form fields

Dear All, I am beginner to Joomla development, I have created a very simple module, How to create a form of three textfields in it, and then insert textfields data into database /. Any one can help ? ...

Generate encoding String according to creation order.

I need to generate encoding String for each item I inserted into the database. for example: x00001 for the first item x00002 for the sencond item x00003 for the third item The way I chose to do this is counting the rows. Before I insert the third item, I count against the database, I know there're already 2 rows, so the next encoding ...

Graph-structured databases and Php

I want to use a graph database using php. Can you point out some resources on where to get started? Is there any example code / tutorial out there? Or are there any other methods of storing data that relate to each other in totally random/abstract situations? - Very abstract example of the relations needed: John relates to Mary, both ...

MySQL Query - Alternation of WHERE IN

I have a mySQL query which takes 3-4 minutes to be executed. It is a large database. This query uses WHERE IN to find the rows.. So, is there any alternate query/clause/statement for my this query? (shortened and formatted version below) SELECT r.reg_id, r.first_name, r.last_name, r.email, r.country, e.headline, e.industry, pp.photo FR...

Better data-structure design

Currently in my application I have a single table that is giving me a bit of trouble. The issue at hand is I have a value object that is mapped to this table. When the data is returned to me as an array of value objects, I have to then loop through this array and begin my recursion by matching the ParentID to parent ObjectID's. The col...

Database Backup

Scenario i want to take backup from 7 client database to 1 server database. i dont know structure of the db { either server or client db }. both databases are having old data. now i have to make the tool take the backup for that. and should possible to backup old data also[if any updates done on old data.] please help to find the soluti...

zend framework update problem(update multiple rows)

i want to update multiple rows in DB using Zend Framework(Zend_db). i want to add 2 to one field of each row what should i use? im a beginner to ZF. ...

About curse of dimensionality

My question is about this topic I've been reading about a bit. Basically my understanding is that in higher dimensions all points end up being very close to each other. The doubt I have is whether this means that calculating distances the usual way (euclidean for instance) is valid or not. If it were still valid, this would mean that wh...

c# reading integer fields from database, returning empty string when reading integer type field

what is wrong with this code? field="id"; table="MInvMonth"; condition="machine_id=37"; public static String getConditionedField(String field, String table, String condition) try { if (cmd == null) getConnection(); cmd.CommandText = "Select " + field + " from " + table + " where " + condition; SQLiteData...

Synchronising local and remote DB

Hi everyone, I have a general question about DB synchronisation. So, I'm developing a website locally (PHP + MySQL) and I would like to be able to synchronise at least the structure (and maybe the contents) of the two DB when one of the two is changed (normally I would change the local copy). Right now what I'm doing is to use mysqldu...

Ruby on Rails and database associations

Hi to all, I'm new to the Ruby world, and there is something unclear to me in defining associations between models. The question is: where is the association saved? For example, if i create a Customer model by executing: generate model Customer name:string age:integer and then i create an Order model generate model Order descriptio...

Create new table with Wordpress API

I'm trying to create a new plugin to track popular posts based on views and I have everything done and ready to go, but I can't seem to create a new table using the Wordpress API (I can do it with standard PHP or with phpMyAdmin, but I want this plugin to be self-sufficient). I've tried several ways ($wpdb->query, $wpdb->get_results, d...

Switching Ruby on Rails databases

Hi, I'm starting learning Ruby on Rails. So my application, like every Rails app, has three databases: Development Test Production And the question is: how do i switch from a db to another? Thanks ...

Databases Software for Rapid Queries

I'm writing a Comet application that has to keep track of each open connection to the server. I want to write an entry to the database for each connection, and I will have to search the database for the proper connections every time the application receives new data (often), which is why I don't want to start off on the wrong foot by cho...

South migration error: NoMigrations exception for django.contrib.auth

I have been using South on my project for a while, but I recently did a huge amount of development and changed development machine and I think something messed up in the process. The project works fine, but I can't apply migrations. Whenever I try to apply a migration I get the following traceback: danpalmer:pest Dan$ python manage.py m...