Read up on database normalization.

Database normalization is important because it ensures that you're not storing the same data in multiple places. Storing the same data in multiple places complicates updates and deletes, and means that you're running the risk of your data becoming inconsistent - where one table is telling you something, but another table contradicts it.

There are various targets in database normalization called "normal forms". Research them. The first three are quite easy to understand. It's generally a good idea to make sure your database conforms to 1NF, 2NF, and 3NF, and also Boyce-Codd normal form, which is a little harder to understand. Checking conformance to the higher NFs generally has limited benefits, and except in unusual circumstances, most 3NF databases tend to satisfy 4NF and 5NF anyway.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

In reply to Re: Database design tips by tobyink
in thread Database design tips by bsshetty17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.