database

Ways around ActiveRecord connection pool

I'm writing an Adhearsion component that uses ActiveRecord. The problem is that the component may be running for several minutes (the length of a call). During that time the component has an ActiveRecord object as an instance variable. This object uses up one database connection from the connection pool. Depending on the number of caller...

many to many select query

I'm trying to write code to pull a list of product items from a SQL Server database an display the results on a webpage. A requirement of the project is that a list of categories is displayed at the right hand side of the page as a list of checkboxes (all categories selected by default) and a user can uncheck categories and re-query th...

Many-to-many link table design : two foreign keys only or an additional primary key?

Hello experts, this is undoubtedly a newbie question, but I haven't been able to find a satisfactory answer. When creating a link table for many-to-many relationships, is it better to create a unique id or only use two foreign keys of the respective tables (compound key?). Looking at different diagrams of the Northwind database for exam...

Webservices with song recognition

Hi I would like to make an app which uses Webservices to recognize the song/melody of given wav file. Is there some avaible webservices? Or maybe there are some databases and I need to make my own. sorry if question does not fit the SQ. ...

What is a good, lightweight database to use for a small F# winforms project?

I have a project I'm thinking of doing in F#, but I'm still very new to the language. I'll need a simple database, hopefully something easy to use. Would sqlite work well for an F# project? Other suggestions? ...

SQL: Redundant WHERE clause specifying column is > 0?

Help me understand this: In the sqlzoo tutorial for question 3a ("Find the largest country in each region"), why does attaching 'AND population > 0' to the nested SELECT statement make this correct? ...

Can you use your own database for Facebook applications?

I am completely new to Facebook application development, but I've got a straight-forward question. I am looking to create an application that would collect a few pieces of information from a user and store it into a database. I wanted to host the database on a MySQL server, but I didn't know how Facebook works with application informat...

Any way of "multiplying" MySql records to test a large db on server?

I have several mysql tables in a database. Currently I am doing finishing test on my website, and one is to test a heavy db to see how much this affects performance (searching). The website is a classifieds website. It would take a very long time for me to insert one classified at a time to reach a significant nr. So I wonder, is ther...

Opening one MySQL connection vs opening and closing a lot of connections?

I have a > x20000 loop in php that checks if an entry exists in a MySQL database, I open & close the connection for every entry in the loop, but a friend told me that's crazy and I should open one connection, run the loop and then close it, but he didn't tell me why. Could someone explain me the benefits of reusing the same connection? i...

Can't get database mirror witness to connect

I have successfully configured a principal and mirror with SQL Server 2008 and Windows Server 2008 R2 64bit. However, when I attempt to add a witness (SQL Server 2005 and Windows Server 2003 32bit) to the mix, I get the following errors in the event log of the primary: EventID 1456 "The ALTER DATABASE command could not be sent to the rem...

Looking at SQL Server Execution logs ideally verbose for debugging

Hi, I was wondering if there is any way to check the execution logs of SQL server. I am not talking about the proprietary transactions logs or the error logs. But just the recently executed logs in a verbose fashion for debugging. For example, I have a web application that calls stored procedures, passes in parameters and populates gri...

files needed for deploying delphi 2010 with ms access 2007 and ado for database connection

dear all delphi programmer, i'm building database application with delphi 2010 in which the database i used is ms access 2007 and ado as the connection.... then, i used installshield express from delphi 7 to do the deployment.... i open the setup file in my computer and there is no problem with it..but when i open the setup file in cli...

How to create dynamic reports in PHP with Mysql

I'm designed a web application in PHP which conects to a database in MySQL, this application will generate reports according to the fields that a user choose from diferents tables, there is a way to do this, preference by code. (and software tool is acceptable too) ...

2 tables 1 view ASP MVC

Hi, I need some help. What I am trying to do is show the locations of a device belonging to a specific project. On the projects page I have a button which goes to the google map. For projects I have a Projects model and controller. Ive got 2 tables, a table containing the location of a device and a project table. I want to display all...

Concept for archiving huge database

I need a concept how I can archive all data in D-Pool which is older than one year. At the moment we have more than 3 million records in the D-Pool. Because of this huge data foundation searches and filters over the database takes quite too long, because most searches are done over the whole D-Pool data, but in most cases I am only inter...

How to store old version of ID String in Database Design?

I am building a small database for a lab. We have some rules to make a ID String for every Item, so i do not want to store it in my database. The problem is that some times changes in data, for example the person response for that item changed, causes the chang of ID String. But i can not correct it for printed docs. How can i store the...

What is Couch DB? What is the process of search & retrieval of data from Couch DB?

What is Couch DB? How is that different from conventional oracle DB? What is the process of search & retrieval of data from Couch DB? ...

Float or decimal for prices?

Hi all, Which type (Float or decimal) is best used to store prices in a database? Thx ...

GWT and notifyAll() (java.lang.Object)

I'm making a call to the database. The result must be used for a subit form. So i want to wait until the result from the DB comes. For that i need a synchronization. My idea was to use the Object.notifyAll() from java.lang, but GWT doesn't support this. Is there any equivalent method in GWT for the notifyAll()? edit1: I'm using gxt Form...

Django subquery using QuerySet

Is it possible to perform a subquery on a QuerySet using another QuerySet? For example: q = Something.objects.filter(x=y).extra(where=query_set2) ...