database

MySQL runtime-generated view

On redesigning a MySQL database I came up with an idea: creating a VIEW which can be altered when a TRIGGER (on UPDATE of other table) runs, using information selected from the INFORMATION_SCHEMA database. Hence we could have a view of whichever columns might be necessary at runtime. Since ALTER TABLE is illegal inside triggers, the set...

How do I speed up deletes from a large database table?

Here's the problem I am trying to solve: I have recently completed a data layer re-design that allows me to load-balance my database across multiple shards. In order to keep shards balanced, I need to be able to migrate data from one shard to another, which involves copying from shard A to shard B, and then deleting the records from sha...

How do I Pull a Single Column of Data out of a Filled DataSet?

How do I pull a single column of data out of a filled dataset? I have a filled dataset object, with a variety of tables. I need to get all of the data that is stored in a particular column in one of the tables, and bind a ComboBox ItemSource to it. (This may require me to pull the data out and make it into a string collection ...) ...

Opening a MS Access database from VB that is being used by another user.

Is there a way to open a MS Access database from VB 6.0 that is being used by another user. I have a service that is updating a .mdb file. I want to monitor this DB by reading some parameters from it periodically. If I try to simply open the DB (which works if the DB is not used) like this: Private Sub Form_Load() Dim CurrentDBFileNam...

Wufoo's Database Schema - How would you design it?

Wufoo is a: HTML form builder that helps you create contact forms, online surveys, and invitations so you can collect the data, registrations and online payments you need without writing a single line of code. How would you approach the database design if building a similar site? Higher level designs (tables and relationships) or ...

What does the term read-repair mean when applied to databases?

I've been evaluating large key-value stores recently and I keep coming acrosss the term 'read-repair' but have no clue what they are talking about. I think it has something to do with transactions but am not sure. Could someone please explain what it is and how it is different from the way traditional databases work? Maybe provide some ...

Log to database instead of log files?

I'm interested in sending all Rails application logging to a database (MySQL or MongoDB) either in addition to or instead of to a log file. There are a few reasons, most of them surround doing things somewhat similar to Google Analytics - basically log file analysis. We already use Google Analytics, but there are a variety of things we...

MySQL: Database Design that is scalable and flexible?

Soon I'm going to build an application that needs to be scalable and flexible. Since I'm not a "MySQL" Guru I'm wondering if someone with experience could give me a couple of recommendations for achieving this application I'm going to build. Which database model structure do you think is the best for scalable and flexible sites? ...

Is there a lightweight, embeddable, key/value database? (something like diet couchdb)

Hello, I was wondering if there was a lightweight, embeddable, key/value database out there. Something like a lightweight Couchdb (RESTful, key/value, etc) where you just send it the key and it responds with appropriate values. Thanks! ...

How to override activerecord's default attribute column associations?

I'm working on a legacy database that is complete non-sense. I have a table called movie that contains columns with names like c00, c01, c02 and so on. The table also uses non-standard primary_keys. So I've created a class called movie like this: class Movie < ActiveRecord::Base set_table_name "movie" set_primary_key "idMovie" ...

Determine string literal escape characters in Ado.net

Given any DbConnection from any Data Provider, is it possible to determine the character or characters used to quote a string literal as well as escape any special characters within the string? I'm also interested in the characters necessary for quoting schema/table/column name identifiers. Using parameters to specify these things is no...

MS Access 03 - muliplte "ifs" in one field of update query's criteria??

Can I run an update query and in one single field run multiple updates like: "joe doe" updated to 334 & "barry davis" updated to 456, etc basically I want to convert the name to number (in my case it would be the employee ID#), and I have about 500 employees so one at a time is a little out of the question. the table is import from exc...

SQL Insert rows from two corresponding comma delimited sets of strings

I would like to take two separate strings of value pairs delimited by commas and insert each pair into a row in the database. For example: X = "1,2,3" Y = "A,B,C" => X | Y --------- 1 | A 2 | ...

How would you model this database relationship?

I'm modeling a database relationship in django, and I'd like to have other opinions. The relationship is kind of a two-to-many relationship. For example, a patient can have two physicians: an attending and a primary. A physician obviously has many patients. The application does need to know which one is which; further, there are cases w...

Display japanese text came from database in php

Recently I worked in a project in where I need to display japanese text which are come from database. I already use meta http-equiv="Content-Type" content="text/html; charset=utf-8" It help to display the static text. But when it come from database it display "??????????" type text. How can I solve this kind of problem? ...

Database cluster and load balancing

What is database clustering? If you allow the same database to be on 2 different servers how do they keep the data between synchronized. And how does this differ from load balancing from a database server perspective? ...

Insert array values into database

I have a form that lists module id and also sub_module_id, for example ADMIN === is parent module ID users=== sub module id here admin appears in the menu and users inside admin now inside the form i have used checkbox like []Admin []Users for parent module ID admin <input id='module_permission[]' onclick=\"selectall()...

Zend Framework. What is the best way to administer your site/app?

When developing for the Zend Framework is it common for developers to have to build a custom backend admin area for each unique app? Or is there a popular 3rd party backend tool people are using to manipulate your app's database? I'm thinking of learning ZF but what stands out is how do you keep an eye on what users are doing with your ...

Person name structure in separate database table

I am wondering when and when not to pull a data structure into a separate database table when it appears in several tables. I have pulled the 12 attribute address structure into a separate table because I have a couple of different entities containing a single address in this format. But how about my 3 attribute person name structure (...

How should I store user-customised parameters in a database?

In this case I am referring specifically to Google Friend Connect - Social Bar parameters. Users can select from various parameters when setting up their SocialBar i.e. skin['BORDER_COLOR'] = '#cccccc'; skin['ENDCAP_BG_COLOR'] = '#e0ecff'; skin['ENDCAP_TEXT_COLOR'] = '#333333'; skin['ENDCAP_LINK_COLOR'] = '#0000cc'; skin['ALTERNATE_BG_C...