Chapter 7. Populating the Database

In This Chapter

  • Making tablespaces

  • Getting into users and schemas

  • Knowing database objects

It's no secret that databases hold data: typically lots of it. However, data isn't just loose in the database; data lives in structures, which are owned by users. Furthermore, this isn't a random collection of data and objects; it supports a specific application.

In this chapter we focus less on the actual data itself and more on the structures that hold the data and control access to that data. We explain tablespaces and their role in object storage. Objects must have an owner, and we explain how users have schemas that contain objects. Database objects that a user can own include — but are not limited to — tables, indexes, and views.

A database application includes the tables, indexes, PL/SQL code, and other objects executing the program logic inside the database. Depending on the application's size and nature, building an application structure within a database can be complex.

Note

Here is the general order of operations for building an application environment:

  1. Create the tablespaces that will contain the tables and indexes for the application.

  2. Create the database account who will own the database objects for the application.

  3. Create the objects (tables, indexes, packages, and so on) in the application owner's schema.

  4. Create any synonyms for object names and database roles to control access to the application schema owner's objects.

  5. Load the data into the tables and ...

Get Oracle® 11g For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.