database

Are there any good/automateable dependency management tools for managing application, database & external resources dependencies?

I would like to build an overview/map of as many of our applications dependencies as possible. Analyzing .NET application dependencies is fairly easy using tools such as NDepend (which I love!). But when it comes to external dependencies, such as databases and webservices, I need something better, and preferably something that can be aut...

DB2 load partitioned data in parallel

I have a 10-node DB2 9.5 database, with raw data on each machine (ie node1:/scratch/data/dataset.1 node2:/scratch/data/dataset.2 ... node10:/scratch/data/dataset.10 There is no shared NFS mount - none of my machines could handle all of the datasets combined. each line of a dataset file is a long string of text, column delimited. The fi...

When is referential integrity not appropriate?

I understand the need to have referential integrity for limiting specific values on entry or possibly preventing them from removal upon a request of deletion. However, I am unclear as to a valid use case which would exclude this mechanism from always being used. I guess this would fall into several sub-questions: When is referential i...

Normalizing Human Skin Colors for User Interaction

A while ago I came across this answer that introduced me to the obscure (at least for me) ISO 5218: a standard for representing human sexes (or is it genders? - thanks @Paul). For a pet project I'm working on I need my database schema to store the skin color of a person, and I'm wondering if a similar standard exists. All my life I've h...

MYSQL Searching by Zip Code

I am having a tough time searching by zip, which wasn't a problem before and will most likely be an easy problem for a MySQL / PHP programmer. I have a database full of house listings that I need to search by various fields. I have no problem searching by city, until I search by zip code (which like I said used to work). Anyways here i...

Changing database version in Visual Web Developer 2008

Using Visual Web Developer 2008 which comes with SQL Server 2008 by default. Is there a way to change a SQL2008 database to SQL2005 version from within Visual Web Developer? Cheers ...

What will be the benefits of NHibernate in a data retrieval only scenario?

Hi All, We have been suggested to use NHibernate for our project. But the point is our application will only be retrieving the data from the database so are there any benefits of using NHibernate in this scenario? One more thing, what is the query execution plan in NHIbernate does it support something like prepared statements or the so...

Database Design

This is a general database question, not related to any particular database or programming language. I've done some database work before, but it's generally just been whatever works. This time I want to plan for the future. I have one table that stores a list of spare parts. Name, Part Number, Location etc. I also need to store which d...

Is there any free tool for creating database (mysql prefered) tables from existing html forms automatically?

I got a front-end designer to write tons of html form for me. Is there any free tool for creating database (mysql prefered) tables from existing html forms automatically? Names and datatypes of table fields would be generated based on names and types of form elements. ...

Determine that a database is currently mirroring or not?

Is there a T-SQL script to determine a database is currently mirroring or not? Is there a way to determine its partner? Thank you very much. ...

Where can I find some reference materials on ASP.net database submission forms

I am new to asp.net, looking for a tutorial that will teach me how to make a web registration form with many textboxes, dropdowns etc and submit this information into the database tables on the user pressing the submit button. I've searched but so far come up with nothing. ...

Sage 50 Accounts Database Schema

Hi, I am accessing Sage 50 data via their ODBC Driver but cannot seem to establish if the tables have a unique / primary key. The ODBC.NET Driver does not seem to return any information relating to indexes or key field information. Anyone got any clues? Tim ...

Programatically backing up (and emailing) a full MySQL database via PHP

I need to take a backup of a MySQL database daily, and preferably have it email itself to an email address of my choosing. Is it possible to do this? What is the SQL to generate a backup file? How can I add this file as an "attachment" to the email which is sent? Thanks for the help, I really need to make these backups! I do know how...

MySQL truncation command - unicode characters

Hi all, I am currently trying to adjust the values stored in a table in MySQL. The values stored contain a series of Unicode characters. I need to truncate to 40 bytes worth of storage, but when I try: UPDATE `MYTABLE` SET `MYCOLUMN` = LEFT(`MYCOLUMN`, 40); MySQL is overly helpful and retains 40 characters, rather than 40 bytes. Is t...

Most code-efficient way to handle data stamped as "final" vs. data that may incur changes.

Hi there, I have several models whose records AND associations can have two states that must be persisted. Final, and Draft. Here's a little more detail: If the model is "application form" and the user submits a final application form, then I need to store and be able to retrieve that final application form. If, at a later date, the u...

Check if role consists of particular user in DB?

I am trying to drop user from role in several databases. It is not sure that user can be in same role in all the databases. How can i check if the user is in the role and if it is drop the user from the role. e.g. IF user exists in role BEGIN drop user from role END ...

Country agnostic academic level representation

Hi guys, my product owner came to me with this problem: Our application supports multi-language and is used by users in different countries. OK! On a form the user is asked to supply the academic level of a person. OK! The problem is that academic levels do not exactly match between countries. I suggested we define agnostic levels and...

How to automatically update TableAdapter bound to TextBox

I have a WPF Window with several TextBoxes on it. I have an XSD dataset attached to a SQL server database, and the window is bound to a row from the tableadapter: public partial class PersonForm : Window { public PersonForm(int id) { InitializeComponent(); MyDatasetTableAdapters.personTableAdapter tableAdapter ...

inactive databases

On our company's SQL server, there are a bunch of databases that don't appear to be used. Is there a way to determine the last time someone used a particular db, connected to it, or ran a query against it? ...

Is there a downside to adding numerous indexes to tables?

I am creating a new DB and was wondering if there was any downside to adding numerous indexes to tables that I think may require one. If I create an index but end up not utilizing it will it cause any issues? ...