database

MySQL: automatic rollback on transaction failure

Is there any way to set MySQL to rollback any transaction on first error/warning automatically? Now if everything goes well, it commits, but on failure it leaves transaction open and on another start of transaction it commits incomplete changes from failed transaction. So i need to rollback automatically those failed transactions.. (I'...

MySQL, C++: Retrieving auto-increment ID

I have a table with an auto-incrementing ID. After inserting a new row, I would like to retrieve the new ID. I found an article that used the MySQL function LAST_INSERT_ID(). The article says to create a new query and submit it. I'm using MySQL Connector C++, Windows XP and Vista, and Visual Studio 9. Here are my questions: Is ...

Cache for large read only database recommendation

I am building site on with Spring, Hibernate and Mysql. The mysql database contains information on coordinates and locations etc, it is never updated only queried. The database contains 15000 rows of coordinates and 48000 rows of coordinate connections. Every time a request is processed, the application needs to read all these coordinate...

Postgresql - one database for everyone, or one-database per customer

I'm working on a web-based business application where each customer will need to have their own data (think basecamphq.com type model) For scalability and ease-of-upgrades, I'd prefer to have a single database where each customer gets a filtered version of the data. The problem is how to guarantee that they stay sandboxed to their own ...

Efficient way to combine results of two database queries.

I have two tables on different servers, and I'd like some help finding an efficient way to combine and match the datasets. Here's an example: From server 1, which holds our stories, I perform a query like: query = """SELECT author_id, title, text FROM stories ORDER BY timestamp_created DESC LIMIT 10 ...

Hierarchical Types in Simple CRUD Database App

I want to build a simple app (probably in MS Access) for a simple small-business database. We have fairly typical entities -- customer, contact, worker, supplier, sub-contractor. These are all variations of some hypothetical parent class, e.g. person. Is it worth it to try to reflect this hierarchy in the tables and forms used by such...

SQL Query problem: How to merge two lists.

I have a base table of Participants and Answers, with the following structure: ParticipantId, BusUnitId, QuestionNum, Answer. In this table, QuestionNum ranges, say, from 1 to 6. I also have two other tables that sort of link QuestionNum to the actual question table, BusUnitQuestions, and ParticipantQuestions. For each QuestionNum, ...

Retrieve data from database

I need to use C# to get data from database(sql) and the data in database is updated every few seconds. So do I have to make a loop or there is a better way to do that? Is it possible that when database is updating, the program can wait until it finishes updating? thx! ...

Updating data from several different sources

I'm in the process of setting up a database with customer information. The database will handle customer data (customer id, address, phonenr etc.) as well as some basic information about which kind of advertisement a specific customer has been subjected to, and how they reacted to it. The data will be maintained both from a central data...

RSS feed publish date-time (GMT) to Unix timestamp format using PHP

How do convert RSS feed publish date-time (GMT) to Unix timestamp using PHP? I need to store the date into my table in a TIMESTAMP data type column. ...

How to Populate ComboBox from access db in C#

I have the next combobox: this.comboBoxProd.Enabled = false; this.comboBoxProd.FormattingEnabled = true; this.comboBoxProd.Items.AddRange(new object[] { "Cameras", "------------", " Digital IXUS 850 IS ", " Digital IXUS 900 Ti ", " Digital IXUS 75 -NEW- ", " Digital...

MySQL foreign key constraint disappearing

This is my table: /* oefenreeks leerplan */ CREATE TABLE leerplan_oefenreeks ( leerplan_oefenreeks_id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, leerplan_id INT NOT NULL, oefenreeks_id INT NOT NULL, plaats INT NOT NULL ); /* fk */ ALTER TABLE leerplan_oefenreeks ADD CONSTRAINT fk_l...

Analysis services with non normalized table

I have a table with several million rows. Each row represents a user session. There is a column called user which is not unique. There can be multiple sessions per user. I want to use Analysis services to get me the additional properties per user. Example: How many users (unique!) had a session longer than x minutes. How is that possible...

How to rollback a database deployment without losing new data?

My company uses virtual machines for our web/app servers. This allows for very easy rollbacks of a deployment if something goes wrong. However, if an app server deployment also requires a database deployment and we have to rollback I'm kind of at a loss. How can you rollback database schema changes without losing data? The only thing...

Can anyone say Stored procedures pros and cons AND Java Stored Procedures pros and con?

Hi! Can anyone say Stored procedures pros and cons AND Java Stored Procedures pros and con? And how to test it. Best regards! ...

Which Table Should be Master and Child in Database Design

I am quickly learning the ins and outs of database design (something that, as of a week ago, was new to me), but I am running across some questions that don't seem immediately obvious, so I was hoping to get some clarification. The question I have right is about foreign keys. As part of my design, I have a Company table. Originally, I...

Diagram a New Database for an ASP.NET Application?

I'm about to create a new application - somewhat like a CRM. I'm thinking it would be best to diagram out all the tables/fields before I begin...but not sure what is the best way to do so? Are there tools in VS? MSSMS? Something else? I want to quickly and thoroughly create the database the application will use for its back-end. ...

EGODatabase does not retain inserted record

Hi Guy! I'm using EGODatabase to process my data. When I tried to insert data into the database which I created with Base and attached to the project, the data that was inserted programmatically will not show up when I restart my app.However the data inserted manually using Base will show up just fine. Following is the code for inserti...

Access Database connect C# local director

I want my connection to the database to be available all the time, so if i move the folder with the project, to an other computer, the connection to be made automaticaly. So, how can i change this connection: this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"C:\\Documents and Settings\\Cristi\\Do" ...

[Qt] How to get rid of OCI.dll dependency when compiling static

Hi, My application accesses an Oracle database through Qt's QSqlDatabase class. I'm compiling Qt as static for the release build, but I can't seem to be able to get rid of OCI.dll dependency. I'm trying to link against oci.lib (as available in Oracle's Instant Client with SDK). Here's my configure line : configure -qt-libjpeg -qt-zl...