title: How to design the database schema?
body: <p>I am designing the database for a portal.Specifically, I have a users table that contains columns: id, username and password. </p>
  
  <p>Also there are three types of users: buyers, sellers and brokers and each user has a separate table with columns: name, description, mobile,introducer etc.The broker table doesn't have introducer column.</p>
  
  <p>Based on this design I want to create a two step registration form with first step login info and the second step profile info. </p>
  
  <p>Now, the business rules dictate that a user can be a buyer, seller or broker.A user can have at most one profile(buyer, seller or broker). I want to keep the login details and the profile info separate in the database </p>
  
  <p>What I have done:</p>
  
  <p>I have created a separate table for users, brokers, buyers and sellers with user id as foreign key in the buyers , brokers and sellers table.  </p>
  
  <p>Now my question is</p>
  
  <ul>
  <li>How to create the tables for this design?</li>
  <li>How to specify the foreign key constraints?</li>
  </ul>
  
  <p>I am new to database designing and all help is appreciated.Thanks in advance.</p>