database

How do I fix a "Unable to add data connection. The IVsDataConnectionDialog could not be initialized" error?

I'm getting an error in Visual Studio 2008 anytime I try to create a data connection in the Server Explorer: "Unable to add data connection. The IVsDataConnectionDialog could not be initialized" Also, the existing data connections are disabled and their icon is a red-slash-circle. So far, the only advice I've found is here: http://soci...

Data structure for finding nearby keys with similar bitvalues

I have some data, up to a between a million and a billion records, each which is represented by a bitfield, about 64 bits per key. The bits are independent, you can imagine them basically as random bits. If I have a test key and I want to find all values in my data with the same key, a hash table will spit those out very easily, in O(1)...

average and sum cross query

Hi I ask before, but still any answer....... is it possible with cross query to do this ? (in Access 2007) I have this table: 50 | A1 60 | A1 70 | B1 80 | B1 90 | C1 I need to get this result: A1 ------------------ B1 --------------- C1 sum | avg ----- sum | avg ----- sum | avg 55 | 110 --------- 75 | 130 ------ 90 | 90 I t...

Where do I place Data Layer in iPhone App

In .Net I usually create a separate class library and reference it in my project. This class library does all the select, insert and updates to the database. Or, I put classes or static methods in the App_Code folder. In iPhone Dev, where do I put this data layer in order to have a separation in code and logic. This layer, files, would...

Is there a postgres fuzzy match faster than pg_trgm?

I have a Postgres table with about 5 million records and I want to find the closest match to an input key. I tried using trigrams with the pg_trgm module, but it took roughly 5 seconds per query, which is too slow for my needs. Is there a faster way to do fuzzy match within Postgres? ...

Mysql change column collation and character set of information schema

i want to change column collation and character set of system database information_schema... can anyone give any input on how to do this? is there any special priviledges i need for this ...

using Mysql Query Profiler to know the execution time of the queries and the performance in php script

I would like to use mysql query profiler in the php script. So that after i execute any queries it need to display the execution time of the query. Suggest the best way to use this also share any other scripts like query profiler. ...

database view performance issue

Hello everyone, I am using SQL Server 2008 and I have two tables which are of the same schema and I create a view which union the content of the two tables to provide a single view of "table" to external access. One of the table is read only and the other table contains bulk insert/delete operation (on the other table, I will use bulk ...

Is it true that the paragraph in Tree Menu of MSDN library is store in the database?

Hello guys, I was assigned to develop a website looks similar to MSDN Library. According to MSDN Library, I have sense that their tree menu is updated in the database. They are not fixed like others Javascript tree menu. But I am not sure, I just have doubt, is it true that the paragraph in Tree Menu of MSDN library is store in the dat...

Is it possible to easily detect or predict a Primary Key violation in SQL?

My issue is that I want to run a query to check if the data I am using will be a duplicate of something already in the database, for example I have a Product Code and want to stop the same item being listed multiple times, and this Product Code is the Primary Key. Can I avoid doing this: SELECT ProductCode FROM tblProducts WHERE Product...

Query two tables from different schema

Hi- I have two different schemas in Oracle (say S1, S2). And two tables in those schemas(say S1.Table1, S2.Table2). I want to query these two tables from schema S1. Both S1 and S2 are in different databases. From DB1 - Schema S1, I want to do something like this, select T1.Id from S1.Table1 T1 , S2.Table2 T2 Where T1.Id = T2....

What does SGBD mean?

As I could not find the answer anywhere else: What is SGBD? Is it "Système de Gestion de Bases de Données" (Database management system)? E.g. it is used in responses to these two Stack Overflow questions: http://stackoverflow.com/questions/83050 http://stackoverflow.com/questions/236407 ...

Problem with insert query usjng OCI(c++) in ORACLE

Problem Statement:- I am inserting a record into Oracle if that record is already present(duplicate==>primary key is present) in database i want to update it with new one. Currently to solve this while inserting the record if i get OCI_ERROR then i call OCIErrorGet( (dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,errbuf, (ub4) size...

Entity Framework Loading MultiLevel Associations

I currently have a database that consist of many linked objects. Simplified with less objects: Song => Versions => Info || \/ Data Now I understand that I can eager load all these objects when using db.Song.include("Versions.Data").Include("Versions.Info").ToList(); However, when I just want 1 song wi...

Moving Data from a Grid into a Database

I have the following lookup grid x A B C D A 0 2 1 1 B 2 0 1 1 C 1 1 0 1 D 1 1 1 0 Think of this similar to the travelling salesman with point to point, although the algorithm isn't relevant to this problem. It is More like a lookup from A->B What would be the best way to store in a database, since the time is the same both directions...

Oracle lag between commit and select

Hello, We have an Java workflow application that uses an Oracle database to track its steps and interactions with other services. During a workflow run several insert/update/selects are performed and occasionally the select will not return the updated data, even though the insert/update commit that ran before it completed successfully....

Exporting Excel Data into Oracle Table using VB.NET

I am trying to export an excel file directory into an Oracle table as opposed to looping through the range and executing a lot of insert statements. I would think that there are better ways to accomplish this in .NET but I can't seem to find any other answer besides convert excel to csv & load it using Sql Loader or External Table. Does ...

Castle ActiveRecord - Always updating children, why?

Dear All: Hi! These last two weeks have been my first experience with Castle ActiveRecord, and with the ActiveRecord pattern in general. I'm working on a large system that uses it frequently, and I have been finding some strange SQL transaction issues (such as the one below) as I work on it. I'll give a simplified version of the one ...

Best way to design database tables with interbase?

I am about to start redoing a company database in a proper fashion. Our current database is a mess and has little to no documentation. I was wondering what people recommend to use when designing an Interbase database? Is there some sort of good visual schema designer that will generate the SQL? Is it better to do it all by hand? Basica...

In a site like StackOverflow should the Question and its Votes be separate tables?

I'm making a site like StackOverflow in Rails but I'm not sure if it's necessary for the Votes on a question to be stored in a separate table in the database. Is there any good reason to separate the data? Or could I store the Votes as a single sum in a field of the Questions table? ...