mysqldatabasedatabase-design

appropriate design and updating that also handles users updating their profile for a social networking site


I'm creating a social networking site something like Facebook. I can't create a new database or tables for a new user who registers onto my site; I need to insert a new row. This works for registration for the first time.

What is an appropriate design and updating that also handles users updating their profile?

I can't insert them into rows as they correspond to each user. and too many columns can't be created.

User_content

userId Name College City Status_Updates Messages 

1      a     sfd    fds    fsds          sdds
2      f     dfg    dfd    fdf           dfd

Solution

  • Add tables based on what you want to allow your users to do and the related data you need to store as a result. Some example tables:

    I have the sense that this is your first major database application, and if so, you need to learn more about database design in general before you take on creating an application like this. There are many things to consider when designing a database schema and designing it well from the start is key. The core of your application will rely on how well your data is organized and accessible, so ensure you spend enough time developing a good design.