database

Write/get data from joining table in many-many relation

Hi, is there a way to get or write data to/from joining table in many to many relation? I have two tables joined by third. Question one: How can i GET data from the joining(middle) table, when i'm retrieving data in similar query //table1 is "root" table - containing records related to table3 //table2 is joining/cross table //table3 c...

How can I check if a View exists in a Database?

Hi, I have some SQL code that needs to be executed if a certain View exists in a database. How would I go about checking if the View exists? EDIT: The DBMS being used is Microsoft SQL Server ...

How to measure database performance?

I'm developing a web app that will access and work with large amounts of data in a MySQL database, something like a dictionary/thesaurus. I need to test the performance of the DB as its size increases, so I know how slow each request will be in the future. Any ideas? Like are there specific tools to check DB performance for a particular...

MySQL Unique Indexes design

Thank you one and all for you're answers. I'm learning as I'm going - so I'm learning but still got a long ways to go. For work, we primarily use MySQL for our databases - web development. I have a question concerning unique indexes - when to use them properly and how. I'm sure pretty I understand their purpose - declare a column as a ...

Best way to process a large database?

Background: I have one Access database (.mdb) file, with half a dozen tables in it. This file is ~300MB large, so not huge, but big enough that I want to be efficient. In it, there is one major table, a client table. The other tables store data like consultations made, a few extra many-to-one to one fields, that sort of thing. Task: I...

best way to statistically detect anomalies in data

Hi, our webapp collects huge amount of data about user actions, network business, database load, etc etc etc All data is stored in warehouses and we have quite a lot of interesting views on this data. if something odd happens chances are, it shows up somewhere in the data. However, to manually detect if something out of the ordinary ...

Are nested transactions allowed in MySQL?

Simple doubt, the title says it all. =) ...

Should ibatis domain class be used as javabean?

I have a table category mapped to domain class Category using iBatis. Should I use this class as a JavaBean? The bean for product should have other attributes such as number of products in this category. These attributes are not part of the domain class Category. If i use Category as bean class, is it still relevant? Is it better to prov...

How to change the database - Schema used by Entity Framework (mysql database) ?

I use EntityFramework in a project to connect to a Mysql database. The provider is Devart Dot.connect. This application needs to connect to a database using connexion parameters given by the user at runtime. This includes of course the Mysql Database name. I used the EntityConnectionStringBuiler and EntityConnection classes to build-up...

How to store language tag IDs in databases, as smallint or varchar?

I'm wondering about how to store language tag IDs (e.g. en-US). A quick example: Table l10n ( l10n_id SMALLINT, code VARCHAR(5) ) PK: l10n_id Index on code Table product ( product_id INT, ..language-neutral columns.. ) PK: product_id Table product_l10n ( product_id INT, l10n_id SMALLINT, ..language-specific columns....

MySQL Create table with indexes error

Ok, so I am creating tables in MySQL with indexes and foreign keys. I use MySQL Workbench to create the tables and then have it forward engineer a SQL create script (I do better in a visual DB environment than just writing out the SQL code by hand right away). The problem is many times when I import the sql script into mysql, I get the ...

When to use CouchDB vs RDBMS

I am looking at CouchDB, which has a number of appealing features over relational databases including: intuitive REST/HTTP interface easy replication data stored as documents, rather than normalised tables I appreciate that this is not a mature product so should be adopted with caution, but am wondering whether it is actually a viabl...

Redgate's SQLCompare Schema Comparison Not Removing or Adding Objects Via Command Line

I have a saved SQLCompare project which I use to synchronize my local database with another "master" database. When I run the project via the GUI, everything works fine. However when I run it via the command line, only objects that exist on both sides get synchronized. For example, if a column is added to or removed from a table, that ch...

PostgreSQL: Can one define a session variable with the language and use it in views?

Here's a simplified example of schema: Table l10n ( l10n_id SMALLINT, code VARCHAR(5) ) Table product ( product_id INT, ..language-neutral columns.. ) Table product_l10n ( product_id INT, l10n_id SMALLINT, ..language-specific columns.. ) Querying for products with localized data is done like this: SELECT * FROM product a ...

DB2 performance analysis tools for developers

As a developer using DB2 for the first time, I'm not familiar with what the best database performance analysis tools are for it. I'm wondering what others have found useful in terms of tools that come with DB2, and any third-party tools available for it. e.g. Anything better than others for things like query planning, CPU measureme...

SQL Data Modelling/Mapping Software for 200+ Tables

I'm looking for what I think is called a data modeling program to map out all of our SQL Server tables (200+) into a large, poster-size image. We've put all of our legacy application tables into SQL Server 2005 and my boss is looking for a snazzy way of viewing the data... basically something to say "this is what we maintain". I've see...

Asp.net - Creating 2 linked Drop Down Lists from Database

I have 2 linked database tables (Similar to Country -> State) - how can I dynamically populate 2 drop down lists with these tables such that: If I pick a Country, only the states for that country show up in the second drop down list? Update: There seems to be a solution on this page -> http://stackoverflow.com/questions/936499/populate...

Which pattern does Hibernate follow?

In his book "Patterns of Enterprise Application Architecture", Martin Fowler talks about persistence patterns which are commonly found in software development and particularly in relation to ORMs. Is there a pattern that Hibernate adheres to most closely? ...

Can I store HTML as XML in a Sqlite3 database?

Is it possible to do this? The HTML files in question all conform to: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; EDIT: How would you store a number of HTML pages with sequential IDs associated with them in a database? (Oh, I'm new to databases). EDIT: N...

Multi-Tenant Tag Schema's for Distributed Content Types

There's quite a bit of discussion out there, regarding tag schema's, but I've noticed that most of it focuses on a single content type, such as bookmarks or photos. I'm interested in using tags across multiple features of a multi-tenant business app; one where tags could be related to form fields, documents, photos, configuration sett...