We know that a DBMS needs to provide, at the very
least, some kind of
* DDL - data definition language
* DML - data manipulation language
* DCL - data control language
* Oracle provides some of its DCL capabilities
via the SQL grant and revoke commands
* grant - gives specified users specified access
to specified objects in the database
* revoke - withdraws specified access from
specified users to specified objects
in the database
* what kinds of access can be granted or revoked?
* insert
* delete
* update
* select
* any of these above can be included in
the PRIVILEGE LIST for an object
using the grant and revoke commands
* basic grant syntax:
GRANT comma-separated-privilege-list
ON object-name
TO comma-separated-user-list;
* IN YOUR PAIR,
* log into nrs-projects
* mkdir 325lab4
* cd 325lab4
* type:
echo "List both your names" > 325lab4-who.txt
* revoke syntax:
REVOKE comma-separated-privilege-list
ON object-name
FROM comma-separated-user-list;
----------
back to Reading Packet 3 --
KEYS!
* a SUPERKEY is a set of one or more attributes
that UNIQUELY identifies a tuple
(no matter how many tuples there happen to
currently be,
based on the semantic domains of the attributes
in this table in this scenario)
* every relation MUST have at least one
superkey! (the set of all of its attributes
is GUARANTEED to be a superkey, since a
relation can HAVE no duplicate rows...)
* what is a MINIMAL KEY?
* it is a superkey where NO SUBSET of the
key is ALSO a superkey
(may not have the fewest number of attributes --
BUT all attributes in a minimal key
are NECESSARY for that to be a superkey)
* some relations indeed have MORE THAN ONE
minimal key;
these minimal keys are also called
CANDIDATE keys
...why candidate? because these candidate keys
are REASONABLE options for the ONE you choose
to be a relation's PRIMARY KEY.
* COURSE STYLE STANDARD:
we will EXPLICITLY define a suitable
primary key (a set of one or more attributes
uniquely determining a row, that is also
minimal) for EVERY relation