Difference between revisions of "Database Views"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
'''Designer > Data > Database Views'''
'''Designer > Data > Database Views'''


Reports are created by extracting data from the platform, based on a selected category. A basic report can include information from a single object, and look very much like a View. In addition to reports based on objects and predefined categories, Database Views can define complex data models (categories) across multiple, related objects. Database Views pull fields from multiple, linked objects into a joined category, without directly affecting any of the objects, and yet providing full reporting capability.  
Reports are created by extracting data from the platform, in the form of a Database View.  


;Considerations:
==About Database Views==
*Database Views can be used to build [[Reports]] or [[Web Tabs]]
A basic Database View can include information from a single object, and look very much like the [[View]] of a single object. But a Database View can also define a complex data model, by specifying a ''join'' across multiple, related objects. The Database View can then contain fields from the linked objects, providing greatly augmented reporting capability.
 
==Working with Database Views==


{{permissions|Customize Objects|create a Database View}}
{{permissions|Customize Objects|create a Database View}}


==Create or Edit a Database View==
;Considerations:
:*Database Views can be used to build [[Reports]] or [[Web Tabs]]
:*Edits to a Database View are only allowed after checking against existing reports
:*Fields can be removed from the Database View for various reasons - an object can be removed and replaced with a new object or a new set of fields can be selected
:*If any fields that are being removed are used in reports based on this Database View, the edits to the Database View will not be allowed; You will have to remove the fields from the affected reports before completing the edit on this Database View
 
===Create or Edit a Database View===
To create or edit a Database View:
To create or edit a Database View:
#Click '''Designer > Data > Database Views'''
#Click '''Designer > Data > Database Views'''
Line 14: Line 22:
#*Click the '''[New Database View]''' button to create a new Database View
#*Click the '''[New Database View]''' button to create a new Database View
#*Click the name of the Database view to edit
#*Click the name of the Database view to edit
#Select the desired Objects (move objects to/from the Selected Objects column)
#Specify the Database View Settings (below)
#In the ''Filter by Record Ownership'' section, use the Checkbox [[File:checkboxicon.gif|Link=]] icon to choose one or more objects
#*The Objects selected here define the fields available for filtering in [[Reports]]
#In the ''Custom Aliases'' section, note that the alias fields are autopopulated
#*The default alias name format for {{type|}}s is different from the format for {{type}}s, but can be modified
#Click '''[Next]'''
#Click '''[Next]'''
#Define the relationship (Joins) between the objects selected
#Define the relationship (Joins) between the objects selected
#:See [[Defining Relationships (Joins)]] for more information
#:See [[Defining Relationships (Joins)]] for more information


==Define Relationships (Joins)==
===Database View Settings===
 
====Select Objects to Join====
#Select the desired Objects by moving them to the Selected Objects column)
#In the ''Filter by Record Ownership'' section, use the Checkbox [[File:checkboxicon.gif|Link=]] icon to choose one or more objects
#*The Objects selected here define the fields available for filtering in [[Reports]]
 
====''Custom Aliases''====
This section is relevant only to programmers, who may need to reference the ''alias'' (name) for an object in a Database View when using one of the platform [[API]]s.
 
The alias fields are auto-populated with default values, but can be changed as needed to make programming easier:
:* The default alias a {{type}} is the object name.<br>(These aliases rarely need to be changed.)
:* The default alias for a {{type}} is <tt>custom_{numeric_object_ID}</tt><br>These aliases are routinely changed to something more readable, when programmers access them using APIs. Otherwise, they can be left alone.)
 
 
===Define Relationships (Joins)===
{{:Define Relationships (Joins)}}
{{:Define Relationships (Joins)}}


==Create New Reports Using a Database View==
===Create New Reports Using a Database View===
{{:Create New Reports Using a Database View}}
{{:Create New Reports Using a Database View}}


;Considerations:
===Delete a Database View===
*Edits to a Database View are only allowed after checking against existing reports
*Fields can be removed from the Database View for various reasons - an object can be removed and replaced with a new object or a new set of fields can be selected
*If any fields that are being removed are used in reports based on this Database View, the edits to the Database View will not be allowed; You will have to remove the fields from the affected reports before completing the edit on this Database View
 
==Delete a Database View==
{{:Delete a Database View}}
{{:Delete a Database View}}
<noinclude>
<noinclude>

Revision as of 22:50, 22 July 2011

Designer > Data > Database Views

Reports are created by extracting data from the platform, in the form of a Database View.

About Database Views

A basic Database View can include information from a single object, and look very much like the View of a single object. But a Database View can also define a complex data model, by specifying a join across multiple, related objects. The Database View can then contain fields from the linked objects, providing greatly augmented reporting capability.

Working with Database Views

Lock-tiny.gif

Users that have the Customize Objects permission can create a Database View 
Considerations
  • Database Views can be used to build Reports or Web Tabs
  • Edits to a Database View are only allowed after checking against existing reports
  • Fields can be removed from the Database View for various reasons - an object can be removed and replaced with a new object or a new set of fields can be selected
  • If any fields that are being removed are used in reports based on this Database View, the edits to the Database View will not be allowed; You will have to remove the fields from the affected reports before completing the edit on this Database View

Create or Edit a Database View

To create or edit a Database View:

  1. Click Designer > Data > Database Views
  2. Choose one of the following options:
    • Click the [New Database View] button to create a new Database View
    • Click the name of the Database view to edit
  3. Specify the Database View Settings (below)
  4. Click [Next]
  5. Define the relationship (Joins) between the objects selected
    See Defining Relationships (Joins) for more information

Database View Settings

Select Objects to Join

  1. Select the desired Objects by moving them to the Selected Objects column)
  2. In the Filter by Record Ownership section, use the Checkbox Link= icon to choose one or more objects
    • The Objects selected here define the fields available for filtering in Reports

Custom Aliases

This section is relevant only to programmers, who may need to reference the alias (name) for an object in a Database View when using one of the platform APIs.

The alias fields are auto-populated with default values, but can be changed as needed to make programming easier:

  • The default alias a Built-in or CRM object is the object name.
    (These aliases rarely need to be changed.)
  • The default alias for a Built-in or CRM object is custom_{numeric_object_ID}
    These aliases are routinely changed to something more readable, when programmers access them using APIs. Otherwise, they can be left alone.)


Define Relationships (Joins)

Define Relationships (Joins)

Create New Reports Using a Database View

To create a new report using a Database View

  1. Create a Database View that includes the Related Objects of interest
  2. From the desired Application, in the Workspace, click the Reports.
    The Reports tab opens.
  3. Click the [Add Report] button
  4. In the Category tab, choose the Database View
    (Database Views are shown along with the standard single-object report categories.)
  5. The field list for the report includes all fields available in the objects that part of the Database View.
Learn more: Add or Edit a Report

Delete a Database View

To delete a Database View:

  1. Click Designer > Database Views
  2. Click the Delete link next to the Database View to delete it

Considerations

  • In order to delete a Database View, you must first delete any report that uses that category; If a Database View is used in any report, and you attempt to delete the Database View, you will get an error message
  • The report(s) must be deleted first, then the Database View can be deleted
  • If a Database View is used in a report and you attempt to delete the Database View, you will get an error message