Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
11_OtherDatabaseObjects

11_OtherDatabaseObjects

Ratings: (0)|Views: 16 |Likes:
Published by api-3827483

More info:

Published by: api-3827483 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as RTF, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

synonym
sused to give simple alias for database object
sused to give meaningful alternative name for
database objects
stypes of synonyms
\u2013private
\u2013public
sprivate
\u2013can be used by a user who has created it
spublic
\u2013accessible to all users
\u2013can be created by only a user having dba privilege
ssyntax:
\u2013create [public] synonym synonym_name for
object_name;
se.g.
\u2013create synonym employee for emp;
deleting synonym
sdrop command is used to delete a synonym
ssyntax:
\u2013drop [public] synonym synonym_name;
se.g.
\u2013drop synonym employee;
sequence
sis used to generate the series of unique integers
smultiple users can use same sequence
ssyntax:
\u2013create sequence sequence_name
[increment by n]
[start with n];
se.g.
\u2013create sequence deptnum
increment by 10
start with 50;
\u2013create sequence s1

start with -10
increment by 1
maxvalue -1
minvalue \u201310

\u2013create sequence s1

start with -10
increment by 1
maxvalue 1
minvalue -100
cache 50
cycle

ssequence provides two attributes for using the values
generated using the sequence
scurrval
\u2013returns the current value in the sequence
snextval
\u2013increments the current value in the sequence and returns
incremented value
insert a new department \u2018production\u2019 located at
\u2018pune\u2019 into dept table using sequence.
solution:
insert into dept values (deptnum.nextval,
\u2018production\u2019, \u2018pune\u2019);
sdrop command is used to delete a sequence
ssyntax:
\u2013drop sequence sequence_name;
se.g.
drop sequence deptnum;
views
sobjectives:

\u2013explain the need for a view
\u2013state the syntax for creating a view
\u2013construct a view
\u2013state advantages and disadvantages of views
\u2013state rules & restriction for updating views

swhy views?
\u2013the table in a database defines the structure and
organisation of it\u2019s data
\u2013all the users of a database do not need to access all the
data in the database
\u2013oracle enables you to present only relevant data to users
by using view
\u2013view is a virtual table whose contents are taken from
other tables through the execution of a query
\u2013a view is a database object that contains no data of its
own
\u2013the tables from which a view derives its data are known
as base tables

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->