Database Miscellaneous

Views:
 
Category: Entertainment
     
 

Presentation Description

Explore some of the miscellaneous features of PVDatabase.

Comments

Presentation Transcript

Database Miscellaneous: 

Database Miscellaneous

Overview: 

Overview Objectives Learn about some of the miscellaneous features that PVDatabase has to offer. Requirements Knowledge of PVDatabase basic functions. Estimated Time 5 minutes

Random: 

Random At points you may want to query data by at random. Databases have the random function built in. To utilize that random function, we can use PVDatabase :: getSQLRandomOperator () .

Average: 

Average The average function is used for finding the average value of data in a database. We leverage the average function in ProdigyView like so:

Database Type: 

Database Type Prodigyview supports multiple database types and connections to a database can be switched at any moment. To get what database you are connectioned to, you can use the PVDatabase :: getDatabaseType method.

Schema: 

Schema Some database, such as postgresql , generally are used with schemas. To get the schema that is currently in use, the getSchema () method can be utilized.

Table Formatting: 

Table Formatting When writing an application that is be distributed, you will not know the prefix of database used. PVDatabase :: formatTable () will add the prefix set for the current database connection in front of the table. If the prefix set as ‘ pv _’ , the code below will output ‘ pv_template ’ .

Predefined Tables: 

Predefined Tables ProdigyView stores data in predefined tables for features such applications, plugins, cms , menus, etc. PVDatabase can retrieve the names of those tables in the correct format of the database being used. Example: If the database set has the prefix of pv _ and schema of production , PVDatabase :: getApplicationTableName () will return production.pv_applications . The following areas have predefined tables: CMS Applications Plugins Users Menus Modules Containers Pages Templates Template Positions Subscriptions Points MVC Roles

API Reference: 

API Reference For a better understanding of the database, visit the api by clicking on the link below. PVDatabase www.prodigyview.com More Tutorials For more tutorials, please visit: http:// www.prodigyview.com /tutorials