Question: This question is related but not the same as this: [How do you give a C# Auto-Property a default value?](https://stackoverflow.com/questions/40730/how-do-you-give-a-c-auto-property-a-default-value)

I love auto-properties, but sometimes I have to do something like this:

```
private string someName;

public string SomeName
{
    get
    {
       return someName;
    }

    set
    {
        someName = value.Trim();
    }
}

```

If I have to do the same thing many times, I start wishing that I did not need to type so many lines/characters of code. I want to be able to intercept the value and change it sort of like so:

```
public string Somename
{
    get;

    [Trim]
    set;
}

```

Is there a way to do something like this? Would it be stupid? Is there a better way? Any other general comments? I admit, the example I gave is a bit hypothetical and I cannot locate the exact code now which made me think of this.

Thanks.

Answer: 
In regards to the Pink/P!nk situation, if that's a big deal to you, then yes, normalization would be useful.

Your songs table would reference an artist\_id.

You'd also have a table of artist aliases, which would map the various names that a particular artist has gone by to that artist\_id.

But this can get pretty complex, and technically, it may not even be correct in your situation, as if an artist chooses to release projects under different names, they may not want them all lumped together. 

In general, normalized databases are a safe place to start, but there are plenty of good reasons to denormalize, and it is more important to understand those reasons then blindly always do things one way.
pretty screwed, indeed. it's hardly normalized. go for separate tables. 

if you've never heard of normalization or understood why it was important, perhaps you should read [this](http://www.phlonx.com/resources/nf3/). it's a succinct, simple explanation without a lot of jargon.

or you could go straight to the source since you're already using mysql: 

<http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html>

think about the cardinalities and relationships in your model:

1. an album will have zero or more tracks; a track will belong to only one album (album-to-track is one to many)
2. an artist can create zero or more albums; an album can be created by one or more artists (artist-to-album is many-to-many)

you'll want to think carefully about indexes, primary, and foreign keys. add indexes to non-key columns or groups that you'll want to search on.

this design would have four tables: album, track, artist, and artist\_to\_album many to many join table.