database - Separate MySql tables for registered users and unregistered users -


i working on practice project buy & sell. have confusion tables have in database users registered , have accounts.

my pencil planning registered user can post ad dashboard , unregistered user can post ad directly without having account.

my question should have separate tables like

  • ind_laptops(ind independent) = table unregistered users ads , can post ad without having account; and
  • users_laptop user_id foreign key = table users registered , have accounts can post right accounts dashboard.

i confuse think practice , can me lot in future when filtering data against per user records.

i hold single table. mark unregistered users id -1 , or create flag field means whether guest post or not. reasoning behind - difference if registered user or not, data same.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

1111. appearing after print sequence - php -

android - How to create dynamically Fragment pager adapter -