5

Creating a new database (basic and advanced), It's my first time dealing with Oracle, in which I do not know why so many tables, triggers, views and other objects when only wanted to create a relational data base empty.

Is there another way to do this or is there something I missed understand?

Thank you.

Capture:

default tables

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
1antares1
  • 1,146
  • 2
  • 11
  • 19

2 Answers2

7

Those objects are owned by SYS user. You could verify it using following query:

SELECT * FROM DBA_OBJECTS WHERE OWNER = 'SYS';

To see the objects owned by other users, see:

SELECT * FROM DBA_OBJECTS WHERE OWNER <> 'SYS';

You must have logged in as SYS AS SYSDBA, therefore able to view the objects owned by SYS user.

Remember,

  • SYS/SYSDBA is special
  • Never ever use SYS (or SYSDBA) for general database purpose, but for administration/maintenance purpose (startup, shutdown, backup, recover)
  • SYS/SYSDBA is Oracle proprietary (try to open a SR/TAR starting with "i did that with SYS/SYSDBA" and you'll see the immediate answer)
  • SYS/SYSDBA does not act like any other user
  • When you use SYS/SYSDBA Oracle deactivates some code path and activates others
  • Whatever you do with SYS/SYSDBA will neither validate nor invalidate the same thing with any other user.

NEVER EVER use SYS/SYSDBA for anything that can be done by another user. Use SYS/SYSDBA ONLY for something that can't be done by someone else.

See this answer on AskTom by Tom Kyte.

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
-1

The dollar sign ($) is for system tables. You need to pretend you do not see them. They physically may not really be there. Many of the tools have an option to hide system tables and views. Many databases (access, SQL Server, ORACLE) have system objects that are there that you do not want to see.

This was actually part of Bryce and Codds original design for relational databases so that you can query the schema etc.

Sql Surfer
  • 1,344
  • 1
  • 10
  • 25
  • $ is a valid character for table names, it can be used for anything if you want, not just "system" tables. Also, not all system tables include a $ in their name. – Jeffrey Kemp Oct 13 '15 at 03:35
  • By convention I would never put app logic in a table or object that I created with the $ character. I had never even thought about it before that it was even possible until you pointed out this detail that it probably can be used. – Sql Surfer Oct 14 '15 at 00:10
  • Me too. I use `$` to mark tables that are not the "primary" tables of a data model - e.g. if I create a temporary copy of a table I might call it `EMP$COPY`. – Jeffrey Kemp Oct 14 '15 at 00:48