User Tools

Site Tools


mapping_database_objects_to_files

Mapping of Database Objects to Files

Lure uses the properties as defined in the Lure configuration file to determine how to map objects in the database to folders and files on the file system.

In addition Lure maps all source files to a source folder subtree below the folder that contains the Lure connection file. The folder containing the Lure connection file is also referred to in this documentation as the Lure Root folder.

To illustrate this consider the following possible subset of properties from the Lure confguration file:

package.folder=code/packages
package.ext=pack
package.and.body.files=ONE

Let's assume that the Lure connect file is located in the folder “C:\workspace\project1\sql” then a database package with name STORE_DATA within the schema with name MY_SCHEMA will be mapped by Lure to the following filename:

C:\workspace\project1\sql\MY_SCHEMA\code\packages\STORE_DATA.pack.lsql

The file name and path are determined as follows:

  1. The first part of the path is the Lure Root folder, in this case “C:\workspace\project1\sql”.
  2. Below that will always be a folder with the same name as the database schema within which the object lives.
  3. Below that is the relative path for the object type as specified in the Lure configuration file. For this example the type is a database package for which the relative path is “code/packages”.
  4. Next is the filename of the text file where the database source code will be stored. Lure maps a package to a file with the same name as the package name (using the same case).
  5. With regards to the extension, from Lure version 3 onwards all source files have ”.lsql” appended as an additional extension. The complete extension is therefore “pack.lsql”

Lure maps different object types in slightly different ways. For packages it is possible to configure Lure such that the package and corresponding package body are mapped and stored in the same or in seperate files (two files). In this example the package and package body are mapped to one file.

The different object types are mapped to filenames as follows:

Object Type Filename
(excluding the extension)
Options
Packages and Package Bodies Same as the package name The property package.and.body.files determines whether a package and package body are stored in a single file (the package file) or in seperate files
Types and type bodies Same as type name The property type.and.body.files determines whether a type and type body are stored in a single file (the type file) or in seperate files
Procedure Same as procedure name -
Function Same as function name -
Trigger Same as the trigger name -
Java source Same as Java source name -
View Same as view name -
Table Same as table name -
Global temporary table Same as table name -
Materialized view Same as materialized view name -
Materialized view log Same as table name for which the log was created -
Indexes Same as table name on which the index was created If the owner of the table is different from the current schema then the table schema name is prepended to table name.
Sequence The owner schema name of the sequence -
Constraint Same as the table name on which the constraint was created -
Synonyms The owner name of the object for which the synonym was created -
Database link Same as database link name -
Object privileges Same as the owner name of the object for which the privilege is granted. All grants for objects from a schema are stored in one file with the name of the schema as the filename.
Refresh groups The same as the name of the refresh group. If the owner of the refresh group is different from the current schema then the schema name is prepended to the refresh group name.
Clusters The same as the name of the cluster. -
Operator The same as the name of the operator. -
Indextype The same as the name of the indextype. -
Library The same as the name of the library. -
Dimension The same as the name of the dimension. -
mapping_database_objects_to_files.txt · Last modified: 2013/07/29 18:57 by admin

Page Tools