database

Alias table name to facilitate 3 column join table (MySQL or PostgreSQL)

This is a separate question, but it is related to an earlier question: Three Column Join in Rails with Active Scaffold. To sum up: Rails automatically looks for a two column join table, but it doesn't do the same for a three column join table. I've tried the suggestions in the previous question, but it comes down to this: If you have ...

SQL: What does =* mean?

I'm trying to trace some SQL in Microsoft Server. I came across a join that is using a convention unfamiliar to me. What does "=*" mean? WHERE table1.yr =* table2.yr -1 ...

Is InnoDB sorting really THAT slow?

I had all my tables in myISAM but the table level locking was starting to kill me when I had long running update jobs. I converted my primary tables over to InnoDB and now many of my queries are taking over 1 minute to complete where they were nearly instantaneous on myISAM. They are usually stuck in the Sorting result step. Did I do som...

Django data creation and commits

I'm not sure I 100% understand what the database does. If I just have some misconception, please point it out. Let's say I have a function that wants to create 100 new entry in the database with has 100,000 entries. It seems a lot faster when those 100 entries get create and the commit is made after the last entry is created. Now, if ...

MOSS features leave old leaf nodes in Database after retracting Solution

We have noticed that when after retracting a MOSS solution package, we are still left with incorrect leaf entries in the alldocs MOSS database table. This is an issue if for example we rename a feature that deploys the same artifacts - MOSS will then not let us deploy the solution as it thinks these items already exist. Would be interes...

Is there an official name for the many-to-many relationship table in a database schema?

Most of the projects I've worked on have required many-to-many relationships in the database schema. For example, you might have the concept of Users and Groups, and the database might contain a table User, a table Group, and a table UserGroup to relate the two. I'm interested in the conceptual name of the UserGroup table in that examp...

Webapplication - location selection from geo database

Hello, I'm currently modelling the user profile of my current project (in Rails btw). The user should be able to set the country, state and city he lives in. Instead of doing this through simple input fields I'd like to have some - kind of - nested selection boxes. I think of it like this: first select your continent. Then a list with ...

Centralising Data Access: Wrap ORM in Class Library or use a Web Service?

I am trying to centralise the data access within my small company. The data I am wishing to represent in either a class library or a web service will be consumed by ASP.NET web applications (both Web Forms and MVC), ASP.NET desktop applications and Sharepoint (MOSS 2007) web parts. This is all internal stuff, so is there any need to go ...

How do I check if my mysql database causes slow down

I have around 3 websites residing in a server which is being shared with other teams. I have been notified that there is a huge increase in CPU usage and we need to lower it down. I doubt my websites are causing this. I have been using SHOW FULL PROCESSLIST in MySQL and 90% of the time shows queries from other databases. But I think ex...

Joining with subqueries, counting and grouping.

Hello everyone, I have 3 tables, which are each 1:n. an entry in table1 has n entries in table2, and so on. lets call them cars, wheels, and screws for illustration. Screws can be clean(1) or rusty(2) I am joining them together, because I want to count 2 things. First, I want to have rows telling me how many good/bad screws per whee...

Trying to connect to MDF Database without using a trusted connection

Hi, Is there anyway to connect to an MDF file without using a trusted logon? I've gone into management studio and created an account called bob with password bob, given that account full access and also added the account to the database. When i try to connect using that account I get the following error Login in failed for user 'bob'....

Bigtable implementations

I would like to know if there is any fast free/opensource BigTable implementations. ...

Display Email Ruby on Rails

I want to store emails into a database and then have them displayed properly in Ruby on Rails to the user (ideally with a nicely formatted, collapsible header, attachment support, etc). Is there already a good way to do this? Right now, I store the emails to the database as a text, but I am struggling with a good way to display them to...

Customer management / What database is recommend?

Hello! My workmate and I are trainees and we got an exercise to realize a project. We have decided us to create a customer management in Java. Now we have to choose a database. We are able to use Oracle, MySQL, PostgreSQL, HSQLDB and of course other Open Source databases. So, what database is recommend for us? I thought Oracle is too com...

Postgres reverting back

I did some changes to a postgres table and I want to revert it back to a previous state. There is no back up of the database. Is there a way to do it? As in, does postgres take auto snap shots and store it somewhere or the original data is lost forever? ...

delete records from table using another table?

Hello note: to the editors: please edit the title if have a better one :) my question is: I have two tables in my database ----------- | table1 | |----------| | id | |text | =========== ----------- | table2 | |----------| | id | |text | ==========...

Can I create an many to many mapping with Fluent NHibernate with a primary key?

I am trying to implement a post tagging systems into my Blog and decided to attempt to implement the Toxi solution from here: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html. I currently have two POCO classes designed. One for Post and one for Tag public class Post { public int ID { get; set; } ...

[sqlite/C++] Saving to disk an in-memory database

I made a database through sqlite in c++. The db has been created in memory (using the ":memory:" parameter insted of a filename), in order to have a very quick behavior. The database is created by the following lines: sqlite3* mem_database; if((SQLITE_OK == sqlite3_open(":memory:", &mem_database)){ // The db has been correctly cr...

How can I handle an exception in DataSet.Designer.cs?

Hi all, I'm using Visual Studio 2008 along with C# to access a MySql database. To this point I have relied on Visual Studio to create the code for the DataSet, and that seems to have given me a problem. If the database is inaccessible (i.e. not running) it gives a "MySqlException was unhandled", "unable to connect to any of the specifie...

ASP.NET Saving webpage layout in a smart and fast way

Hello! I don't know what i should title this question regarding ASP.NET and saving a webpage layout. I will be referring to BBC just illustrate what i am after. http://news.bbc.co.uk/ The page will have around 10,000-20,000 visitors each day. I have one MS SQL 2008 database and i am programming ASP.NET (C#) 3.5. I am building a magazi...