Answer the question
In order to leave comments, you need to log in
Need advice on building a database?
Hello :3
We need to design a database of contactless metro cards (RFID tags) for this there are four tables with the following links.
cards table
id_card - card number
cash - current number of trips
station - station where it was last used
time - time of last use
status - working/not working
Table station - all metro stations are listed.
table history_add - history of card replenishment
table history - history of movement of card carriers
Please give advice on how to "normalize data" (bring them to some of the NF). And what else would you add here :3
Answer the question
In order to leave comments, you need to log in
cards
id (INT), status (BOOL), ...
stations
id (INT), name (VARCHAR), ...
operatioons
id (INT), station_id (INT), operation (INT) (+1/-1, etc), balance (INT), created (INT)...
IMHO, a fully normalized form would only contain two tables:
stations (id, name);
events (card, event, station_id, sum, timestamp)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question