database

Is there a database modelling library for Java?

Does anyone know of a Java library that provides a useful abstraction for analyzing and manipulating arbitrary relational database schemata? I'm thinking of something that could do things like LibraryClass dbLib = ...; DbSchema schema = dbLib.getSchema("my_schema"); List<DbTable> tables = schema.getTables(); and DbTable myTable = .....

Is writing server log files to a database a good idea?

After reading an article about the subject from O'Reilly, I wanted to ask Stack Overflow for their thoughts on the matter. ...

NHibernate many-to-one and unique constraint violation

Hi all, I have a problem trying to model a many-to-one relationship in NHibernate, where the object on the 'one' side has a unique constraint on a column. The problem is as follows: I have two tables, 'Person' and 'Country'. Each Person has one and only one Country associated with it. A Country can have many Persons (really! :)) and a ...

Read-only Access data source

We have a major VB6 trading application which uses MS Access (Don't ask!) It is always blasting trades into an MS Access database. The rest of the infrastructure here has moved on considerably and I want to read this Access database periodically and copy any new trades into a SQL server database. The SQL and C# needed to do this is tri...

Phone Number Columns in a Database

In the last 3 companies I've worked at, the phone number columns are of type varchar(n). The reason being that they might want to store extensions (ext. 333). But in every case, the "-" characters are stripped out when inserting and updating. I don't understand why the ".ext" characters are okay to store but not the "-" character. Has an...

insert html listbox items from database

how do i insert items into an html listbox from a database? im using asp c#. i cant make the listbox run at server because the application wont work if i do that. so i have to insert values from a database into an html listbox. I just need to display 1 column of data. cheers.. ...

Access Database Replacement

Does anyone know of a drop-in replacement for an access database, ideally open source. A group I work with occasionally is looking for a replacement database where they'll need to change as little actual SQL as possible. Their app is VB6/COM. ...

Differences between SQL and PL-SQL

Can somebody highlight the main differences between PL-SQL and SQL? And which one do you recommend for a newbie who wants to dive into DBA? ...

Migrating from one DBMS to another

Does anyone have any experience migrating from one DBMS to another? If you have done this, why did you do it? Features? Cost? Corporate Directive? At times, I've worked with DBAs who insisted that we not use features specific to a DBMS (for example, CLR Stored Procedures in SQL Server.) The DBAs point is, if we use these features, it ...

Should I store all the text in my database in uppercase or in lowercase?

Which one do you prefer to store text in your database? The original casing of the data, or some kind of normalization. Also, should I enforce this with triggers? or should I preprocess input data with client code? I ask you, because I'm not sure about if there is any difference, besides additional processing time to display data (capit...

Django: How do I model a tree of heterogeneous data types?

I need to store a tree data structure in my database, for which I plan on using django-treebeard or possibly django-mptt. My source of confusion is that each node could be one of three different possible types: root nodes will always be a type A entity, leaf nodes a type C entity, and anything in between will be a type B entity. I woul...

F# Beginner: retrieving an array of data from a server

I'm trying to grab data from a MySQL database. Approach 2 - apply/map style I'm using the MySQL ADO Reference to try to build this system. In particular, the example found at 21.2.3.1.7. (using a pseudo code) let table = build_sequence(query.read) Where query.read returns a row in the table(Or rather, a list of elements that happen...

Is there any standard way of storing vector information in a database?

I want to store a very large amount of vector data on a server and only poll the parts I need at a given point... This shouldn't be a problem. Is there any way to take a vector file like an svg file and import it into a database? I could always write an svg parser to import it into my database, but is there any standard way of doing th...

MySQL inserting data only if table doesn't exist

Using strictly SQL (no PHP or anything else), is it possible to create a table and insert default data into that table only if that table doesn't exist? ...

Open Source Address Scrubber?

I have set of names and addresses that have been entered into and excel spreadsheet, but the problem is that the many people that entered the addresses entered them in many different non-standard formats. I want to scrub the addresses before transferring all of of them to my database. Looking around, all I really found in the way of ad...

How do you export settings from the Database Publishing Wizard?

I'm using the Database Publishing Wizard in VS2008 to push changes to my hosting provider. It doesn't look like those settings go with the project (which seems a little silly to me), but rather they go with the machine. On each new machine that I'd like to publish from I need to go through the process of digging up my database settin...

Resources for Database Sharding and Partitioning

I'm working with a database schema that is running into scalability issues. One of the tables in the schema has grown to around 10 million rows, and I am exploring sharding and partitioning options to allow this schema to scale to much larger datasets (say, 1 billion to 100 billion rows). Our application must also be deployable onto se...

Optimisation: use local files or databases for HTML

This follows on from this question where I was getting a few answers assuming I was using files for storing my HTML templates. Before recently I've always saved 'compiled' templates as html files in a directory (above the root). My templates usually have two types of variable - 'static' variables which are not replaced on every usage bu...

What do I need to know to make a Java application that uses a database?

Since I've started using NetBeans, I've learned of some powerful ways to abstract away the process of creating Java database applications with automatically generated UI, beans bindings, and a bunch of other stuff I only vaguely understand the workings of at the moment (I hate being a newb). Problem is, how do I do the basic stuff I act...

Overnormalization

When would a database design be described as overnormalized? Is this characterization an absolute one? Or is it dependent on the way it is used in the application? Thanks. ...