Alex Rivera | Logout

Data normalization and writing queries

Asked 2011-06-22T00:40:00.760
10

I'm a jr. developer (5 months on the job), and I have a question about data normalization. Now, as I understand it, the general principle behind data normalization is to create a RDBMS where data redundancy is kept to a minimum. In my project, one of the DB people created a DB. We have 50+ tables, and the tables in the DB are usually very fragmented, ie. a table has two or three columns and that's it. Now, when it comes to writing sql queries, it has become something of a minor hassle since each query involves combing through several different tables and joining them together. I was wondering if this is a a side effect of data normalization? Or does this point to something else?

I know that the easiest thing to do, for me, would be to write tables based off the queries I have to write. This will create a DB with a lot of redundant data, but I was curious if there is a happy medium?

Just as a postscript, I don't want to come across like I'm whining about my work, but I'm genuinely curious to learn more about this. My work environment is not the most friendly so I don't feel comfortable posing this question with my colleagues. However, I would appreciate any thoughts, books, tutorials or opinions from more experienced people.

Thanks.

Edit
Report

1 Answer

1

It sounds like data normalization, but I would have to know more about the schema, the business case, etc to make that call reliably. If you had control of the database, you could write a view that represents common queries that link tables. In order to increase performance, you could create an indexed or materialized view (the name depends on the database platform, in this case, Oracle vs. Sql Server).

Just about any database primer will help you along with these concepts. If you are using Sql Server and are really interested in learning more, SQL Server Books Online is an excellent resource.

answered 2011-06-22T00:50:53.933

Your Answer