database

Implementing cross-thread/process queues in Perl

What is the most efficient way of implementing queues to be read by another thread/process? I'm thinking of using a basic MySQL table with polling on sleep. This sounds to be the most scalable (it doesn't even have to be on the same server) but might potentially result in too many queries to the DB. ...

store wget link into a database (php)

Hi, I'm trying to find a solution to download automatically .flv link everyday from a website using wget and to store all the links into a database to stream them in my website. (all in php) How to do that? I don't need to store the files only links into the database. Best regards, ...

Is there a reason to use two databases?

Is it because of size? By the way, what is the limit of the size? ...

Python Twisted and database connections

Hi all, Our projects at work include synchronous applications (short lived) and asynchronous Twisted applications (long lived). We're re-factoring our database and are going to build an API module to decouple all of the SQL in that module. I'd like to create that API so both synchronous and asynchronous applications can use it. For the ...

Is there any function faster than fopen() ??

Suppose there is a site where we are uploading images. Now, when we have to display the album of that particular logged-in user. What we can do is: We save the path of that image in the database and retrieve the image Save only the name(unique) of the image and use fopen() because we save all the uploaded images in a single folder N...

iphone sqlite database paths issue

Hello Every1, i maintain a sqlite db in my iPhone app so, i was wondering how u could persist a single version and updated one. its said that if want to make updates to the db u should copy it to the documents folder on my iPhone simulator the documents folder changes like everytime i open the app if its copied and changes was made ....

Creating a database connection pool.

Need information on creating a connection pool to the database (irrespective of the database) , and how efficient they are? What are the conditions where they can enhance performance. How to create it explicitly? ...

Old unknown database

I got this work assignment from my boss where I shall try to get information from an old database. The thing is, we know nothing about it. We hope it is some known format and not something the developer made himself. It comes standalone with an application (unknown language) and seems to be a mix of file types. In one folder there are, ...

PDO execute problem

I have faced a problem .I want to select all rows by executing this function: public function executeQuery($query,$fetch_mode=null) { $rs = null; if ($stmt = $this->getConnection()->prepare($query)) { if ($this->executePreparedStatement($stmt, $rs,$fetch_mode)) { return $rs; } ...

Edit all views and stored precedures, find and replace?

Is there an easy way to do a find and replace on a string in every view and stored procedure in my SQL Server database. I need to replace something like 'X United Kingdom' with 'X(UK)'. ...

How to find the text field data has \n ?

How to find the text field data has \n in mysql? for ex : field : address :asfalghaln asdgl sdnslbvaslcbn address2 : adsadas phone :2323 How to find the address has \n or not ? in mysql ...

Load ruby on rails template from database

I wonder if there is a way for me to store ruby on rails view files into database store and have that fetched directly from there. The reason is I want to create a CMS with all the user data stored in database, so I would like to have the template stored in database but still retain the whole ActionView mechanism. ...

How can I change database name in mysql ?

How can I change database name in mysql ? My Database name is SPM and I want to change it to spm(small letters) I tried using RENAME DATABASE SPM TO spm; and am getting following error message: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synt...

SSAS - Custom Total

I'm trying to create a cube where the total is taken from an attribute on the fact and not calculated as an aggregate of the children in SSAS 2005. For example Assume I have 10 stores which all had 100 customers visit on a particular day. There was however some overlap where some customer visited multiple stores. The total visitors f...

Empty set while selecting data in MySQL relational database

Hi! I have some relational MySQL database with dozens of tables... My query is 1000 ft long and selects data from almost all the tables... I also have my 'main' table, and all other tables are referring to that one. When I enter one row in my main table and when I create all relations for that row in other tables my query works fine. How...

oci_bind_by_name RETURNING INTO truncates value

When I insert a row into a table with 1000+ entries, and attempt to return the row ID (be it from an autoincrement trigger/seq, or from setting the value manually in the insert statement), I get a truncated value: $db = OCILogon(DATABASE_LOGIN, DATABASE_PASSWORD, DATABASE_NAME); $mysqldate = date('Y/m/d G:i:s'); $db_vid_id = 748; $auth...

Can I use Truecrypt to protect an SQL 2008 database so that only my application can see the data?

I want to distribute an SQL 2008 database to a client and set it up so that the only way to access the data in it is through my application. Can I use Truecrypt for that? Can you think of any other solution? ...

Lua connecting to MySQL

I have a Lua web app. I would like to connect and query my MySQL database. I've googled and etc and have not found a good way to do so from Lua. Any idea how I can connect and query my MySQL from within my Lua web app? Thanks ...

Visio 2003: relationship arrow to connect 2 tables in Database ER diagrams

I am trying to model relationship between 2 tables Orders and OrderDetails. I draw "relationship" arrow from OrderDetails to Orders table with Foreign key OrderID. But in DatabaseProperties for relationship arrow, I get unknown parent and unknown child. How do I connect the 2 tables with relationship arrow properly. ...

Database Locking Problem

Hi All, Pls. we've been getting A LOT of locks on a production database that's recently witnessed substantially increased traffic. We are using IdeaBlade for most of the data access. I got the following trace using Sql Profiler: deadlock victim="process84af28" resource-list keylock hobtid="72057594096451584" dbid="6" objectname=...