Database Normalization

后端 未结 13 1914
死守一世寂寞
死守一世寂寞 2020-11-29 11:33

I\'m new to database design and I have been reading quite a bit about normalization. If I had three tables: Accommodation, Train Stations and Airports. Would I have address

13条回答
  •  孤街浪徒
    2020-11-29 11:58

    For addresses, I would almost always create a separate address table. Not only for normalization but also for consistency in fields stored.

    As for such a thing as over-normalization, absolutely there is! It's hard to give you guidance on what is and isn't over-normalization as I think it mostly comes from experience. However, follow the books on each level of normalization and then once it starts to get difficult to see where things are you've probably gone too far.

    Look at all the sample/example databases you can as well. They will give you a good indication on when you should be splitting out data and when you shouldn't.

    Also, be well aware of the type and amount of data you're storing, along with the speed of access, etc. A lot of modern web software is going fully de-normalized for many performance and scalability reason. It's worth looking into those for reason why and when you should and shouldn't de-normalize.

提交回复
热议问题