In my database design, I've defined Master tables (data definition tables, static in nature) which will be used to generate content in my web page; and Transaction tables which will be used to store data entered by users (these tables are dynamic in nature).
Consider the following example:
Set of Master tables consisting of State having 1:M relationship with City, City having 1:M relationship with Locality.
A Transaction table User to store the personal details entered by a user. The User table has address attributes like Address, State, City and Locality. These attributes can be defined as 1:M relationships from the corresponding Master Tables (a particular record in State, City, Locality tables can be a part of more than records in User table).
My questions:
- Is the above design correct?
- Moreover, I think it's sufficient to define 1:M relationship between the Locality and the User tables since the other two attributes (City and State) can be obtained from the relationships between the Master tables. Would it be better to change the ER design to the following?
- Are there any good alternatives to my requirement?
PS: I'm a beginner in database designing.