Oracle Database Sqldeveloper Study (1)

Source: Internet
Author: User

  1. we often use SQL statements For example, select name, gender from student table to the Student this table query, this is a simple query, but when we want to table1,table2,table3, table4 ... Many tables for multi-table queries, we do not want to write each time a row of connection statements we want to let the database remember this complex statement to let the database to compile this complex statement into the database cache (faster)!! Or we don't want programmers to know that this complex query involves Table1,table2,table3, table4 ... So many tables, then we can build a view like a programmer to provide view instead of SQL. In fact, this view is a name of the query statement, the view will be put into the cache database instance pre-compiled! He is a virtual table!!!

  2. Table can insert delete update
    View is only a query result and cannot be modified for data.

  3. View is the equivalent of a SQL query method name, in the use you need to use the name directly without the need to enter a long list of SQL

  4. In fact, from a literal understanding, a view is based on a SQL query logic from one or several tables
    You see the content of the view, which is essentially a SQL that is easy for developers to reuse
    The difference between a view and a table is that the table involves data storage (segment, segment), and the view does not.

  5. In Oracle, all database objects owned by a user are called (schemas).
    A schema is a collection of database objects. A schema object is a logical structure of database data. (The database objects are separated into different logical structures by the schema).
    In Oracle, patterns differ from users in that they differ in the following:
    The schema is a collection of database objects, in order to differentiate the collection, give the collection a name, these names are many similar user names in the Enterprise Manager's scheme to see the node, these similar user name node is actually a Schema,schema contains a variety of objects such as tables , views, sequences, stored procedures, synonyms, indexes, clusters, and database links. A user typically corresponds to a schema, the user's schema name equals the user name, and is used as the default schema for that user. This is why you see the schema name as the database username under the Enterprise Manager scenario. The Oracle database cannot create a new schema, and to create a schema, it can only be solved by creating a user's method (although Oracle has the CREATE SCHEMA statement, it is not used to create a schema) Create a user with a schem that has the same name as the user name and act as the default shcema for that user. That is, the number of schemas is the same as the number of user, and the schema name corresponds to the user name one by one and the same, all we can call the schema as the user alias, although this is not accurate, but it is easier to understand some.
    A user has a default schema, whose schema name is equal to the user name, and of course a user can use other schemas. If you visit a table without indicating which schema the table belongs to, the system automatically adds the default Sheman name to the table. For example, when accessing the database, access to the EMP table under the Scott user, through the select * from EMP; In fact, the complete syntax for this SQL statement is select * from Scott.emp. The full name of an object in the database is Schema.object, not user.object. Similarly, if the object's schema is not specified when the object is created, the schema of the object is the default schema for the user. This is like a user with a default tablespace, but the user can also use a different tablespace, and if you do not specify a tablespace when creating the object, the object is stored in the default tablespace, and you need to specify the table space for the object when you create the object, if you want to store the object in a different table space.

This article from "Ming Empty House" blog, reproduced please contact the author!

Oracle Database Sqldeveloper Study (1)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.