What is a flat table?

  • Hi,

    I need to know the importance of flat table and in which scenario flat tables should be used..also the adv of flat tables over normalized tables

  • http://www.techrepublic.com/blog/programming-and-development/code-concepts-database-normalization-and-de-normalization/1997

    Generally the advantage of a denormalised table (or flat table as you call it) is read speed as you are not joining to other tables. Normalisation is for OLTP (typical transactional databases) and denormalisation or for OLAP (reporting) databases.

    Robert Murphy, Microsoft MCITP (Database Administrator 2008) and MCAD Certified
  • Layman's explanation. Think of an Excel spreadsheet. Just one page. Now imagine it's filled with your banking information. The first 5-7 columns are your customer names and addresses, the next couple of columns might be the bank account numbers (one column for each account and then possibly another column denoting type suffixes such as savings and checking). Then then next several columns contain transaction dates, amounts and types such as 01/01/2012, Check 123 and $50.00. Just keep adding on three columns for each transaction amount.

    You could also do this as rows, btw, but the column layout demonstrates a flat table much better.

    Now, as an Excel sheet, this is referred to as a flat file (as Celko pointed out), but when you import the data "as is" into an Access / SQL / Oracle database and if you leave it as is, then it is referred to as a flat table.

    Nasty things, flat tables are. Only for staging tables or data mining or SSAS, they should be used. Yes. [/yoda voice]

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Thank you so much for explaining the concept in an understandable manner.:-).

  • deepikamm (1/27/2012)


    Thank you so much for explaining the concept in an understandable manner.:-).

    You are welcome. I hope it helps you avoid them. @=)

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply