Reputation: 183
what is the format of schema when we create a new table using Voltdb? I'm a newbie. I have researched for a while and read the explanation in this https://docs.voltdb.com/UsingVoltDB/ChapDesignSchema.php Please give me more detal about the schema format when I create a new table.
Another quesiton is What is the call flow of the system, since a request comes to the system until a response is create. Which class/function does it go through in the system.
Upvotes: 0
Views: 107
Reputation: 5
1.Make file yourSchemaName.sql anywhere in the system. Suppose yourSchemaName.sql looks like this CREATE TABLE Customer ( CustomerID INTEGER UNIQUE NOT NULL, FirstName VARCHAR(15), LastName VARCHAR (15), PRIMARY KEY(CustomerID) );
2.fire sqlcmd in CLI inside folder where you have installed the voltdB. if you haven't set the path then you have to type /bin/sqlcmd.
After firing the command, a simple way to load schema in your voltdB database is by typing /path/to/yourSchemaName.sql; command inside the sqlcmd utility and the schema named yourSchemaName.sql will be imported inside the database.
VoltdB is relational database,so Now you can use all of sql database queries inside this database.
Upvotes: 0
Reputation: 787
Since VoltDB is a SQL compliant database, you would create a new table in VoltDB just as you would create a new table in any other traditional relational database. For e.g.,
CREATE TABLE MY_TABLE (id INTEGER NOT NULL, name VARCHAR(10));
You can find all the SQL DDL statements that you can run on VoltDB here
Upvotes: 0