Advertisement

Relational database normalization

Started by September 08, 2024 07:29 PM
16 comments, last by taby 1 month, 4 weeks ago

MagnusWootton said:

I guess maybe using the database might be cool, I wouldn't do it myself, but I guess u get all the features, but it would slow u down I think. Doesn't a game need max perf?

See my reply to khawk above. I just replied 2 seconds ago, so it’s not your fault.

So basically, if I need to encode one-to-many or many-to-many relationships, then normalization is important. For one-to-one relationships, normalization is not required. Right?

Advertisement

taby said:

So basically, if I need to encode one-to-many or many-to-many relationships, then normalization is important. For one-to-one relationships, normalization is not required. Right?

Generally, yes. For one-to-many and many-to-many, normalization is important to avoid data duplication and maintain integrity.

For one-to-one, normalization could be helpful, but it depends on the use case. You might normalize, for instance, if you want to separate entities into different tables based on data types, or if data isn't needed.

For example, GameDev.net's database is designed with one-to-one normalization of user data, meaning user accounts from user profiles, user settings, and more even though those are all 1-1 mapping. Doing so keeps optional user data out of the main user account table, so it's only stored when needed. It speeds up queries and creates a separation of concerns in the schema. Also makes it easier to extend in the future, if needed, without affecting the core user table.

Admin for GameDev.net.

Any suggestions for GUI-based schema designers that basically spit out a bunch of create table statements?

Few recommendations:

Admin for GameDev.net.

Oooooooh, I'm in love with DB Browser for SQLite! It even previews the blobs!

Advertisement

I think that I see. The point of normalization is to take advantage of the low entropy of the data.

This topic is closed to new replies.

Advertisement