First off, let’s define what a privilege is in a database. In a database, every user account can be granted a number ofprivileges, which are also known aspermissions. These privileges allow a particular user account to do certain things, like DELETE and UPDATE certain tables, CREATE a database, SELECT from a certain table, and many other things.
In Oracle, Microsoft’s SQL Server, and in Sybase Adaptive Server privileges are further divided into two different categories: 1. system privileges and 2. object privileges. What’s the difference between system and object privileges? Well, lets go through an explanation of each one, and then we’ll discuss the differences between the two.
System privileges are privileges given to users to allow them to perform certain functions that deal withmanaging the database and the server. Most of the different types of permissions supported by the database vendors fall under the system privilege category. Let’s go through some examples of system privileges in Oracle and SQL Server.
Object privileges are privileges given to users so that they can perform certain actions upon certain database objects – where database objects are things like tables, stored procedures, indexes, etc. Some examples of object privileges include granting a particular database user the right to DELETE and/or SELECT from a particular table. This is done using the GRANT clause, which you can read more about here:SQL GRANT.
So, now hopefully it’s clear that the difference between system and object privileges is that system privileges are used for server and database privileges. But object privileges are used to grant privileges on database objects like tables, stored procedures, indexes, etc.
Would you like to thankProgrammerInterview.com for being a helpful free resource?Then why not tell a friend about us, orsimply add a link to this page from your webpage using the HTML below.
Link to this page:
Please bookmark with social media, your votes are noticed and appreciated: