The document discusses how to create and modify Oracle tables using SQL. It describes how to use the CREATE TABLE statement to define a table's structure, columns, constraints, and storage parameters. It also explains how to view table metadata using data dictionary views, add comments to tables and columns, and alter existing tables by adding or modifying columns while following certain restrictions.
The document describes various data definition language (DDL) and data manipulation language (DML) commands in MySQL. Some key commands include using CREATE to add new databases, tables, indexes, and constraints. ALTER is used to modify existing database objects. DROP removes databases, tables, columns or indexes. DML commands like SELECT are used to query data, WHERE filters rows, JOIN combines tables, and INSERT, UPDATE, DELETE modify data. COUNT, SUM, DISTINCT and other functions can be used to aggregate or transform result sets.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
This document provides an overview of the Oracle Data Manipulation Language (DML) and Transaction Control Language (TCL). It describes the basic DML commands - INSERT, UPDATE, and DELETE - which are used to manipulate data in database tables without changing the table structure. Examples are given for each DML command. It also discusses transactions, which group DML statements, and the TCL commands - COMMIT and ROLLBACK - used to control transactions.
The document provides information on various SQL commands used to create and manage databases and tables. It explains how to use SHOW, CREATE DATABASE, USE, SHOW TABLES, CREATE TABLE, DESCRIBE, ALTER TABLE, SELECT, UPDATE, DELETE, INSERT, CREATE VIEW commands. It also discusses table constraints like NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY and provides examples of how to implement them in CREATE TABLE and ALTER TABLE statements.
The document discusses data manipulation language (DML) statements in Oracle such as INSERT, UPDATE, DELETE, and MERGE. It provides examples of using each statement to add, modify, remove, and merge rows in database tables. It also covers transactions, locking, and maintaining data integrity with constraints when using DML statements.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
The document describes various data definition language (DDL) and data manipulation language (DML) commands in MySQL. Some key commands include using CREATE to add new databases, tables, indexes, and constraints. ALTER is used to modify existing database objects. DROP removes databases, tables, columns or indexes. DML commands like SELECT are used to query data, WHERE filters rows, JOIN combines tables, and INSERT, UPDATE, DELETE modify data. COUNT, SUM, DISTINCT and other functions can be used to aggregate or transform result sets.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
This document provides an overview of the Oracle Data Manipulation Language (DML) and Transaction Control Language (TCL). It describes the basic DML commands - INSERT, UPDATE, and DELETE - which are used to manipulate data in database tables without changing the table structure. Examples are given for each DML command. It also discusses transactions, which group DML statements, and the TCL commands - COMMIT and ROLLBACK - used to control transactions.
The document provides information on various SQL commands used to create and manage databases and tables. It explains how to use SHOW, CREATE DATABASE, USE, SHOW TABLES, CREATE TABLE, DESCRIBE, ALTER TABLE, SELECT, UPDATE, DELETE, INSERT, CREATE VIEW commands. It also discusses table constraints like NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY and provides examples of how to implement them in CREATE TABLE and ALTER TABLE statements.
The document discusses data manipulation language (DML) statements in Oracle such as INSERT, UPDATE, DELETE, and MERGE. It provides examples of using each statement to add, modify, remove, and merge rows in database tables. It also covers transactions, locking, and maintaining data integrity with constraints when using DML statements.
The document discusses various SQL statements and functions used for managing databases and querying data. It provides the syntax for SQL statements like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and functions like COUNT, AVG, MIN, MAX, SUM to operate on data in database tables. It also covers statements for altering tables, joining tables, filtering rows with WHERE and HAVING clauses, removing duplicates with DISTINCT, and ordering results.
The document discusses how to use Oracle's Data Definition Language (DDL) to define database objects like tables, views, indexes, and sequences. It provides the syntax for creating these objects using commands like CREATE, ALTER, and DROP. Examples are given for creating a table with various constraints, altering a table, creating views with subqueries, and using sequences to generate primary keys. The key DDL commands, data types, naming conventions, constraints, and how to populate and modify tables are summarized.
This document provides an overview of database concepts including creating, altering, and dropping databases and tables. It discusses data definition language (DDL) commands like CREATE, ALTER, DROP as well as data manipulation language (DML) commands like INSERT, SELECT, UPDATE, DELETE. It also covers database constraints, joins, functions for aggregation, strings, numbers, dates and more. The document is an introduction to core SQL concepts for a course on data management and database design.
The document discusses relational database management systems and the SQL language. It provides information on some key concepts:
1. Tables are the fundamental data structure in relational databases, organized as rows and columns. Each table has a unique name and columns must have unique names within the table.
2. SQL is the standard language used to communicate with relational databases to organize, manage and retrieve data. Key SQL commands include SELECT, INSERT, UPDATE, DELETE.
3. ALTER TABLE, CREATE TABLE, DROP TABLE, and other commands are used to define and modify database structure. Data types supported include numeric, date, text. Columns can be added, modified, or dropped from tables.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
SQL is a standard language for storing, manipulating and retrieving data in databases. It allows users to access and manipulate data in databases. Some key functions of SQL include executing queries against a database, retrieving data from a database, inserting, updating and deleting records in a database, and creating, altering and dropping database objects like tables.
This document provides an overview of SQL and database concepts. It discusses:
- The basic structure of tables, rows, columns, and data types
- The four main SQL languages: DDL, DML, TCL, and DCL and common commands like CREATE, INSERT, UPDATE, DELETE, etc.
- Database objects like tables, views, indexes, and how to query them
- Constraints like PRIMARY KEY, UNIQUE, NOT NULL and REFERENTIAL integrity
- Transactions with COMMIT, ROLLBACK, and SAVEPOINT
This document discusses SQL commands used for data manipulation. It describes four key SQL commands - SELECT, INSERT, UPDATE, and DELETE. SELECT is used to view data from a table. INSERT adds new rows to a table. UPDATE modifies existing data in a table. DELETE removes rows from a table. Syntax and examples are provided for each command.
This document provides a summary of MySQL commands in 3 parts. Part 1 covers general commands for databases, tables, data manipulation, and privileges. Commands include USE, SHOW, CREATE TABLE, INSERT, DELETE, GRANT, and REVOKE. The summary explains syntax, purpose, and common options for many basic MySQL statements.
This document summarizes the main DML (Data Manipulation Language) commands used for editing data in SQL: INSERT for adding new rows, UPDATE for changing existing rows, and DELETE for removing rows. It provides the syntax and examples for each command, including using default values, assigning null values, and specifying conditions with WHERE clauses.
This document provides summaries of common SQL statements including SELECT, INSERT, UPDATE, DELETE, ALTER TABLE, CREATE TABLE, JOIN, GROUP BY and more. Each statement is summarized with its basic syntax structure and purpose. For example, SELECT is used to retrieve data from one or more tables and includes the columns to select, tables to query from and optional filters.
SQL is a standard language used to manage data in relational database management systems. It can be used to create and modify database objects like tables and stored procedures, query and manipulate data, and set permissions. Common SQL statements include SELECT to query data, INSERT and UPDATE to modify data, CREATE and ALTER to define database structure, and DELETE to remove data. Transactions are managed using commands like COMMIT, ROLLBACK, and SAVEPOINT. Security is enforced using GRANT and REVOKE commands to manage user permissions on database objects.
The document discusses SQL database commands including DDL commands like CREATE, ALTER, DROP and TRUNCATE used to build and modify database structures. It describes using CREATE TABLE to generate tables with data types like VARCHAR2, CHAR, NUMBER, DATE and LOB types. ALTER TABLE adds, deletes or modifies columns and constraints. DROP TABLE deletes tables. DML commands like INSERT INTO, UPDATE and DELETE are used to add, modify and remove data from tables.
Views provide a virtual table that allows users to select specific columns and rows from underlying tables without storing any data. Views can reduce complexity, hide sensitive data, and improve performance. Indexed views can significantly improve query performance by adding an index, but have additional requirements around determinism and schema binding. Views must meet certain criteria to be updateable.
The document discusses views in SQL. It defines views as logical tables that represent data from one or more underlying tables. Views can be queried, updated, and deleted from like tables but do not occupy storage space. The document describes simple views based on a single table and complex views involving joins across multiple tables. It provides examples of creating, modifying, dropping, and querying views. The document also discusses indexes in SQL, describing them as pointers that speed up data retrieval. It covers B-tree and bitmap indexes and provides examples of creating indexes on tables.
This document discusses how to use data dictionary views in Oracle to obtain metadata about database objects. It describes the structure of the data dictionary and various views for querying information about tables, columns, constraints, views, sequences, synonyms and comments. These views include USER_OBJECTS, USER_TABLES, USER_TAB_COLUMNS, USER_CONSTRAINTS, USER_VIEWS, USER_SEQUENCES, and others. Examples are provided to demonstrate querying these views.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
SQL (Structured Query Language) is a standard language for accessing and manipulating databases. It allows users to execute queries against a database, retrieve data from a database, insert records into a database, update records in a database, and delete records from a database. Common SQL statements include SELECT to retrieve data, INSERT to add data, UPDATE to modify data, DELETE to remove data, and CREATE/ALTER to manage tables and databases.
SQL is a database sublanguage used to query and modify relational databases. It consists of two categories of statements: DDL (data definition language) used to define database schema objects like tables and indexes, and DML (data manipulation language) used to manipulate data within those objects. Oracle's SQL*Plus tool allows users to enter, edit, run and format SQL statements against an Oracle database. Common Oracle database objects include tables, views, indexes, triggers, and users. SQL statements like CREATE TABLE, ALTER TABLE, INSERT, UPDATE, DELETE and SELECT are used to define and manipulate data in database tables.
The document discusses how to use Oracle's Data Definition Language (DDL) to define database objects like tables, views, indexes, and sequences. It provides the syntax for creating these objects using commands like CREATE, ALTER, and DROP. Examples are given for creating a table with various constraints, altering a table, creating views with subqueries, and using sequences to generate primary keys. The key DDL commands, data types, naming conventions, constraints, and how to populate and modify tables are summarized.
This document provides an overview of database concepts including creating, altering, and dropping databases and tables. It discusses data definition language (DDL) commands like CREATE, ALTER, DROP as well as data manipulation language (DML) commands like INSERT, SELECT, UPDATE, DELETE. It also covers database constraints, joins, functions for aggregation, strings, numbers, dates and more. The document is an introduction to core SQL concepts for a course on data management and database design.
The document discusses relational database management systems and the SQL language. It provides information on some key concepts:
1. Tables are the fundamental data structure in relational databases, organized as rows and columns. Each table has a unique name and columns must have unique names within the table.
2. SQL is the standard language used to communicate with relational databases to organize, manage and retrieve data. Key SQL commands include SELECT, INSERT, UPDATE, DELETE.
3. ALTER TABLE, CREATE TABLE, DROP TABLE, and other commands are used to define and modify database structure. Data types supported include numeric, date, text. Columns can be added, modified, or dropped from tables.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
SQL is a standard language for storing, manipulating and retrieving data in databases. It allows users to access and manipulate data in databases. Some key functions of SQL include executing queries against a database, retrieving data from a database, inserting, updating and deleting records in a database, and creating, altering and dropping database objects like tables.
This document provides an overview of SQL and database concepts. It discusses:
- The basic structure of tables, rows, columns, and data types
- The four main SQL languages: DDL, DML, TCL, and DCL and common commands like CREATE, INSERT, UPDATE, DELETE, etc.
- Database objects like tables, views, indexes, and how to query them
- Constraints like PRIMARY KEY, UNIQUE, NOT NULL and REFERENTIAL integrity
- Transactions with COMMIT, ROLLBACK, and SAVEPOINT
This document discusses SQL commands used for data manipulation. It describes four key SQL commands - SELECT, INSERT, UPDATE, and DELETE. SELECT is used to view data from a table. INSERT adds new rows to a table. UPDATE modifies existing data in a table. DELETE removes rows from a table. Syntax and examples are provided for each command.
This document provides a summary of MySQL commands in 3 parts. Part 1 covers general commands for databases, tables, data manipulation, and privileges. Commands include USE, SHOW, CREATE TABLE, INSERT, DELETE, GRANT, and REVOKE. The summary explains syntax, purpose, and common options for many basic MySQL statements.
This document summarizes the main DML (Data Manipulation Language) commands used for editing data in SQL: INSERT for adding new rows, UPDATE for changing existing rows, and DELETE for removing rows. It provides the syntax and examples for each command, including using default values, assigning null values, and specifying conditions with WHERE clauses.
This document provides summaries of common SQL statements including SELECT, INSERT, UPDATE, DELETE, ALTER TABLE, CREATE TABLE, JOIN, GROUP BY and more. Each statement is summarized with its basic syntax structure and purpose. For example, SELECT is used to retrieve data from one or more tables and includes the columns to select, tables to query from and optional filters.
SQL is a standard language used to manage data in relational database management systems. It can be used to create and modify database objects like tables and stored procedures, query and manipulate data, and set permissions. Common SQL statements include SELECT to query data, INSERT and UPDATE to modify data, CREATE and ALTER to define database structure, and DELETE to remove data. Transactions are managed using commands like COMMIT, ROLLBACK, and SAVEPOINT. Security is enforced using GRANT and REVOKE commands to manage user permissions on database objects.
The document discusses SQL database commands including DDL commands like CREATE, ALTER, DROP and TRUNCATE used to build and modify database structures. It describes using CREATE TABLE to generate tables with data types like VARCHAR2, CHAR, NUMBER, DATE and LOB types. ALTER TABLE adds, deletes or modifies columns and constraints. DROP TABLE deletes tables. DML commands like INSERT INTO, UPDATE and DELETE are used to add, modify and remove data from tables.
Views provide a virtual table that allows users to select specific columns and rows from underlying tables without storing any data. Views can reduce complexity, hide sensitive data, and improve performance. Indexed views can significantly improve query performance by adding an index, but have additional requirements around determinism and schema binding. Views must meet certain criteria to be updateable.
The document discusses views in SQL. It defines views as logical tables that represent data from one or more underlying tables. Views can be queried, updated, and deleted from like tables but do not occupy storage space. The document describes simple views based on a single table and complex views involving joins across multiple tables. It provides examples of creating, modifying, dropping, and querying views. The document also discusses indexes in SQL, describing them as pointers that speed up data retrieval. It covers B-tree and bitmap indexes and provides examples of creating indexes on tables.
This document discusses how to use data dictionary views in Oracle to obtain metadata about database objects. It describes the structure of the data dictionary and various views for querying information about tables, columns, constraints, views, sequences, synonyms and comments. These views include USER_OBJECTS, USER_TABLES, USER_TAB_COLUMNS, USER_CONSTRAINTS, USER_VIEWS, USER_SEQUENCES, and others. Examples are provided to demonstrate querying these views.
The document discusses various SQL concepts like views, triggers, functions, indexes, joins, and stored procedures. Views are virtual tables created by joining real tables, and can be updated, modified or dropped. Triggers automatically run code when data is inserted, updated or deleted from a table. Functions allow reusable code and improve clarity. Indexes allow faster data retrieval. Joins combine data from different tables. Stored procedures preserve data integrity.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
SQL (Structured Query Language) is a standard language for accessing and manipulating databases. It allows users to execute queries against a database, retrieve data from a database, insert records into a database, update records in a database, and delete records from a database. Common SQL statements include SELECT to retrieve data, INSERT to add data, UPDATE to modify data, DELETE to remove data, and CREATE/ALTER to manage tables and databases.
SQL is a database sublanguage used to query and modify relational databases. It consists of two categories of statements: DDL (data definition language) used to define database schema objects like tables and indexes, and DML (data manipulation language) used to manipulate data within those objects. Oracle's SQL*Plus tool allows users to enter, edit, run and format SQL statements against an Oracle database. Common Oracle database objects include tables, views, indexes, triggers, and users. SQL statements like CREATE TABLE, ALTER TABLE, INSERT, UPDATE, DELETE and SELECT are used to define and manipulate data in database tables.
Oracle database is a relational database management system. The CREATE TABLE statement is used to create new tables with column names and data types. The ALTER TABLE statement modifies existing table structures by adding, dropping or modifying columns.
This slideshow aims to convey the basics of Oracle Database. This slideshow captures all the essential concepts and necessary visualizations to capture all the key concepts of Oracle RDBMS, along with providing all the essential steps to install it on your system, whether it be on Mac or Windows. Capturing all the concepts precisely and cogently, it also explains key concepts like joins in a diagrammatic fashion enabling viewers to visualize them for easier understanding and retention, along with providing them with the syntax to pick up writing simple queries.
This document discusses how to create and manage database tables. It covers how to create tables, add and modify columns, drop tables, rename objects, truncate tables, and add comments. The key statements covered are CREATE TABLE, ALTER TABLE, DROP TABLE, RENAME, TRUNCATE, and COMMENT. It also discusses data types that can be used for table columns.
This document provides an overview of databases and SQL. It begins by defining what a database is and the different types, including relational and non-relational databases. It then explains what SQL is and how it is used to perform CRUD operations on relational databases. The document outlines database structure and what tables are. It also describes key SQL concepts like data types, commands, queries, constraints, joins and more.
This document provides an overview of SQL (Structured Query Language) including key statements and concepts. It discusses the different types of SQL statements including DDL for definitions, DML for data manipulation, and DCL for access control. It also summarizes important SQL statements and clauses like SELECT, INSERT, UPDATE, DELETE, WHERE, GROUP BY, HAVING, ORDER BY and more. The document is intended as an introduction to the SQL language and relational database concepts.
This document provides an overview of SQL commands and functions. It covers topics such as creating and manipulating databases and tables, retrieving and modifying data, joining tables, and string operations. Some key points include:
- SQL commands are grouped into DDL, DML, DCL, and DQL for defining, manipulating, controlling, and querying databases.
- Tables can be created with or without constraints and records can be inserted, selected, updated, and deleted from tables.
- Joins allow data to be retrieved from multiple tables. Functions like COUNT, AVG, MIN, MAX, and SUM perform calculations on data.
- String functions allow manipulation of text, including uppercase, lowercase, substring,
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
This document discusses how to create, manage, and modify database tables in Oracle. The key points covered include how to create tables with column definitions and datatypes, alter tables by adding, modifying or dropping columns, rename and truncate tables, and add comments to tables. Operations like create, alter, drop, and truncate allow managing the structure of tables, while comments provide descriptive information.
The document discusses how to create and manage database tables. Key topics covered include using CREATE TABLE to define table structure, ALTER TABLE to modify tables, DROP TABLE to remove tables, and TRUNCATE TABLE to delete all rows. Datatypes, naming conventions, adding comments, and joining tables with subqueries are also summarized.
This document provides guidelines for developing databases and writing SQL code. It includes recommendations for naming conventions, variables, select statements, cursors, wildcard characters, joins, batches, stored procedures, views, data types, indexes and more. The guidelines suggest using more efficient techniques like derived tables, ANSI joins, avoiding cursors and wildcards at the beginning of strings. It also recommends measuring performance and optimizing for queries over updates.
The document discusses various components and concepts related to database management systems (DBMS). It defines a database as a collection of related data organized for easy access, management, and updating. It describes the main components of a DBMS as hardware, software, data, procedures, and database access language. It also discusses key DBMS concepts like data definition language, data manipulation language, functions, constraints, and having clause.
MySQL is a popular and freely available open-source relational database management system (RDBMS). It stores data in tables and relationships between data are also stored in tables. MySQL uses SQL and works on many operating systems. It has commands for data definition (CREATE, ALTER, DROP), data manipulation (SELECT, INSERT, UPDATE, DELETE), transaction control (COMMIT, ROLLBACK), and data access control (GRANT, REVOKE). Joins allow retrieving data from multiple tables by linking rows together. Common join types are inner joins, outer joins, and self joins.
Presented by,
Mr. Abhilash K
Database Architect, Livares Technologies
Introduction
About DBMS
A database management system (DBMS) is a software for
creating and managing databases. DBMS provides
users/programmers with a systematic way to create,
retrieve, update and manage data.
What is RDBMS
A type of DBMS in which the database is organized and
accessed according to the relationships between data
values. RDBMS are designed to take care of large amounts
of data and also the security of this data
The document discusses various Data Definition Language (DDL) commands in SQL such as CREATE, ALTER, and DROP for defining and modifying database structure. It explains how to create tables with columns, constraints, indexes and views. It also covers removing tables and altering table definitions by adding, modifying or dropping columns, constraints and indexes. Different database architectures like single, multi database and distributed databases are also summarized.
Database system concepts and architectures involve various data models including object-based, record-based, and physical models that describe data at different levels of abstraction. Common data models include the entity-relationship, object-oriented, hierarchical, network, and relational models. A schema defines the overall structure of a database, while an instance refers to the specific data stored in the database at a given time. Database languages like SQL are used to query, manipulate, and manage data through statements such as DDL for definitions, DML for manipulation, DCL for access control, and TCL for transactions.
This document provides an introduction to manipulating tables in MySQL, including how to alter tables by adding, dropping, and modifying columns, how to insert and import data into tables from files using commands like INSERT, REPLACE, LOAD DATA INFILE and the mysqlimport utility, and how to perform updates and queries on table data using commands like UPDATE and SELECT. Examples are given for each task to demonstrate the proper syntax and usage.
This document summarizes key aspects of electrocardiogram (ECG) analysis including rhythm, heart rate variability, axis determination, key waves and intervals like P, QRS, and QT. It also discusses common artifacts that can appear on ECGs like power line interference, motion artifacts, and baseline drift. Rhythm is analyzed and heart rate variability is categorized from very high to poor. Axis is determined using methods like the quadrant or three lead analyses. Intervals like PR and QT are examined.
Undergraduate Topics in Computer Science, Concise Computer Vision Reinhard Klette An Introduction
into Theory and Algorithms:
FEATURE DETECTION AND OBJECT DETECTION - Localization, Classification, and Evaluation - Descriptors, Classifiers and Learning
Image Processing, Facial Expression
Implicit and explicit methods are used to insert null or empty values into columns. Relational operators compare values and return true or false based on equal, not equal, greater than, less than comparisons. Logical operators return true if conditions joined by AND, OR, or NOT are met. Values can be sorted in ascending order based on their type as either lowest to highest numeric, alphabetical character, or earliest to latest date.
The document describes creating two partitioned tables. The first table book_17 is partitioned by range of the bid column into three partitions - p1 for bids less than 200, p2 for bids between 200 and 300, and p3 for bids between 300 and 500. The second table stud_89 is partitioned by list on the department column into two partitions - s1 for the departments of Maths and Phy, and s2 for the department of BCA. Some sample data is inserted into book_17 to demonstrate the partitions, with one row failing to insert as its value falls outside the partitions.
The document provides information on data definition language (DDL) concepts in Oracle databases including naming rules and conventions for tables and columns, data types, constraints, and default values. Some key points summarized:
- Table and column names can be 1-30 characters long using letters, numbers, $, _, and # but not spaces or hyphens. Names are stored in uppercase.
- Common data types include VARCHAR2, CHAR, NUMBER, DATE, LONG, and LOB types like CLOB and BLOB. Each has specific size and storage characteristics.
- Constraints like PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, and NOT NULL are used to enforce data integrity rules and validate column values.
- Oracle is a popular client/server database management system based on the relational database model. It is capable of supporting thousands of users simultaneously and storing terabytes of data.
- Oracle Corporation is the second largest software company in the world. Their flagship product is the Oracle database, which is widely used by organizations for mission-critical applications.
- Oracle software can run in stand-alone, client/server, or multi-tier architectures. The database component provides high availability, fault tolerance, security and management tools.
The document discusses key concepts related to database management systems including data, entities, entity sets, relationships, and database management systems. It defines data as information that has been translated into a form that is efficient for movement or processing. Entities are described as people, places, objects, events or items and entity sets are collections of related entities. Relationships describe interactions between entity sets and can be one-to-one, one-to-many, many-to-one, or many-to-many. A database management system (DBMS) is software that allows users to define, create, maintain and control access to the database, and is responsible for data management, transactions, data independence and security.
This document discusses inventory problems and the economic order quantity (EOQ) model. It covers:
- Types of inventory costs and notations used in EOQ models.
- The basic EOQ model which assumes constant demand rate and minimizes total inventory costs. This model is used to determine the optimal order quantity.
- Extensions of the basic EOQ model which relax some assumptions, such as models allowing for finite replenishment rates, shortages, quantity discounts, etc.
- Examples demonstrating how to apply the EOQ model to determine optimal order quantity and total costs for different inventory situations.
Unit-II B discusses game theory and mixed strategies. Mixed strategies involve assigning probabilities to each player's available strategies. This determines the expected payoffs for each player. For a 2x2 game without a saddle point, the method of oddments can be used to find the optimal mixed strategies. This involves calculating the differences between values in the payoff matrix, known as oddments. The oddments are then used to determine the probabilities with which each player should select their available strategies. The value of the game is equal to the expected payoff for either player using their optimal mixed strategy.
This document outlines the key concepts in game theory. It introduces two-person zero-sum games and discusses optimal strategies, including the maximin and minimax principles. A game has a saddle point solution when the maximin value for one player equals the minimax value for the other player, indicating their optimal strategies and the game's value.
The document provides an overview of queuing theory and queuing models. It discusses key concepts such as arrival and service processes, queuing disciplines, classification of queuing models using Kendall's notation, and solutions of queuing models. Specific queuing models discussed include the M/M/1 model with Poisson arrivals and exponential service times. The document also covers probability distributions for arrivals, service times, and inter-arrival times as well as the pure birth and pure death processes.
Why Operations Research?
Introduction
Origin of operations research
Definition of operations research
Characteristics of operations research
Role of operations research in decision-making
Methods of solving operations research problem
Phases in solving operations research problems
Typical problems in operations research
Scope of operations research
Why to study operations research
Nita H.Shah Ravi M. Gor Hardik Soni
Why Operations Research?
Introduction
Origin of operations research
Definition of operations research
Characteristics of operations research
Role of operations research in decision-making
Methods of solving operations research problem
Phases in solving operations research problems
Typical problems in operations research
Scope of operations research
Why to study operations research
Web Technology under CSS - Introduction, Advantages, Adding CSS, Browser Compatibility, CSS and Page Layout finally Selectors all are referred with Uttam K. Roy
The document discusses various hashing techniques for storing data in a list. It describes how hashing works by using a hashing algorithm to map a key to an address in the list. Common hashing methods include direct hashing, modulo division, digit extraction, and pseudorandom generation. The document also discusses collision resolution techniques like open addressing, linked lists, linear probing, and bucket hashing. Real-world hashing algorithms may combine multiple steps and techniques to optimize storage and retrieval of data.
The document discusses different types of searching algorithms for lists. It describes linear/sequential search which searches the entire list sequentially to find a target. Binary search requires an ordered list and works by dividing the list in half on each step to search for the target. The document provides pseudocode for linear search and binary search algorithms. It also discusses variations of linear search like sentinel search and search of ordered lists. Binary search has better efficiency of O(log n) compared to O(n) for linear search.
Standard Generalized Markup Language (SGML) is a metalanguage used to define markup languages like HTML and XML. It requires defining document structure rules through a Document Type Definition (DTD). While powerful, SGML is complex. HTML simplified SGML and does not require a DTD. The World Wide Web Consortium (W3C) develops standards to ensure the long-term growth of the web, including HTML versions like HTML5 which adds audio/video embedding and new elements.
This document provides an overview of data structures and algorithms. It discusses pseudo code, abstract data types, atomic and composite data, data structures, algorithm efficiency using Big O notation, and various searching algorithms like sequential, binary, and hashed list searches. Key concepts covered include pseudo code structure and syntax, defining algorithms with headers and conditions, and analyzing different search algorithms.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
2. Create an Oracle Table
A user creates an Oracle table in the SQL*Plus environment.
An Oracle table is created from the SQL>Prompt in the SQL*Plus environment.
A Data Definition Language (DDL) SQL statement, CREATE TABLE, is used for table
creation.
A table is created as soon as the CREATE statement is successfully executed by the
Oracle Server.
3. Syntax
CREATE TABLE [schema.]tablename
(column1 datatype [CONSTRAINT constraint name] constraint type…,
column2 datatype [CONSTRAINT constraint name] constraint type…,
[CONSTRAINT constraint_name] constraint_type (column,…)…);
Schema optional and it is same as the user’s login name.
Tablename name of the table given by the user.
Column name of the single column.
Datatype column’s data type and size.
Constraint_name name of constraint provided by the user as per the
conventions.
Constraint_type integrity or value constraint.
4. Each column may have zero, one or more constraints defined at the
column level.
The table level constraints are normally declared after all column
definitions.
SQL is not case sensitive.
The reserved words are written in capitalized letters and user-defined
names in lower or mixed-case letters.
The spaces, tabs and carriage returns are ignored.
5. We will debug the statement using SQL*Plus commands only in Oracle9i.
Go to debugging line (* is displayed next to the current line number).
Replace the errored character or spelling mistake in any line, or append a comma(,) to
the line.
Execute the debugged statement using a slash (/).
6. They table is created.
We can edit erroneous statement with the help of an alternate editor, such as
notepad.
To load an erroneous statement in notepad and modify it.
At the SQL>prompt, we type Ed (or Edit) to invoke notepad
We make required corrections to the script.
We save our statement on the disk using the save option from the file menu in notepad
and we name our statement ‘A:CREATE’.
Notepad adds the extension .txt to the filename.
To suppress Notepad’s default .txt extension, type the file name in a pair of double
quotes, and use the extension .sql.
We exit notepad to go back to the SQL*Plus environment.
We can run the saved statement with @ or the RUN command.
The “Table created” message is displayed when the statement is error-free.
At this point, the table is created and its structure is saved.
7. Storage Clause in Create Table
A Create table statement may have an optional Storage clause.
It is used to allocate initial disk space for the table at the time of creation
with the Initial parameter and also to allocate additional space with the
next parameter in case the table runs out of allocated initial space.
CREATE TABLE divisions (div_no NUMBER(2),
div_name VARCHAR2(14),
location VARCHAR2(13) )
STORAGE ( INITIAL 100K NEXT 50K
MINEXTENTS 1 MAXEXTENTS 50
PCTINCREASE 5);
8.
9. Parameter Description
INITIAL The size, in bytes, of the first extent allocated when a segment is created. This parameter cannot be specified in an ALTER statement.
NEXT The size, in bytes, of the next incremental extent to be allocated for a segment. The second extent is equal to the original setting
for NEXT. From there forward, NEXT is set to the previous size of NEXT multiplied by (1 + PCTINCREASE/100).
PCTINCREASE The percentage by which each incremental extent grows over the last incremental extent allocated for a segment. If PCTINCREASE is 0,
then all incremental extents are the same size. If PCTINCREASE is greater than zero, then each time NEXT is calculated, it grows
by PCTINCREASE. PCTINCREASE cannot be negative.
The new NEXT equals 1 + PCTINCREASE/100, multiplied by the size of the last incremental extent (the old NEXT) and rounded up to the
next multiple of a block size.
MINEXTENTS The total number of extents to be allocated when the segment is created. This allows for a large allocation of space at creation time, even
if contiguous space is not available.
MAXEXTENTS The total number of extents, including the first, that can ever be allocated for the segment.
FREELIST
GROUPS
The number of groups of free lists for the database object you are creating. Oracle uses the instance number of Oracle Real Application
Cluster instances to map each instance to one free list group. For information on the use of this parameter, see Oracle9i Real Application
Clusters Administration.
Note: This parameter is ignored for objects created in locally managed tablespaces with segment space management specified as AUTO.
FREELISTS Specifies the number of free lists for each of the free list groups for the schema object. Not valid for tablespaces.The use of this
parameter is discussed in Oracle9i Database Performance Tuning Guide and Reference.
Note: This parameter is ignored for objects created in locally managed tablespaces with segment space management specified as AUTO.
OPTIMAL Relevant only to rollback segments. See Chapter 13, "Managing Undo Space" for information on the use of this parameter.
BUFFER POOL Defines a default buffer pool (cache) for a schema object. Not valid for tablespaces or rollback segments. For information on the use of
this parameter, see Oracle9i Database Performance Tuning Guide and Reference.
10. TABLESPACE clause is used to specify the user’s tablespace name.
If it is not specified, Oracle uses the default permanent tablespace anyway.
The STORAGE clause allocates 1 MB initially on tablespace CIS_DATA and 100 KB additional
space on the same tablespace.
The INITIAL and NEXT parameters use values in K (KB) or M (MB).
The PCTFREE (percentage-free) clause is used to allow for future increment in row size.
Oracle recommends the following formula in deciding initial extent size for a table.
AVG_ROW_LEN . Number of rows . (1 + 0.15) . (1 + PCTFREE/100)
The AVG_ROW_LEN is a column in USER_TABLES Data Dictionary table.
The 0.15 (15%) is recommended for overhead.
12. Viewing a user’s table names
A users types an SQL statement to retrieve table names.
To review information, to find out what has already been created and what is to
be created and to find out all tables owned by you.
Syntax
SELECT TABLE_NAME FROM USER_TABLES;
Oracle creates system tables to store information about users objects.
USER_TABLES is an Oracle system database table and table has many other
colums.
TABLE_NAME is one of its columns.
The display will include all table names you have created and any other can get
listing of all tables you own as well as those you are granted privileges to by
other users.
13. Get information about STORAGE clauses attributes by using the Data
Dictionary view USER_SEGMENTS
Syntax
SELECT Segment_Name,Name2 FROM USER_SEGMETNS;
14. Viewing a Table’s Structure
You can display the structure entered by you in table creation statement.
If you have made any changes to the table’s structure.
The command is DESCRIBE OR DESC which doesn’t need a semicolon at the end because it
is a not a SQL Statement.
The default display of column names, the NOT NULL constraint, and data type are in
uppercase
You didn’t add a NOT NULL constraint for the primary keys, but by default.
Oracle adds it for all primary key columns.
15.
16. Viewing constraint information
Oracle’s Data Dictionary table USER_CONSTRAINTS stores information about
constraints have entered for each column.
The statement and the result, which include the constraint’s name and type.
When you type statement, the table name must be typed in uppercase, because
Oracle saves table names in uppercase.
If you type the table name in lowercase, no constraint names will be displayed.
The constraints named by the user have more meaningful names than the ones
named by Oracle.
Constraints like NOT NULL are usually not named by the user.
17. Oracle names them using the SYS_Cn format, where n is any number.
Constraint type C is displayed for NOT NULL and CHECK constraints.
Constraint type P for primary key and type R is foreign key constraints.
The ORDER BY clause is added to sort the constraint display by table name.
In this statement, only the table name within single quotes needs to be in uppercase.
Oracle stores table names in that case.
select COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_COLUMN_NAME,
REFERENCED_TABLE_NAME from information_schema.KEY_COLUMN_USAGE where
TABLE_NAME = 'yourTableName';
select CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME from USER_CONS_COLUMNS
where TABLE_NAME = 'yourTableName';
18. Viewing tablespace information
A tablespace consists of one or more physical data files.
Get information about all tablespaces available to you by using Data
Dictionary view USER_TABLE_SPACES.
Use the DESCRIBE command and the SELECT statement with a view the
same way you use with tables.
Data Dictionary view, USER_USERS gives user information about his or her
account as well as permanent and temporary tablespace.
DESCRIBE user_tablespace SELECT * from USER_TABLESPACE;
SELECT * from USER_USERS;
19. Comment on tables and columns
When you create a table, you can add comments to the table and its column.
Do it for documentation purpose with a COMMENT statement.
View information about all comments on tables and columns by using Data Dictionary views
ALL_TAB_COMMENTS and ALL_COL_COMMENTS.
COMMENT ON TABLE STUDENT IS ‘Table holds students for INDO-US-College’
COMMENT ON COLUMN employee.Lname IS ‘Employee’s last name’
20. Altering an existing table
In a perfect scenario, the table you create will not need any structural modifications.
To plan and design a database that is close to perfect in all respects.
Every perfect tables need changes.
There are certain modifications that you can make to a table’s structure.
There are other modifications that you can’t make to an existing table’s structure.
21. Modifications allowed without any
restrictions
Modifications allowed with any
restrictions
Modifications not allowed
Adding a new column to the table
Deleting a foreign key constraint from a table Adding a foreign key constraint is allowed only if the
current values are null or exist in the referenced
table’s primary key.
Deleting a primary key constraint from a table,
which also removes any references to it from
other tables in the database with CASCADE
clause.
Adding a primary key constraint is allowed if the
current values are not null and are unique.
Increasing the size of a column.
Example: Varchar2(15) can be changed to
Varchar2(20)
Changing a column’s data type and size is allowed
only if there is no data in it. In Oracle9i, column size
may be decreased if existing data can be stored with
the new column width.
Renaming columns and constraints (Oracle9i
onward)
Adding a unique constraint is possible if the current
data values are unique.
Adding a check constraint is possible if the current
data values comply with the new constraint.
Adding a default value is possible if there is no data
in the column.
Changing a column’s name
Changing a constraint’s name
Removing a column
Above all Oracle8 and earlier
22. Adding a new column to an existing table
Syntax
ALTER TABLE tablename ADD columnname datatype;
If the table already contained rows of data, you will have to use UPDATE
statement for each row to add values in the newly added column.
23. Modifying an existing column
Syntax
ALTER TABLE tablename MODIFY columnname newdatatype;
Where newdatatype is the new data type or new size for the column.
24. Adding a constraint
Syntax
ALTER TABLE tablename ADD [CONSTRAINT constraint_name] constraint_type (column);
The ALTER table statement that adds a new constraint to the COURSE or same table.
The foreign key column Eid references primary key column CID of its own table.
Such a reference is known as a circular reference.
ALTER TABLE course
ADD CONSTRAINT COURSE_EID_FK FOREIGN KEY(EID)
REFERENCES COURSE(CID);
25. Use a CHECK constraint will guarantee the necessary data integrity.
The problem is that during creation of the TERM table, defining a constraint that compares
values in two columns of the same table is not possible.
To create a foreign key constraint, the parent table, whose primary key column is
referenced by the child table’s foreign key column, must already exist in the database.
Even the primary key column that is referenced must exist in the parent table defined as
the primary key.
The two columns, the foreign key and the primary key that it references need not have
the same name.
To create all tables without any foreign key constraints first, then create tables using
CREATE TABLE statement with FOREIGN KEY constraints to the reference tables already
created.
ALTER TABLE term
ADD CONSTRAINT term_startdate_ck
CHECK(StartDate < EndDate);
26. To create all tables with their constraints except for the foreign key
constraint.
Once all the tables are created, use the ALTER TABLE statement to add the
FOREIGN KEY constraint.
The foreign key must reference a primary key.
27. NOT NULL constraint and a DEFAULT value to the start term and state
columns, respectively.
A user can always overwrite the default value, but if it is left blank or null,
the default value is used by Oracle.
To add such constraints, a MODIFY clause is used with an ALTER TABLE
statement.
ALTER TABLE course MODIFY name varchar(20)
CONSTRAINT course_name_nn NOT NULL;
28. Dropping a column (Oracle8i onward)
Only one column can be dropped at a time.
The column may or may not contain any data.
When you drop a column, there must be at least one column left in the table.
It can’t remove the last remaining column from a table.
It is not possible to recover a dropped column and its data.
Syntax
ALTER TABLE tablename DROP COLUMN columnname;
Oracle9i also allows a user to mark columna as unused
ALTER TABLE tablename SET UNUSED (columnname);
Syntax
ALTER TABLE student SET UNUSED (age);
29. The unused columns are liked dropped columns.
This is not a very good feature, because the storage space used by unused columns is not
released.
They aren’t displayed with other columns or in the table’s structure, and the user can drop
all unused columns.
Setting a column to unused is quicker than dropping a column and it requires fewer system
resources.
It can remove all unused columns when system resources are in less demand.
Syntax
ALTER TABLE tablename DROP UNUSED columns;
Example
ALTER TABLE student DROP UNUSED columns;
If no columns are marked as unused, this statement doesn’t return any error messages.
30. Dropping a constraint
It can view constraint information from the USER_CONSTRAINTS table or the
USER_CONS_COLUMNS table.
A dropped constraint is no longer enforced by Oracle, and it doesn’t show up in the list of
USER_CONSTRAINTS or USER_CONS_COLUMNS.
You can drop a constraint by using its name, which is why it is important to name all
constraints with a standard naming conversion.
Syntax
ALTER TABLE tablename DROP PRIMARY KEYUNIQUE (columnname) |
CONSTRAINT constraintname [CASCADE];
ALTER TABLE major
DROP PRIMARY KEY CASCADE;
ALTER TABLE employee
DROP CONSTRAINT employee_deptid_fk;
31. Enabling/Disabling Constraints
A newly created constraint is enabled automatically.
A constraint verifies table data as they are added or updated.
This verification slows down the process, so you may want to disable a constraint if
you are going to add or update large volume of data.
When you re-enable the constraint, Oracle checks the validity of the data and for any
violations.
You may disable multiple constraints with one ALTER TABLE statement, but you may
only enable one constraint at a time.
32. There is no CASCADE clause with ENABLE.
This enable and disable clauses can also be used in a CREATE TABLE
statement
Syntax
ALTER TABLE tablename ENABLE/DISABLE CONSTRAINT constraintname;
ALTER TABLE tablename ENABLE/DISABLE PRIMARY KEY;
ALTER TABLE major
DISABLE PRIMARY KEY ;
ALTER TABLE employee
ENABLE employee_deptid_fk;
33. Tables Explanation
Renaming a column
(Oracle9i version 9.2 onward)
ALTER TABLE tablename RENAME COLUMN oldname to
newname;
Renaming a constraint
(Oracle9i version 9.2 onward)
ALTER TABLE tablename RENAME CONSTRAINT oldname to
newname;
Modifying storage of a table ALTER TABLE tablename STORAGE (NEXT nk);
It can change storage attributes of a table, such as NEXT,
PCTFREE, and so on.
34. Dropping a table
When a table is not needed in the database, it can be dropped.
When a table is dropped, all data and the table structure are permanently deleted.
The DROP operation can’t be reversed.
You can drop a table only if you are the owner of the table or have the rights to do so.
Many other objects based on the dropped table are affected.
All associated indexes are removed.
The table’s views and synonyms become invalid.
Oracle displays a “Table dropped” message when a table is successfully dropped.
If you add the optional CASCADE CONSTRAINTS clause, it removes foreign key references
to the table as we..
Syntax
DROP TABLE tablename [CASCADE Constraints];
35. Renaming a table
You can remove a table provided are the owner of the table.
Oracle displays a “Table dropped” message when this statement is
executed.
The RENAME statement can be used to change name of other Oracle
objects, such as view, synonym or sequence.
Syntax
RENAME oldname to newname;
RENAME dept to department;
36. Truncating a table
It is removing all records/ rows from the table.
The SQL language has a DELETE statement that can be used to remove on
or more rows from the table and it is reversible as long as it is not
committed.
The TRUNCATE statement, is not reversible.
It releases storage space occupied by the table, but deletion does not.
Syntax
TRUNCATE TABLE Tablename;
37. Oracle displays a “Table truncated” message on this statement execution.
The truncate operation releases all table storage except for the initially
allocated extent.
It can keep all the storage used by table with the REUSE STORAGE clause
Syntax
TRUNCATE TABLE TablenameREUSE STORAGE;
38. Oracle’s Various Table Types
Types Explanantion
Permanent Tables It used for storing data
Temporary Tables It used during a session or a transaction and like permanent tables,
but they aren’t stored permanently.
They store data during a session or a transaction
They are created with CREATE GLOBAL TEMPORARY TABLE statement
Index organized Tables It used for tables with primary key values that are looked up frequently.
They are created with a CREATE TABLE tablename…… ORGANIZATION INDEX
statement.
External Tables They are stored “outside” the database with CREATE TABLE tablename ….
ORGANIZATION EXTERNAL statement.
These tables are based on flat directory path is made known to Oracle with a CREATE DIRECTORY
statement. In most cases, the end user works with permanent data tables only.
39. Spooling
It is a very handy feature.
During a session, a user can redirect all statements, queries, commands and results to a file
for later review or printout.
The spooling method creates a text file of all actions and their results.
It is redirected to the file, which is saved with an .lst extension by default.
Start File menu in SQL*Plus window.
Click Spool on Spool File and enter file name, which will be created with an .lst
extension.
To stop spooling at any point, use the same menu to click on Spool Off.
When spooling is turned off, the file is saved to the disk and closed.
The spooled file can be opened in any text editor, such as Notepad, for viewing or printing.