How to filter objects with an "author" from a set of "authors"(Users)?
The "objects" are Posts, having an author(ForeignKey to User).
I'm pretty much stumped by this, so I'd appreciate help with it. Of course one could go about this the naive way, by manually filtering them, but that would hit the database real hard. Thanks anyway.
E...
Should I save this information in the database?
For example when users sign up or log in?
...
The company I work for is trying to switch a product that uses flat file format to a database format. We're handling pretty big files of data (ie: 25GB/file) and they get updated really quick. We need to run queries that randomly access the data, as well as in a contiguous way. I am trying to convince them of the advantages of using a da...
Imagine a classifieds website, a very simple one where users don't have login details.
I have this currently with MySql as a db. The db has several tables, because of the categories, but one main table for the classified itself. Total of 7 tables in my case.
I want to use only Solr as a "db" because some people on SO thinks it would be...
I have a table that contains the following:
DataDate Value
2010-03-01 08:31:32.000 100
2010-03-01 08:31:40.000 110
2010-03-01 08:31:42.000 95
2010-03-01 08:31:45.000 101
. .
. .
. .
I need to multiply the value column by the difference in time bet...
I'm interested in seeing how using NoSQL would affect the architecture/design/code of a Rails application.
Does anyone know of a good example of a open-source Rails app using NoSQL persistence?
Thanks
...
Imagine I have three tables, called "customers", "companies" and "phone_numbers". Both customers and companies can have multiple phone numbers. What would be the best way to index phone_numbers? Have both customer_id and company_id and keep one of them null? What if there are more than two tables with a one-to-many relationship with phon...
I have four tables: ItemCategory, Items, DiamondCategoy and Diamonds.
The users store item details and specify whether it has a diamond on, for example:
ItemCategory: Ring
Item: R1
If there is a diamond then:
DiamondCategory: Round
Diamond: D1
So R1 of Ring has D1 of Round
An Item could have no diamonds, for example:
ItemCategor...
This is the default behavior for PostgreSQL is a search path like so:
SHOW search_path;
search_path
--------------
"$user",public
Is there a way to make it so the "$user" is case insensitive?
For instance I have a user tp1, and a schema TP1... I'd like them both to be seen as "equal"
Is this even possible?
...
I am working on a non Rails web app, so no migrations script by default.
The Sequel ORM lets me create tables easily in a script:
#!/usr/bin/env ruby
require 'rubygems'
require 'sequel'
## Connect to the database
DB = Sequel.sqlite('./ex1.db')
unless DB.table_exists? :posts
DB.create_table :posts do
primary_key :id
varcha...
I have 2 sql server databases on two different remote servers. On day one, they were both exaclty the same. But over time, there are changes in both (different, tables, stored procs, views, etc..).
How do I merge them together, so I have one again - the same Database in both places?
...
Hello,
I have 2 sqlite DBs with common data but with different purposes and I wanted to avoid reinserting data, so I was wondering if it was possible to copy a hole table from one DB to another. I didn't find anything about this on google regarding sqlite DB's so my hopes are not hi.
Thank you,
...
I'm considering a design for a private messaging system and I need some input here, basically I have several questions regarding this. I've read most of the related questions and they've given me some thought already.
All of the basic messaging systems I've thus far looked into use a single table for all of the users' messages. With ind...
I need some help! Please. I am trying to develop a very very simple application, basically just a simple book reader. Ideally, the first view would be a uitableview listing the names of chapters, then selecting the row would take you to a detail view that has the chapter which is broken up into segments. Note the segments are actually th...
Is it possible to alter more than one collection in a single query with MongoDB?
A SQL example:
begin
update table_1 set some_field=1;
update table_2 set a_different_field=2;
commit
...
I finally got SQL Server Management Studio to work. I attached the Adventure Works sample database to it.
Now I would like to display data from that database in ASP.NET. I would like to run SQL statements from ASP.NET.
How do I do this?
...
I'm trying to create an MDX query on the TFS cube which gets the historical values of the Estimate field. For each task I want to get the last estimate for each person who set the Estimate field. For example if Bob the project manager sets the estimate to 24 hours and then Dave the developer sets it to 32 hours, I want to create a quer...
At my shop right now, we're trying to automate our deployment process. We're handling database migrations using a Rails-like migrations tool. One issue we're struggling with is how to automate rollbacks. For code, we can simply change the symlinked current version of the project to point to the old version (this is a web application, so ...
Hi,
I am wanting to allow users to tag items so that they can search for them using tags. What is the best way of achieving this cleanly? So far the solution I have come up with only involves adding two extra tables to my current db system.
<db Trackable product 1>
int id;
info etc
</>
<db Trackable product 2>
int id;
info etc
</>
//...
I have an application I developed 20 years ago with INFORMIX-SQL version 2.10 for MS-DOS 5.0. I have it working on MS-DOS 6.22, within Microsoft Virtual PC 2007, under Windows Vista, but I would like to re-write this application with a WINDOWS-based RDBMS.
I'm looking for a product, similar in functionality to informix-sql, but for wind...