database

PHP and MS Access Schema

I am using following PHP code to connect to MS Access database: $odb_conn = new COM("ADODB.Connection"); $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path.";"; $odb_conn->open($connstr); How can I retrieve database catalog/metadata from the mdb file? FOUND THE SOLUTION $rs_meta = $odb_conn->OpenSchema(20, array(N...

What is a good OO C++ wrapper for sqlite

I'd like to find a good object oriented C++ (as opposed to C) wrapper for sqlite. What do people recommend? If you have several suggestions please put them in separate replies for voting purposes. Also, please indicate whether you have any experience of the wrapper you are suggesting and how you found it to use. ...

Auto-updating Bags in NHibernate.

I use ASP.Net with NHibernate accessing a Pgsql database. For some of our Objects, we use NHibernate bags, which map to List objects in our application. Sometimes we have issues with needing to refresh the objects through NHibernate when we update anything to do with the lists in the database. <bag name="Objects" inverse="true" lazy="...

SQL Server - Partitioned Tables vs. Clustered Index?

Let's assume you have one massive table with three columns as shown below: [id] INT NOT NULL, [date] SMALLDATETIME NOT NULL, [sales] FLOAT NULL Also assume you are limited to one physical disk and one filegroup (PRIMARY). You expect this table to hold sales for 10,000,000+ ids, across 100's of dates (easily 1B+ records). As with m...

Designing an 'Order' schema in which there are disparate product definition tables

This is a scenario I've seen in multiple places over the years; I'm wondering if anyone else has run across a better solution than I have... My company sells a relatively small number of products, however the products we sell are highly specialized (i.e. in order to select a given product, a significant number of details must be provide...

CouchDB Backups and Cloneing the Database

We're looking at CouchdDB for a CMS-ish application. I know the database is implemented as a set of files in the file system, what I'm looking for are common patterns, best practices and workflow advice surrounding backing up our production database, and, especially, the process of cloning the database for use in development and testing...

How do you Schedule Index Updates in CouchDB

As far as I understand, CouchDB indexes are updated when a view is queried. Assuming there are more reads than writes, isn't this bad for scaling? How would I configure CouchDB to update indexes on writes, or better yet, on a schedule? ...

Is there a Java equivalent for .Net System.Data?

Is there a Java package providing funcionality like the .Net System.Data namespace ? Specificaly the DataSet and Adaptor classes ? ...

How do I avoid a memory leak with LINQ-To-SQL?

I have been having some issues with LINQ-To-SQL around memory usage. I'm using it in a Windows Service to do some processing, and I'm looping through a large amount of data that I'm pulling back from the context. Yes - I know I could do this with a stored procedure but there are reasons why that would be a less than ideal solution. An...

What is the best SQL libary for use in Common Lisp?

Ideally something that will work with Oracle, MS SQL Server, MySQL and Posgress. ...

IsolationLevel.RepeatableRead to prevent duplicates

I'm working on an application that is supposed to create products (like shipping insurance policies) when PayPal Instant Payment Notifications are received. Unfortunately, PayPal sometimes sends duplicate notifications. Furthermore, there is another third-party that is performing web-service updates simultaneously when they get updates...

Open source database design tool

What's your favorite open source database design/modeling tool? I'm looking for one that supports several databases, specially Firebird SQL but can't find one on Google. Even if written in Java :D ...

Flags in a database rows, best practices.

I am asking this out of a curiosity. Basically my question is when you have a database which needs a row entry to have things which act like flags, what is the best practice? A good example of this would be the badges on stack overflow, or the operating system field in bugzilla. Any subset of the flags may be set for a given entry. Usua...

Where do I find a dictionary for password validation?

I am working on a password validation algorithm that needs to check potential passwords against the dictionary. If the password or any part of it can be found in the dictionary, reject it. The function is easy enough, but where do I get the word list? Is there a web service already out there for looking up words? I have poked around ...

Versioning Database Persisted Objects, How would you?

(Not related to versioning the database schema) Applications that interfaces with databases often have domain objects that are composed with data from many tables. Suppose the application were to support versioning, in the sense of CVS, for these domain objects. For some arbitry domain object, how would you design a database schema to ...

How would you implement database updates via email?

I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and stored in the underlying...

Where do the responsibilities of a Db Abstraction in PHP start and end?

In PHP, what is the best practice for laying out the responsibilities of a Db Abstraction Layer? Is OOP a good idea in terms of performance? How much should be generic object code, and how much should be very specific functions? ...

SQL Server and Oracle, which one is better in terms of scalability?

MS SQL Server and Oracle, which one is better in terms of scalability? For example, if the data size reach 500 TB etc. ...

Best practices for consistent and comprehensive address storage in a database

Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database ? To be more specific, I believe at this stage that there are two cases for address storage : you just need to associate an address to a person, a building or any item (the most common case). Then a flat table with t...

Key value pairs in relational database

Does someone have experience with storing key-value pairs in a database? I've been using this type of table: CREATE TABLE key_value_pairs ( itemid varchar(32) NOT NULL, itemkey varchar(32) NOT NULL, itemvalue varchar(32) NOT NULL, CONSTRAINT ct_primarykey PRIMARY KEY(itemid,itemkey) ) Then for...