database

PHP Extensions: SQLite VS SQLite3

Hello, I want to implement SQLite for my next project. I've done some research and I've found that PHP 5+ comes with two standard extenstions, that is: SQLite found here ( php.net/manual/en/book.sqlite.php ) SQLite3 found here ( php.net/manual/en/book.sqlite3.php ) I want to know if number '3' represents the version. If it does, why...

What to do when neither TransactionScope nor nested transactions are supported?

TransactionScope is an amazing feature but too few providers do implement it correctly. I don't want to pass the connection as parameter. ...

async calls inside get accessor - is it good practice?

Hi! I have a window that shows customer infomation. when the window loads, I call LoadCustomer() method from the constructor which loads the customer information from the database asynchorously, which sets the CurrentCustomer property. and then the UI is updated because it is bound to the CurrentCustomer. private void LoadCustomer(...

Weighing High-Volume Database Servers

Hey guys, I suppose this is partially subjective in that it's probably dependent on everyone's interpretation of "high volume", but for the sake of discussion, I'd like to approach this in a hypothetical way. Also, if this is something that should be exclusive to ServerFault, let me know and I'll happily repost there. Obviously there ...

MySQL I want to optimize this further...

So I started off with this query: SELECT * FROM TABLE1 WHERE hash IN (SELECT id FROM temptable); It took forever, so I ran an explain: mysql> explain SELECT * FROM TABLE1 WHERE hash IN (SELECT id FROM temptable); +----+--------------------+-----------------+------+---------------+------+---------+------+------------+-------------+ | ...

Inserting a date into db2

How can I insert a date into db2 in this format: yyyy-mm-dd, using a sql query? ...

Generating diff based on versions

The scenario is that I have a MySQL DB on the server side, whose content is regularly updated/changed and I have 5-10 Linux clients... each of which would have a copy of the DB, and would need to have a significant portion of the DB in memory. I want to be able to get what version the client has, and then send the latest-updated data th...

Delete rows direct in the database but it still display in my asp.net mvc website

I'm developing a website using asp.net mvc 2.0 . I'm using LINQ to SQL for my Model. But I have a problem. When I delete rows direct in the database (by using SQL Server Enterprise Manager, or run query in SQL Query Analyzer), my website still display that rows. It seem LINQ to SQL have automatic cached what it fetched before. How can ...

How to query for strings based on their length

create table dict {id, word varchar2(255)). I store strings of varying lengths within the 'word' field. How do I query for the following cases:- Search all words which are 4 characters in length Search all words which are greater than 4 characters in length Search all words which have 4-8 characters (inclusive) Search all words which ...

Export Data of Sql Compact database (mdf File) to Access or Excel or CSV format

Hi i Have Used Database file for storing Data in my Application. Now I want to take backup of data in Access, Excel or in Any other Format. Thank You.. ...

PostgreSql + Searching Issue for "'" present in string

Here, I have a problem in searching record in Postgresql DB in RoR Application. Name of table :: address_books, name of attributes :: organization_name, federal_tax_id, city, zip , business_name. In search, organization name contain :: Claire's Inc as record. At the time of searching, it does not show the data while we select Claire's I...

dropDestinationDatabase option on Web Deployment Commandline Tool

Ho, I'm trying to get msdeploy commandline tool to copy databases from dev to test. It seems to work except that I want to drop the databases on test and then recreate them -verb:sync -source:dbFullSql="Data Source=DEVSERVER;Initial Catalog=XXX_Application;Integrated Security=true",dropDestinationDatabase=true -dest:dbFullSql="Data So...

How to model a custom type in a relational database?

I'm fairly new to database design, but I understand the fundamentals. I'm creating a relational database and I'd like to do something similar to creating a reusable type or class. For example, let's say I have a Customer table and a Item table. Customer and Item are related by a standard 1-to-many relationship, so Item has a column calle...

Database design: columns with duplicate meaning

maybe the title of the question don't describe my problem very well but here it is : let's say i have a table article that look like this: + title + author . . . + status [choices : ('draft', ..., 'translate')] And let's say in my business process i publish in my web page articles that have [status = 'translate'] Is it a good design...

What's the Attraction of Schemaless Database Systems?

I've been hearing a lot of talk about schema-less (often distributed) database systems like MongoDB, CouchDB, SimpleDB, etc... While I can understand they might be valuable for some purposes, in most of my applications I'm trying to persist objects that have a specific number of fields of a specific type, and I just automatically think ...

How large to make name fields in database?

There's an old question that asks this very thing, but a lot has changed in databases and unspoken standards. I generally live by the rule as to never make a field size text or memo, even if it speeds up the database. Primarily because someone could flood and possibly hack the db if there are no restrictions in the input interface. ...

Reading FOP images from database

Hi, My application generates PDFs using images stored in the EAR. The images are changed about on a monthly basis, and I would like to move them into the database to avoid deployment by every image file change. Unforunately there is a problem: <fo:block> <fo:external-graphic src=”testImage.gif”/> </fo:block> The FOP can ...

Managing Sample Data with VS 2010 Database

I'm using a Database Project in Visual Studio 2010 to manage all of my database code. For my application, we separate the data for each client into their own copy of the database, with a common database to map users to the appropriate database. I'd like to keep several different sample data sets in TFS along with the code and be able t...

Binding multiple textbox controls to database rows.

Hi Guys. I´m trying to store some parameters for my application on a database table. The table contains multiple rows which contains a Key -> Value relationships. On my windows forms program (written in C#) I have multiple controls that should allow the user to interact with the stored configuration on the database. For example, my dat...

Is there a way to autofill Excel cells with data from an Access Database?

Basically I have a lot of historical data, consisting of IPs, Contacts, and various other fields. Originally we kept all this data in an Excel spreadsheet. I recently created an Access Database with this historical data. Now I am wondering if there is any way to use VBA or something else to autofill fields in the Excel spreadsheet using ...