Topic: Database Administration >> synonyms
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| black |
Posted: Aug 24, 2007 03:38:00 AM |
Total Post: 14
Joined: Aug, 2007
|
hi friends,
what is synonyms,views,sequence? pls explain me detail |
|
|
Mohammed Taj |
| Posted: Aug 24, 2007 08:06:04 AM | |
|
Total Post: 694
Joined: Jul, 2007
|
synonym ---> exact copy of table and duplicate copy
view ----> image or window of tables
eg: view use for complex query...
you should create view for complex query which create through more than one tables.
sequence ---> unique number generator.
Regards
Taj
|
|
|
|
|
Nehru |
| Posted: Aug 24, 2007 08:17:36 AM | |
|
Total Post: 43
Joined: Jul, 2007
|
Hi,
Better to go this explanation:
SYNONYM:
If you aften are refers to tables of yours of maximum lenght/difficult names or other users it is useful to use a synonym instead of
user.table.
A synonym can be created using the command
"create synonym synonym_name for table_name/user.table_name;"
It is then possible to use simply synonym_name in a from clause.
Ex:
create synonym test for employeeinformation;
VIEW:
In Oracle the SQL command to create a view <virtual table> has the form
create or replace view <view_name> [(<column(s)>)] as
<select-statement> [with check option [constraint <name>]];
The optional clause or replace re creates the view if it already exists.
Ex:
create view DEPT20 as
select ENAME, JOB, SAL from EMP
where DEPTNO = 20;
A view can be used in the same way as a table. that is rows can be retrieved from a view
and also respective rows are not physically stored. A view is evaluated again each time it is
accessed, In Oracle SQL no insert, update, or delete modifications on views are allowed
SEQUENCE:
Sequence is used to insert number to the table,if the contains ID column which is Primary key, then better to use sequence
create sequence test_sequence start with 1 increment by 1;
then you can use like this
insert into test(testID,testname) values(test_sequence.NEXTVAL,'Exam');
I think after reading this you can under stand all above,
Any one let me know if am wrong.
Take Care
Bye
Nehru
|
|
|
|
|
black |
| Posted: Aug 27, 2007 12:44:04 AM | |
|
Total Post: 14
Joined: Aug, 2007
|
|
|
|
|
Mohammed Taj |
| Posted: Aug 27, 2007 12:46:20 AM | |
|
Total Post: 694
Joined: Jul, 2007
|
You'r right Nehru ;-)
Regards
Taj
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 814 |
| Mohammed Taj | 694 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| positive fanatic | 361 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 239 |
| neeraj sharma | 228 |
| Ramesh Jois | 226 |
| snehalatha p | 169 |
|
|