database

Is there any performance reason to use powers of two for field sizes in my database?

A long time ago when I was a young lat I used to do a lot of assembler and optimization programming. Today I mainly find myself building web apps (it's alright too...). However, whenever I create fields for database tables I find myself using values like 16, 32 & 128 for text fields and I try to combine boolean values into SET data field...

Passing parameters between JSPs

Hi. Please bear with me here, I'm a student and new to Java Server Pages. If I'm being a complete idiot, can someone give me a good link to a tutorial on JSP, since I've been unable to find info on this anywhere. Okay, here goes... I'm using Netbeans and trying to pass an object that connects to a database between the pages, otherwi...

Alternatives to Toad

Hello. I'm currently using Toad for my day-to-day work on our databases (queries, updates, small scripts, browsing of db objects, etc.). My question is: since my version of Toad is old and buggy, which are the (possibly free, but not necessarily) alternatives to Toad? The database versions we are using are 10g and 9i. Thanks a lot. ...

Opinions about using memcachedb as a large-scale key-value store

We need to implement a large-scale key-value store (let's say up to 500GB) and BerkeleyDB seemed like it might be a decent option, but we would really like it to be network accessible. This led me to look at memcachedb. I haven't found much on the web where people talk about actual experiences with memcachedb, so my questions are, if you...

What's the best way to strip literal values out of SQL to correctly identify db workload?

Does anyone know of any code or tools that can strip literal values out of SQL statements? The reason for asking is I want to correctly judge the SQL workload in our database and I'm worried I might miss out on bad statements whose resource usage get masked because they are displayed as separate statements. When, in reality, they are p...

Strategies to avoid Hibernate LazyInitializationExceptions

Are there any other ways to avoid LazyInitializationExceptions in a Hibernate web application besides using the OpenSessionInView pattern? Are there any downsides to using OpenSessionInView? ...

How to determine total number of open/active connections in ms sql server 2005

My PHP/MS Sql Server 2005/win 2003 Application occasionally becomes very unresponsive, the memory/cpu usage does not spike. If i try to open any new connection from sql management studio, then the it just hangs at the open connection dialog box. how to deterime the total number of active connections ms sql server 2005 ...

Options for in-process databases under medium trust

I have seen a few different in-process SQL databases for .NET (including one from Microsoft), but either they do not work under medium trust (ASP.NET) or the documentation/websites don't even talk about. What experiences have you had with in-process databases in general, and do you know of any that work under medium trust for ASP.NET? ...

Database Abstraction - supporting multiple syntaxes

In a PHP project I'm working on we need to create some DAL extensions to support multiple database platforms. The main pitfall we have with this is that different platforms have different syntaxes - notable MySQL and MSSQL are quite different. What would be the best solution to this? Here are a couple we've discussed: Class-based SQL ...

Skipping primary key conflicts with SQL copy

I'm new to database development so hopefully this is trivial. I have a large collection of raw data (around 300million rows) with about 10% replicated data. I need to get the data into a database. For the sake of performance I'm trying to use SQL copy. The problem being when I commit the data, primary key exceptions prevent any of the d...

Thoughts on TUDBC

Has anyone used TUDBC? This looks interesting, but I wonder how valuable it would be for me to investigate. I'm curious about anyone's good or bad experience. ...

Database scalability - performance vs. database size

Hi all, I'm creating an app that will have to put at max 32 GB of data into my database. I am using B-tree indexing because the reads will have range queries (like from 0 < time < 1hr). At the beginning (database size = 0GB), I will get 60 and 70 writes per millisecond. After say 5GB, the three databases I've tested (H2, berkeley DB,...

Can I have multiple primary keys in a single table?

Can i have multiple primary keys in a single table? ...

Is Functional to Relational mapping easier than Object to Relational?

Object-relational mapping has been well discussed, including on here. I have experience with a few approaches and the pitfalls and compromises. True resolution seems like it requires changes to the OO or relational models themselves. If using a functional language, does the same problem present itself? It seems to me that these too p...

Is is possible to write MS SQL Server add-in?

Is is possible to write MS SQL Server add-in? I'm thinking of some application integrated with database server available form SQL Server Enterprise Manager. ...

Managing database changes between a Rails and Java project

At a new job I started, we have both a Java application that handles most of the heavy lifting in the core business logic, and we also have a Rails application that of course handles the web interface to this server. Both of these access the same database. Up until now, most of the focus has been on the Java application, and as such, t...

Does a table join break Order By clause in Access Queries ?

Hi all, I have a problem perplexing me to no end. When I run the following query against an access database: SELECT * FROM PreferredSpacer INNER JOIN SpacerThickness ON PreferredSpacer.SpacerTypeID = SpacerThickness.SpacerTypeID ORDER BY PreferredSpacer.UnitTypeID DESC (UnitTypeID field is a text type) The results do not come ...

How would you approach this data processing task?

I have a file containing 250 million website URLs, each with an IP address, page title, country name, server banner (e.g. "Apache"), response time (in ms), number of images and so on. At the moment, these records are in a 25gb flat file. I'm interested in generating various statistics from this file, such as: number of IP addresses re...

Best Approach to Brownfield Database Development in SQL Server 2000/2005

I've recently taken over development on a SQL Server 2000 database that needs some help. We're planning on upgrading it to SQL Server 2005 soon. This database has no audit fields on the tables (CreatedBy, CreatedDate, etc.), no foreign keys, and terrible overall design. There are half a dozen programs that directly access the database...

What SQL query or view will show "dynamic columns"

I have a table of data, and I allow people to add meta data to that table. I give them an interface that allows them to treat it as though they're adding extra columns to the table their data is stored in, but I'm actually storing the data in another table. Data Table DataID Data Meta Table DataID MetaName MetaData So...