title: SQL Server roles, schemas, users
body: <p>I've been trying to figure out why SQL Server has <code>db_owner</code> schema and <code>db_owner</code> role?  This is very confusing.  I've been searching for answers and so far this is how my understanding goes:</p>
  
  <ol>
  <li>All tables and objects (such as constraints etc) belong to a schema.  <code>DBO</code> being the default schema.</li>
  <li>A user may be given permission to edit each object or the schema.  A permission on the schema extends the permission to all objects within that schema.  So you don't have to grant permission on each individual object.</li>
  <li>A role groups permissions together for convenience.</li>
  </ol>
  
  <p>If any of this is incorrect let me know.  But I think so far so good.  Now my questions are: </p>
  
  <ol>
  <li>What exactly is <code>db_owner</code> schema as seen in "Database User" dialog box of SQL Server Management Studio?  And on the same dialog, you define the "Default Schema" as <code>dbo</code>.  Why aren't the two the same?  If by default SQL Server uses <code>dbo</code> to create all objects under, what use is <code>db_owner</code>?</li>
  <li>Why would a user want to own a schema?  You are assigning permissions/roles already.  What does owning <code>db_accessadmin</code> give you?</li>
  <li>Can you give an example of when you create objects under <code>db_owner</code> schema and <code>db_accessadmin</code> schema?  In other words does anyone legitimately use those schemas?</li>
  </ol>