database

What is a good choice of ORM for an eCommerce website?

I am using C# 3.0 / .NET 3.5 and planning to build an eCommerce website. I've seen NHibernate, LLBLGEN, Genome, Linq to SQL, Entity Framework, SubSonic, etc. I don't want to code everything by hand. If there is some specific bottleneck I'll manage to optimize the database/code. Which ORM would be best? There is so much available those...

Novice SQL query question for a movie ratings database

I have a database with one table, like so: UserID (int), MovieID (int), Rating (real) The userIDs and movieIDs are large numbers, but my database only has a sample of the many possible values (4000 unique users, and 3000 unique movies) I am going to do a matrix SVD (singular value decomposition) on it, so I want to return this databa...

Ruby on Rails and Active Record standalone scripts disagree on database values for :timestamps

I posted a question earlier today when I'd not zeroed in quite so far on the problem. I'll be able to be more concise here. I'm running RoR 2.1.2, on Windows, with MySQL. The SQL server's native time zone is UTC. My local timezone is Pacific (-0800) I have a model with a :timestamp type column which I can do things like this with: ...

Connect to database using jsf

How do I connect to the database(MYSQL) in connection bean using JSF to retrieve its contents. Also please let me know how do I configure the web.xml file? ...

How do I get constraint details from the name in Informix?

When programming a large transaction (lots of inserts, deletes, updates) and thereby violating a constraint in Informix (v10, but should apply to other versions too) I get a not very helpful message saying, for example, I violated constraint r190_710. How can I find out which table(s) and key(s) are covered by a certain constraint I know...

Is there a standard e-commerce database schema to apply the discounts/taxes/gift vouchers to products?

A good and flexible database schema illustrating e-commerce products and their rates management is required. ...

Oracle User Management

Does anyone have experience working with Oracle User management? Any idea if it can be easily used to register users and roles into Oracle OID? And how I can use the defined roles in my application (i.e. should I hard code them)? ...

MySQL database size

Microsoft SQL Server has a nice feature, which allows a database to be automatically expanded, when it becomes full. In MySQL I understand that a database is in fact a directory with a bunch of files corresponding to various objects. Does it mean that a concept of database size is not applicable and a mysql database can be as big as avai...

Reduce deadlock on PAGE level on update query on MS SQL

I have some funny deadlock caused by a stupid simple SQL UPDATE query, on a flat plain table, under default "READ COMMITED" transaction. UPDATE table SET column=@P1 WHERE PK=@P2; While PK varchar(11), has a clustered index on it. no trigger or table relation..etc on the table. I did some check and find that the deadlock happen ...

How can I keep data in sync during deployment?

I have the occasion to produce Drupal web sites using development, staging, and production environments. Keeping the code in sync between the sites is a simple task using subversion. What is not so simple is propagating changes to the database data (not just the schema) between installations. The reason for this will be familiar to an...

How do I test database-related code with NUnit?

I want to write unit tests with NUnit that hit the database. I'd like to have the database in a consistent state for each test. I thought transactions would allow me to "undo" each test so I searched around and found several articles from 2004-05 on the topic: http://weblogs.asp.net/rosherove/archive/2004/07/12/180189.aspx http://weblo...

Recommendations for column-oriented database

I've found databases typically come in two flavors, your traditional row-oriented RDBMS or an object oriented database (OODBMS). However, in the mid 90s I remember, a new breed of databases showing up that were column oriented. Some of these were given the term 4GL, but I don't think it was a term that stuck. What I'd like to know is ...

db4o development tools and resources?

Since the 7.x versions of db4o ObjectManager are only available as a commercial product (very expensive!) are there any alternative tools that are available to inspect/explore db4o 7.x databases? Also, what other tools would you recommend to a beginning db4o developer? ...

MySQL count matching words

How to query to get count of matching words in a field, specifically in MySQL. simply i need to get how many times a "search terms"appear in the field value. for example, the value is "one two one onetwo" so when i search for word "one" it should give me 3 is it possible? because currently i just extract the value out of database and d...

native iPhone database, all data on iPhone

Is it possible to make a big 50MB database native on the iPhone? So that it can be searched very quickly in a smart way? With SQlite? ...

What's the most efficient way to remember read/unread status across multiple items?

For example, let's take the format of a forum, where we have multiple users and multiple threads. Say this forum wants to track which users have read which threads and, say, use that information to mark which threads are unread when viewing the thread list. The only solution I can imagine is something that drops a record into the databa...

MySQL Table Design for a Questionnaire

I am fairly new to MySQL and have a project in which I need to design a database that will store responses from an online questionnaire. Reports will need to be written from the data. Does anyone have any tips on what type of fields to use? The questions will either have a Yes No answer, a choice of 4 options from very satisfied to ve...

Strategy for dealing with large db tables

I'm looking at building a Rails application which will have some pretty large tables with upwards of 500 million rows. To keep things snappy I'm currently looking into how a large table can be split to more manageable chunks. I see that as of MySQL 5.1 there is a partitioning option and that's a possible option but I don't like the wa...

Database naming conventions

We are deciding the naming convention for tables, columns, procedures, etc. at our development team at work. The singular-plural table naming has already been decided, we are using singular. We are discussing wether to use a prefix for each table name or not. I would like to read suggestions about using a prefix or not, and why. Does i...

Query vs. View

I want to know what is the difference between a query and a view in terms of performance. And if a view is costly, what else besides a query could I do to improve performance? ...