Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have designed a database using MySQL likewise ER Diagram of DB

My question is what else i can do to normalize the DB, for now i am using InnoDB engine for the table to maintain the relation among different tables.

share|improve this question

migrated from Feb 15 '13 at 11:29

This question came from our site for professional and enthusiast programmers.

add more clear image... – dev Feb 15 '13 at 9:52
@dev: the original version of the image can be found here: (If you have editing privileges, you can edit the question to see the url.) – Mark Bannister Feb 15 '13 at 9:58
@ashofphoenix: Why do you have a separate table for user_profile? Can one login have more than one profile? – Mark Bannister Feb 15 '13 at 9:59
@MarkBannister: The reason i have separated the user_login and user_profile because i need to query the user_profile many times to get user info while user_login table is for authentication purpose only, so i thought it would be better to keep user-info and user-login related field in separate tables – ashofphoenix Feb 15 '13 at 10:11
up vote 0 down vote accepted

it really depends on "how normal is normal", there are 6+ forms.

comment table is normalized (assuming a user can comment more than once on a vid. how about a date field?)

like table is not really normalized, unless a user can like a video more than once. you could kill the likeId. also, date field would be handy.

video_list.meta suggests a denormalized field

follower_list is not quite right, as the same user can follow the same follower more than once. kill the followId field. you can have fkeys on more than one field.

user_profile is reasonably normalized, though some fields will be null, suggesting not full normalization.

user_login is not fully normalized, as they might have a fbId but not a twitterId or emailId.

share|improve this answer

It seems fine by me. I would say that the structure is fully normalized.

share|improve this answer

To be properly normalised, the profile and login tables should be one single table (as long as there is a one-to-one relationship between them). From the available information, there doesn't appear to be any benefit to splitting them.

share|improve this answer

Followerid seems unnecessary (you can just use a 2 column primary key).

Address probably wants to be on another table (then you can normalise parts of the address such as town name).

Parent_id on the videos table doesn't seem to relate to anything.

Otherwise seems fine for normalisation.

share|improve this answer
The parentId on the video table is related to the primary key of table itself.It is there to find if record having some parent or not i have defined the default values as 0 for record which doesn't have any parent associated. – ashofphoenix Feb 15 '13 at 10:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.