The difference between SQL SERVER and ORACLE object.
Classification
Microsoft SQL Server
Oracle
Number of columns
1024
254
The size of the row
8060 bytes, and each text or image column to indicate the 16-byte
Unlimited (one for each row of the long or long raw allowed)
The maximum number of rows
Unlimited
Unlimited
Blob type of storage
16-byte pointer stored in each row. Data stored in different data pages
For each table a long or long raw, must be the end of the line, the data stored in the same block row
Clustered indexes on tables
One for each table
One for each table (a table with index)
Non-clustered indexes on tables
249 for each table
Unlimited
The maximum number of columns in an index of
16
16
The maximum length of column values in the index
900-byte
½ block
Table Naming Conventions
[[[Server.] Database.] Owner.] Table_name
[Schema.] Table_name
SQL SERVER and ORACLE how to deal with an object identifier
Oracle
Microsoft SQL Server
1-30 characters in length.
Database Name: up to 8 characters
Database link names: up to 128 characters
1 to 128 Unicode characters long
Temporary table names: up to 116 characters
Identifier names begin with an alphabetic character and alphanumeric characters, or _, $, #, must contain characters.
Identifier names must start with an alphanumeric character or _ and in fact you can use any character.
Identifier begins with a space or _, @, #, or $ if they contain characters other than those, around the identifier name [] (separator) must be used.
Object if you start with @,
This is a local variable.
# Local temporary object.
# # Is a global temporary object.
The table space name must be unique.
The database name must be unique.
User accounts (schemas) in the name of the identifier must be unique.
Identifier in the database user account name must be unique.
See the table and column names must be unique from.
See the table and column names must be unique from.
The name of the index in a user schema must be unique.
The name of the index in the database table name must be unique.
Table and index storage parameters
Oracle
Microsoft SQL Server
CREATE TABLE DEPT_ADMIN.DEPT (
DEPT VARCHAR2 (4) NOT NULL,
DNAME VARCHAR2 (30) NOT NULL,
CONSTRAINT DEPT_DEPT_PK
PRIMARY KEY (DEPT)
USING INDEX TABLESPACE USER_DATA
PCTFREE 0 STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED),
CONSTRAINT DEPT_DNAME_UNIQUE
UNIQUE (DNAME)
USING INDEX TABLESPACE USER_DATA
PCTFREE 0 STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED)
)
PCTFREE 10 PCTUSED 40
TABLESPACE USER_DATA
STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED
FREELISTS 1)
CREATE TABLE USER_DB.DEPT_ADMIN.DEPT (
DEPT VARCHAR (4) NOT NULL,
DNAME VARCHAR (30) NOT NULL,
CONSTRAINT DEPT_DEPT_PK
PRIMARY KEY CLUSTERED (DEPT),
CONSTRAINT DEPT_DNAME_UNIQUE
UNIQUE NONCLUSTERED (DNAME)
)
No comments:
Post a Comment