Introduction
IT Notes → Database → Oracle @ December 22, 2020
GENERAL:
- SQL is 4GL.
- “” can be used to make case sensitive for column names.
- Schema is like a folder in a database. It is objects that can be owned by a user account.
NORMAL FORM:
- 1NF –> No repeating groups 2-dimensional.
- 2NF –> Primary key that is not composite.
- 3NF –> No data that does not provide the intend of primary key.
- Boyce-Codd NF –> Remove certain rare logical inconsistencies.
- 4NF –> Every multivalued dependency is dependent on a super key.
- 5NF –> Every join dependency is a result of the candidate keys.
NAMESPACE:
- USER, ROLES, PUBLIC SYNONYMNS System.
- TABLE, VIEW, SEQUENCE, PRIVATE SYNONYMNS, USER DEFINED TYPES Schema.
- INDEX Schema.
- CONSTRAINT Schema.
DATATYPES:
- CHAR(n) Retrieved with spaces.
- VARCHAR2(n).
- NUMBER(n, m) n is precision – total number in either side after scaling m is scale – total number on right side of decimal point. If a value has more significant digits to the left of the decimal place than are specified in the format, then pound signs (#) replace the value. If a positive value is extremely large and cannot be represented in the specified format, then the infinity sign (~) replaces the value. Likewise, if a negative value is extremely small and cannot be represented by the specified format, then the negative infinity sign replaces the value (-~).
- DATE NLS_DATE_FORMAT NLS_TERRITORY.
- TIMESTAMP(n 1-9/6).
- TIMESTAMP(n 1-9/6) WITH TIMEZONE.
- TIMESTAMP(n 1-9/6) WITH LOCAL TIMEZONE.
- INTERVAL YEAR(n 1-9/2) TO MONTH.
- INTERVAL DAY(n1 1-9/2) TO SECOND(n2 1-9/6).
- BLOB.
- CLOB.
- NCLOB (UTF).
Subscribe
Login
0 Comments