Notes
This is a development version and works only with the latest code from source:Schevo/trunk
Tasks: #55
Evaluation
This is a simple standard use case.
A user starts to define a schema with several classes and relations step by step.
Results
Summary of the Evaluation Results
Installation
Getting an overview on schevo website
The windows installation is manually:
Create a Schema
Creates an folder "eval" which contains a "schema" directory:
evo db schema eval
Define an Schevo Class: Car
Create a Class Car
within eval/schema/schema_001.py
class Car(E.Entity): """Type of car.""" manufacturer = f.string() model = f.string() modelYear = f.integer() _key(manufacturer, model, modelYear) def __str__(self): return '%s %s %s' % (self.modelYear, self.manufacturer, self.model)
Create the Schevo Database
within folder 'eval':
evo db evolve
the evolve command creates an "eval.evo" by default.
Add Instances
use the navigator to create instances:
evo nav
Create a Class: Owner
adding it to schema_001.py
class Owner(E.Entity): """Individual human being.""" name = f.string() profession = f.string() _key(name) def __str__(self): return self.name
Create a Relation: 1:1
within schema_001.py
class Car:
after: modelYear = f.integer()
add : owner = f.entity('Owner')
Evolve the Database
evo db evolve
Add Instances and Relations
use the navigator to create instances:
evo nav
Create a Class: Driver
class Driver(E.Entity): """Individual human being.""" name = f.string() licenseType = f.string() _key(name) def __str__(self): return self.name
Create a Relation: 1:N
Within class *Driver*
car = f.entity('Car')
Evolve the Database
evo db evolve
Add Instances and Relations
use the navigator to create instances:
evo nav
Define a Class: Road
class Road(E.Entity): """A Road. """ name = f.string() length = f.integer() _key(name) def __str__(self): return self.name
Create a Relation: M:N
class Trip(E.Entity): """People can go places.""" car = f.entity('Car') road = f.entity('Road') def __str__(self): return '%s is on %s' % (self.car, self.road)
Tasks: #32
Evolve the Database
evo db evolve
Add Instances and Relations
use the navigator to create instances:
evo nav
Items which were removed from the initial evaluation sequence
Create an Example Database
fromt the command line:
- create a directory
- change into this directory
evo db create --app=schevo.example.todo todo.db
Launch Schevo Navigator
evo nav todo.db
tasks: #25