Database Creation

Database Creation
calac41
Data sources can point to managed databases, which are databases that data sources for managed databases represent. Managed data servers are the connections to a database server that are high-level administrative credentials.
You can:
  • Create a managed database within a managed data server. With a managed data server and a data source for a managed database added to the data server, you can manage the content in the data source.
    This method is part of the 
    App-first
     approach to creating APIs.
  • Connect to an existing database.
    This method is part of the 
    Database-first
     approach to creating APIs.
    For more information about how to connect to an existing database, see Database Connectivity.
  • If you want to control schema (database) creation, you can manage data with your own schema.
    This method is part of the 
    Model-first
     approach to creating APIs.
    For more information about how to control schema creation, see Swagger to Schema.
This article introduces the concept of creating a managed database within a managed data server, explains the challenges for creating databases, and provides a background of the user personas for creating managed databases.
For more information about the various approaches to creating APIs, see Creating APIs.
In this article:
 
 
Database Creation Challenges
The following diagram illustrates the flows for creating a database in API Creator:
  API Creator workflow.png  
In both workflows, the schema creates a default API, which your team can customize, define reactive logic, and create client applications. The upper workflow begins with an existing database. The lower workflow begins with a new database (or new tables in an existing database). The New Database workflow illustrates the common challenge of creating data servers and database coding. Creating data servers can be challenging even for experienced API developers. The administration obstacles alone are formidable. After you create your new database, you must code the schema using SQL syntax, possibly with common database tools. Database coding can be a blocker for business users, requiring mastery of SQL syntax and the complex concepts behind it, such as normalization and foreign keys.
The diagram suggests that you can reduce the time of bringing new ideas to market by accelerating and simplifying the steps to creating an API. And, just as important, if you can eliminate the complexities of schema syntax and concepts, a new class of people are empowered: business users.
The Core Idea: Your App is your Integrated Development Environment (IDE)
To offer the simplification of creating a database, the premise cannot be to teach database syntax and concepts to those who have other priorities. Rather, the approach must be to take well-known concepts that are already understood and create databases from these. That is, the application itself.
Virtually all business users can immediately recognize a master/detail form. The following image shows Data Explorer: CA Technologies  
The idea is to build on this familiar and visual paradigm by creating a managed database and managing the content in a data source for a managed database using Data Explorer:
  • Create a table. 
    Enter a name for the table and Data Explorer builds and runs the SQL to create the table.
  • Add a field.
     Enter a name and type for the field and Data Explorer builds and runs the SQL to add the field.
    Fields represent the columns in your database. The term 
    field
     is used to stay within the metaphor of applications and screens, and not database terminology.
     
  • Create a related table.
     You can build tables that are related:
    • Create a child relationship. 
      Creating a child table creates a managed child table and a relationship between the child and the parent table. This is, for example, how 
      CA Live API Creator
       created the 
      LineItem
       table.
    • Create a parent relationship.
       Creating a related parent table relates a row to a specific parent record. This is, for example, how  
      CA Live API Creator
       built the 
      Product
       table, by way of the 
      Name
       field, where you pick a 
      Product
       for a 
      LineItem
       .
For more information about how to create a managed database and how to manage the content in a data source for a managed database using Data Explorer, see Manage Tables in Managed Databases.
User Personas for Creating Managed Databases
In planning for creating managed databases, consider the following user personas:
Persona
Value
API developer
  • Eliminate delay in server creation.
  • Reduce tedious SQL syntax.
  • Retain extensibility and customization.
Business user
  • Create applications from the following simple familiar visual metaphors:
    • Master/detail
    • Lookup
  • Business logic by way of spreadsheet-like reactive logic.
Manager
  • Deliver projects much faster.
  • Empower business users to create their own systems.
Architect
Systems created by business users are supportable. They:
  • Run on standard servers.
  • Include business logic for integrity.
  • Include scalable performance.
  • Are pre-integrated, with automatic RESTful APIs.
  • Are extensible, with standards-based metaphors and languages.
Next Steps
Add a managed data server, add a data source for a managed database to the managed data server, and then authorize users to create managed databases within the managed data server.
For more information: