denormalization

I wanted to store List values as a array in MYSQL column. Whats the best practice?

Hi there, I have a registration form with common registration fields and two multiple selection Lists with heading "services". I wanted to store form data to database into a table. Currently i am having only one table "registrations", also i am having second thoughts whether i should create another relation table with name "registration...

Table Design For SystemSettings, Best Model

Someone suggested moving a table full of settings, where each column is a setting name(or type) and the rows are the customers & their respective settings for each setting. ID | IsAdmin | ImagePath ------------------------------ 12 | 1          | \path\to\images 34 | 0          | \path\to\images The downside to this is every time we wa...

SQL Server 2008: Can I use a constraint for this?

I have a table with three fields, User, City and Country, where exactly one of the fields must be non-NULL at all times. Can I use an SQL constraint for this or should I rethink what I'm doing? The scenario is that my database should contain documents that can be attached to users, cities or countries. So a row in this table contains ex...

Views performance in MySQL for denormalization

I am currently writing my truly first PHP Application and i would like to know how to project/design/implement MySQL Views properly; In my particular case User data is spread across several tables (as a consequence of Database Normalization) and i was thinking to use a View to group data into one large table: CREATE VIEW `Users_Merged`...

Please help me design a sql query for this problem

For a particular name i want to fetch other names who have lived in three or more cities lived by this person. ...

De-normalization alternative to specific MYSQL problem?

I am facing quite a specific optimization problem. I currently have 4 normalized tables of data. Every second, possibly thousands of users will pull down up-to-date info from these tables using AJAX. The thing is that I can predict relatively easily which subset of data they need... The most recent 100 or so entries in those 4 normali...

Denormalization database

I was taking a look at Star Schema Benchmark and then I was thinking is it possible to denormalize all tables from the SSB? So database size will increase a lot but potentially the performance will grow up. Is that right? Is it possible? Thanks and sorry for my poor English. ...

SQL Server denormalization question - store user data in 1,3, or 21 tables?

A section of our web site calls for asking the user 20 multiple-choice questions about themselves (a "profile"). This part of the web site will be frequently viewed, and occasionally updated. The web site is expected to develop a high amount of traffic, so some consideration is being given to try and prepare for performance issues. Th...

Map denormalized hibernate

I have a Summary class which contains a list of Qualities. A Quality contains a String name and int value. This data is stored in a denormalized db structure, one table only, for both Summary and Quality. Quality table: id, somefileds, qualityname1, qualityvalue1, qualityname2, qualityvalue2, qualityname3, qualityvalue3 For each quali...

Should I denormalize a has_many has_many?

I have this: class User < ActiveRecord::Base has_many :serials has_many :sites, :through => :series end class Serial < ActiveRecord::Base belongs_to :user belongs_to :site has_many :episodes end class Site < ActiveRecord::Base has_many :serials has_many :users, :through => :serials end class Episode < ActiveRecord::Base...

Does normalization really hurt performance in high traffic sites?

I am designing a database and I would like to normalize the database. In one query I will joining about 30-40 tables. Will this hurt the website performance if it ever becomes extremely popular? This will be the main query and it will be getting called 50% of the time. The other queries I will be joining about two tables. I have a choi...

How do you deal with denormalization / secondary indexes in database sharding?

Say I have a "message" table with 2 secondary indexes: "recipient_id" "sender_id" I want to shard the "message" table by "recipient_id". That way to retrieve all messages sent to a certain recipient I only need to query one shard. But at the same time, I want to be able to make a query that ask for all messages sent by a certain sen...

Denormalize for Simplicity: Ungood idea?

After reading this question, I've learned that denormalization is not a solution for simplicity. What about this case? I have news-articles which have a list of sites-article-will-be-published-to. The latter can be expressed in normalized fashion either by table and a many-to-many relationship (via a cross-table, I think). But the simpl...

Table clusters in SQLServer

In Oracle, a table cluster is a group of tables that share common columns and store related data in the same blocks. When tables are clustered, a single data block can contain rows from multiple tables. For example, a block can store rows from both the employees and departments tables rather than from only a single table: http://downloa...

Denormalization of large text?

If I have large articles that need to be stored in a database, each associated with many tables would a NoSQL option help? Should I copy the 1000 char articles over multiple "buckets", duplicating them each time they are related to a bucket or should I use a normalized MySQL DB with lots of Memcache? ...

A good approach to db planing for reporting service

The scenario: Big system (~200 tables). 60,000 users. Complex reports that will require me to do multiple queries for each report and even those will be complex queries with inner queries all over the place + some processing in PHP. The approach: I have seen an approach, which I am not sure about: Having one centralized, de-normali...

SQL to join to the best matching row

I have a wiki system where there is a central table, Article, that has many Revisions in their own table. The Revisions each contain a created_at time and date column. I want to update the Articles to contain a denormalized field sort_name from the most recent Revision's name field. What SQL command can I issue to fill in each Article...

Denormalization in Google App Engine?

Background:::: I'm working with google app engine (GAE) for Java. I'm struggling to design a data model that plays to big table's strengths and weaknesses, these are two previous related posts: http://stackoverflow.com/questions/3120192/database-design-google-app-engine http://stackoverflow.com/questions/3125115/appointments-and-line...

Why are dimension tables denormalized in an InfoCube?

I'm in the process of learning SAP BW at work. The SAP class material states that in InfoCubes, dimensions are denormalized. I understand the benefit of normalized tables, but don't understand why dimensions would be denormalized. ...

de-normalization, weighted aggregates for updated tables in MySQL

Dear all, this time I got a more general question. Should I use multiple views rather than stored procedures for weighted aggregation of data, if the original data is updated periodically? Basically I have a local MySQL database that is updated periodically by importing the same kind of data (tables) from a bigger transaction databas...