M
M
magary42015-03-02 00:50:09
Database design
magary4, 2015-03-02 00:50:09

A couple of questions on database design?

I have a user table, the main fields are email, pwd, role, activity_time
which roams from project to project.
In one project, I have manager and worker entities with a different set of fields
; in another, these are customer and supervisor, which I join to the user table.
How much is it right or wrong?
I looked at the implementation of different projects and noticed cases when almost everything has its own table,
i.e. role and activity are stored not in the user but in separate tables
at the output we get as in magento 270 tables (I looked a couple of years ago)
tell me how to design correctly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TriKrista, 2015-03-02
@TriKrista

If the columns relate to each other as "one to one", then let there be one table,
if as "one to many" or "many to many", then create several tables.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question