database

DataModel for Workflow/Business Process Application

What should be the data model for a work flow application? Currently we are using an Entity Attribute Value based model in SQL Server 2000 with the user having the ability to create dynamic forms (on asp.net), but as the data grows performance is getting down and hard to generate report and worse if too many users concurrently query the ...

MS SQL Server - Bulk Insert Across a Network

I have an application that uses MS SQL Server for which I'll need to do a bulk insert from a file. The sticking point is that the database and my application will be hosted on separate servers. What is the best way to do a bulk insert across a network? Two ideas I'd come up with so far: From the app server, share a directory that th...

Is there any reason for numeric rather than int in T-SQL?

Why would someone use numeric(12, 0) datatype for a simple integer ID column? If you have a reason why this is better than int or bigint I would like to hear it. We are not doing any math on this column, it is simply an ID used for foreign key linking. I am compiling a list of programming errors and performance issues about a product, ...

Can you connect to a MS Access database from Ruby running on a Mac?

I'm pretty sure the answer is "no" but I thought I'd check. Background: I have some legacy data in Access, need to get it into MySQL, which will be the DB server for a Ruby application that uses this legacy data. Data has to be processed and transformed. Access and MySQL schemas are totally different. I want to write a rake task in Ru...

How to add additional information to a many-to-many relation?

I'm writing a program to manage orders and then print them. An order is an object containing the ordering person, the date and the products this person orders. I'd like to add the amount of a certain product one orderer. E.g. 3 eggs, 2 breads. Is there a simpler way doing this with storm (the ORM I'm using) than splitting the order int...

Why should I use document based database instead of relational database?

Why should I use document based database like CouchDB instead of using relational database. Are there any typical kinds of applications or domains where the document based database is more suitable than the relational database? ...

Loading Business Object Hierarchy with One Database Call

Hi, I would like to know what the best practice for populating a business object hierarchy (parent/child/grandchild) structure is from a single database call. I can think of a couple ways to accomplish it off the top of my head such as: left-joining all the relations in my sql statement then use looping and logic to fill the business ...

Joining 3 tables and retrieve all the records from all the tables

I am joining three tables (performing a full outer join) so that I can retrieve all the records from all the tables. Problem that I am facing is with the order in which I join tables. Table Information (1) If I join tables in TABLE1, TABLE2, TABLE3 sequence I get two rows for record with team B and Level 1. SELECT DISTINCT (CAS...

MySQL foreign key to allow NULL?

Hi there, I'm piecing together an image website. The basic schema's pretty simple MySQL, but I'm having some trouble trying to represent possible admin flags associated with an image ("inappropriate", "copyrighted", etc.). My current notion is as follows: tblImages ( imageID INT UNSIGNED NOT NULL AUTO_INCREMENT, ... ); tblImag...

What is the best way to synchronize data between MS Access and MySQL?

Hello, I have an access database on a windows machine, which I must import into mysql on a linux webserver. At the moment the access dabatbase table is exported as a text file, automatically copied with ftp, and then loaded into mysql. Is there a better way to do this, perhaps using an ODBC connection or something else? What is the b...

What database tests should I write so that refactoring database is easy.

Are there any guidelines on writing database tests so that you can refactor database "without fear" while doing evolutionary database design? What aspects of database should be put to test while developing it? Any example would be great.. ...

What are some optimization techniques for MySQL table with 300+ million records?

I am looking at storing some JMX data from JVMs on many servers for about 90 days. This data would be statistics like heap size and thread count. This will mean that one of the tables will have around 388 million records. From this data I am building some graphs so you can compare the stats retrieved from the Mbeans. This means I w...

How to store a list in a db column

I would like to store an object FOO in a database. Lets say FOO contains three integers and a list of "Fruits". The list can have any length, the only thing I know is that the all the fruits allowed are stored in another table. Can I store the fruit list in a column? ...

SQL Server 2000 - Query a Table’s Foreign Key relationships

Nearly identical to http://stackoverflow.com/questions/85978/query-a-tables-foreign-key-relationships, but for SQL Server 2000 For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. ...

How to design a database for unkown amount of 'meta'-data

I want to store certain items in the database with variable amount of properties. For example: An item can have 'url' and 'pdf' property both others do not en instead have 'image' and 'location' properties. So the problem is an some items can have some properties and others a lot. How would you design this database. How to make it se...

Hinky Oracle Connection (TNSNAMES.ora Help)

We recently changed physical DB's, new servers, new locations, same database schema and data and since the change over, whenever we try to connect directly to the DB in our own desktop type applications about half of the time we get this error: SQL*Loader-704: Internal error: ulconnect: OCIServerAttach[0] ORA-12545: Connect failed becau...

Library Database System Design

Hello, I have a library, and I want to migrate it from an old system to a new optimized one. The old library was built using MS Access (mdb files), where each book is a file by itself. Each book consists of two tables, one for chapters titles and the second for contents. There is also one mdb file that contains all books names, pages n...

Best database for small applications and tools

What is the best database for small applications and tools? I used paradox, moved to SQL Server, now I use Blackfish. But are there other small and free databases for small applications and tools. Thanks ...

Blackfish SQL management tools

I started to use Blackfish, but I missed having a good and evolved manager. Is there something already? To help us manage the database and its tables? Thanks ...

Auto refresh data in a .NET application using firebird RDBMS

Hi, I’m developing a .NET application with an auto refresh feature. Every table in my database has a MODIFIED_DATE column that gets updated after each update or insert. At the moment the auto refresh feature will apply to only one table, however it may change in the future. I’m currently considering the following possible solutions: C...