This document discusses several database objects in Oracle: sequences, indexes, and synonyms. Sequences are used to automatically generate unique primary key values. Indexes improve query performance by indexing columns. Synonyms provide alternative names for objects to simplify access. The document provides examples of creating, modifying, confirming, and removing these database objects through SQL statements.
Index is a database object, which can be created on one or more columns (16 Max column combinations). When creating the index will read the column(s) and forms a relevant data structure to minimize the number of data comparisons. The index will improve the performance of data retrieval and adds some overhead on data modification such as create, delete and modify. So it depends on how much data retrieval can be performed on table versus how much of DML (Insert, Delete and Update) operations
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
Index is a database object, which can be created on one or more columns (16 Max column combinations). When creating the index will read the column(s) and forms a relevant data structure to minimize the number of data comparisons. The index will improve the performance of data retrieval and adds some overhead on data modification such as create, delete and modify. So it depends on how much data retrieval can be performed on table versus how much of DML (Insert, Delete and Update) operations
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
YouTube Link: https://youtu.be/f6VWSlnHGCE
** MySQL DBA Certification Training: https://www.edureka.co/mysql-dba **
This Edureka PPT on 'SQL Triggers' will help you understand the concept of triggers in SQL. Below are the topics covered in this SQL Triggers For Beginners.
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Clauses in Sql(Structured Query Language), distinct clause, where clause, where clause, order by clause, group by clause, having clause, Relational Database Management System
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
After completing this lesson, you should be able to do the following:
Describe some database objects and their uses
Create, maintain, and use sequences
Create and maintain indexes
Create private and public synonyms
YouTube Link: https://youtu.be/f6VWSlnHGCE
** MySQL DBA Certification Training: https://www.edureka.co/mysql-dba **
This Edureka PPT on 'SQL Triggers' will help you understand the concept of triggers in SQL. Below are the topics covered in this SQL Triggers For Beginners.
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Clauses in Sql(Structured Query Language), distinct clause, where clause, where clause, order by clause, group by clause, having clause, Relational Database Management System
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
After completing this lesson, you should be able to do the following:
Describe some database objects and their uses
Create, maintain, and use sequences
Create and maintain indexes
Create private and public synonyms
After completing this lesson, you should be able to
do the following:
Create, maintain, and use sequences
Create and maintain indexes
Create private and public synonyms
http://phpexecutor.com
This lesson display some of topics like: 1- Create simple and complex views. 2- Retrieve data from views. 3- Create, maintain, and use sequences. 4- Create and maintain indexes. 5- Create private and public synonyms
Creating and Managing Tables -Oracle Data base Salman Memon
After completing this lesson, you should be able to
do the following:
Describe the main database objects
Create tables
Describe the data types that can be used when specifying column definition
Alter table definitions
Drop, rename, and truncate tables
http://phpexecutor.com
AMIS organiseerde op maandagavond 15 juli het seminar ‘Oracle database 12c revealed’. Deze avond bood AMIS Oracle professionals de eerste mogelijkheid om de vernieuwingen in Oracle database 12c in actie te zien! De AMIS specialisten die meer dan een jaar bèta testen hebben uitgevoerd lieten zien wat er nieuw is en hoe we dat de komende jaren gaan inzetten!
Deze presentatie is deze avond gegeven in de vorm van een parallelsessie.
After completing this lesson, you should be able to do the following:
Describe the main database objects
Create tables
Describe the datatypes that can be used when specifying column definition
Alter table definitions
Drop, rename, and truncate tables
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
Sequences and indexes
1. Copyright س Oracle Corporation, 1998. All rights reserved.
13
Other Database Objects
2. 13-2 Copyright س Oracle Corporation, 1998. All rights reserved.
Objectives
After completing this lesson, you should
be able to do the following:
• Describe some database objects and
their uses
• Create, maintain, and use sequences
• Create and maintain indexes
• Create private and public synonyms
3. 13-3 Copyright س Oracle Corporation, 1998. All rights reserved.
Database Objects
Description
Basic unit of storage; composed of rows
and columns
Logically represents subsets of data from
one or more tables
Generates primary key values
Improves the performance of some queries
Alternative name for an object
Object
Table
View
Sequence
Index
Synonym
4. 13-4 Copyright س Oracle Corporation, 1998. All rights reserved.
What Is a Sequence?
• Automatically generates unique
numbers
• Is a sharable object
• Is typically used to create a primary key
value
• Replaces application code
• Speeds up the efficiency of accessing
sequence values when cached in
memory
5. 13-5 Copyright س Oracle Corporation, 1998. All rights reserved.
The CREATE SEQUENCE
Statement
Define a sequence to generate sequential
numbers automatically.
CREATE SEQUENCE sequence
[INCREMENT BY n]
[START WITH n]
[{MAXVALUE n | NOMAXVALUE}]
[{MINVALUE n | NOMINVALUE}]
[{CYCLE | NOCYCLE}]
[{CACHE n | NOCACHE}];
6. 13-6 Copyright س Oracle Corporation, 1998. All rights reserved.
Creating a Sequence
• Create a sequence named DEPT_DEPTNO
to be used for the primary key of the
DEPT table.
• Do not use the CYCLE option.
SQL> CREATE SEQUENCE dept_deptno
2 INCREMENT BY 1
3 START WITH 91
4 MAXVALUE 100
5 NOCACHE
6 NOCYCLE;
Sequence created.
7. 13-7 Copyright س Oracle Corporation, 1998. All rights reserved.
Confirming Sequences
• Verify your sequence values in the
USER_SEQUENCES data dictionary
table.
• The LAST_NUMBER column displays
the next available sequence number.
SQL> SELECT sequence_name, min_value, max_value,
2 increment_by, last_number
3 FROM user_sequences;
8. 13-8 Copyright س Oracle Corporation, 1998. All rights reserved.
NEXTVAL and CURRVAL
Pseudocolumns
• NEXTVAL returns the next available
sequence value.
It returns a unique value every time it is
referenced, even for different users.
• CURRVAL obtains the current sequence
value.
NEXTVAL must be issued for that
sequence before CURRVAL contains a
value.
9. 13-10 Copyright س Oracle Corporation, 1998. All rights reserved.
Using a Sequence
• Insert a new department named
“MARKETING” in San Diego.
• View the current value for the
DEPT_DEPTNO sequence.
SQL> INSERT INTO dept(deptno, dname, loc)
2 VALUES (dept_deptno.NEXTVAL,
3 'MARKETING', 'SAN DIEGO');
1 row created.
SQL> SELECT dept_deptno.CURRVAL
2 FROM dual;
10. 13-11 Copyright س Oracle Corporation, 1998. All rights reserved.
Using a Sequence
• Caching sequence values in memory
allows faster access to those values.
• Gaps in sequence values can occur when:
– A rollback occurs
– The system crashes
– A sequence is used in another table
• View the next available sequence, if it was
created with NOCACHE, by querying the
USER_SEQUENCES table.
11. 13-12 Copyright س Oracle Corporation, 1998. All rights reserved.
Modifying a Sequence
Change the increment value, maximum
value, minimum value, cycle option, or
cache option.
SQL> ALTER SEQUENCE dept_deptno
2 INCREMENT BY 1
3 MAXVALUE 999999
4 NOCACHE
5 NOCYCLE;
Sequence altered.
12. 13-13 Copyright س Oracle Corporation, 1998. All rights reserved.
Guidelines for Modifying
a Sequence
• You must be the owner or have the
ALTER privilege for the sequence.
• Only future sequence numbers are
affected.
• The sequence must be dropped and
re-created to restart the sequence at a
different number.
• Some validation is performed.
13. 13-14 Copyright س Oracle Corporation, 1998. All rights reserved.
Removing a Sequence
• Remove a sequence from the data
dictionary by using the DROP
SEQUENCE statement.
• Once removed, the sequence can no
longer be referenced.
SQL> DROP SEQUENCE dept_deptno;
Sequence dropped.
14. 13-15 Copyright س Oracle Corporation, 1998. All rights reserved.
What Is an Index?
• Is a schema object
• Is used by the Oracle Server to speed
up the retrieval of rows by using a
pointer
• Can reduce disk I/O by using rapid path
access method to locate the data
quickly
• Is independent of the table it indexes
• Is used and maintained automatically by
the Oracle Server
15. 13-16 Copyright س Oracle Corporation, 1998. All rights reserved.
How Are Indexes Created?
• Automatically: A unique index is
created automatically when you define a
PRIMARY KEY or UNIQUE constraint in
a table definition.
• Manually: Users can create nonunique
indexes on columns to speed up access
time to the rows.
16. 13-17 Copyright س Oracle Corporation, 1998. All rights reserved.
Creating an Index
• Improve the speed of query access on
the ENAME column in the EMP table.
SQL> CREATE INDEX emp_ename_idx
2 ON emp(ename);
Index created.
CREATE INDEX index
ON table (column[, column]...);
• Create an index on one or more columns.
17. 13-18 Copyright س Oracle Corporation, 1998. All rights reserved.
When to Create an Index
• The column is used frequently in the WHERE
clause or in a join condition.
• The column contains a wide range of values.
• The column contains a large number of null
values.
• Two or more columns are frequently used
together in a WHERE clause or a join
condition.
• The table is large and most queries are
expected to retrieve less than 2–4% of the
rows.
18. 13-19 Copyright س Oracle Corporation, 1998. All rights reserved.
When Not to Create an Index
• The table is small.
• The columns are not often used as a
condition in the query.
• Most queries are expected to retrieve
more than 2–4% of the rows.
• The table is updated frequently.
19. 13-20 Copyright س Oracle Corporation, 1998. All rights reserved.
Confirming Indexes
• The USER_INDEXES data dictionary view
contains the name of the index and its
uniqueness.
• The USER_IND_COLUMNS view contains
the index name, the table name, and the
column name.
SQL> SELECT ic.index_name, ic.column_name,
2 ic.column_position col_pos,ix.uniqueness
3 FROM user_indexes ix, user_ind_columns ic
4 WHERE ic.index_name = ix.index_name
5 AND ic.table_name = 'EMP';
20. 13-21 Copyright س Oracle Corporation, 1998. All rights reserved.
Removing an Index
• Remove an index from the data dictionary.
• Remove the EMP_ENAME_IDX index from
the data dictionary.
• To drop an index, you must be the owner
of the index or have the DROP ANY INDEX
privilege.
SQL> DROP INDEX emp_ename_idx;
Index dropped.
SQL> DROP INDEX index;
21. 13-22 Copyright س Oracle Corporation, 1998. All rights reserved.
Synonyms
Simplify access to objects by creating a
synonym (another name for an object).
• Refer to a table owned by another user.
• Shorten lengthy object names.
CREATE [PUBLIC] SYNONYM synonym
FOR object;
22. 13-23 Copyright س Oracle Corporation, 1998. All rights reserved.
Creating and Removing Synonyms
SQL> CREATE SYNONYM d_sum
2 FOR dept_sum_vu;
Synonym Created.
SQL> DROP SYNONYM d_sum;
Synonym dropped.
• Create a shortened name for the
DEPT_SUM_VU view.
• Drop a synonym.
23. 13-24 Copyright س Oracle Corporation, 1998. All rights reserved.
Summary
• Automatically generate sequence
numbers by using a sequence generator.
• View sequence information in the
USER_SEQUENCES data dictionary table.
• Create indexes to improve query retrieval
speed.
• View index information in the
USER_INDEXES dictionary table.
• Use synonyms to provide alternative
names for objects.
24. 13-25 Copyright س Oracle Corporation, 1998. All rights reserved.
Practice Overview
• Creating sequences
• Using sequences
• Creating nonunique indexes
• Displaying data dictionary information
about sequences and indexes
• Dropping indexes