i'm trying to create a database but i just can't imagine it.
in one of my tables, i will keep multiple events and their timestamps and a key to know who were the person did that event.
for example;
device_token | login_screen | login_screen_timestamp | button_clicked | button_clicked_timestamp | new_event | new _event_timestamp
is this how should i continue, because i can't think of any better way.But somehow i think that there should be a better way.
Without knowing what kind of data exists in each field, it will be hard to give you approval but ultimately you want to normalize your tables to reduce any type of field duplication. By following the principles of Database Normalization , you can set up your data to be algebraically stored in the most efficient manner possible while simultaneously greatly reducing the possibility of data error.
Read up on normal forms to familiarize yourself with these concept and try and shoot for 3rd Normal Form in your database (which will eliminate functional and transitive dependencies). Any additional normalization beyond 3NF can actually slow your performance so 3rd normal form should be your goal in any business setting.
A summarized list of steps to take to normalize data from non-normalized to 3rd Normal Form is as follows:
So what you should see is one large table, then split into other smaller tables until the large table is 3rd Normal Form. Then you repeat the process on any newly created smaller tables until everything in your database is 3rd normal form.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.