org.xerial.db.model
Class DataModel
java.lang.Object
org.xerial.db.model.DataModel
public class DataModel
- extends Object
A DataModel manages the graph structure of an ER-diagram.
person:(id, name, address)
||
author:(book_id, author_id)
|*
|1
book:(r2:id, r2:title)
||
order:(id, book_id, customer_id, info)
||
customer:(id, name, address, phone)
query examples
(person:name, book:title = "Gone with the wind")
(book:id = 10, customer:name, order:info)
select customer:id, customer:name, count(*) from
(select customer left join order on customer:id = order:customer_id)
Multidimensional Hash Table can support this type of query?
- Author:
- leo
DataModel
public DataModel()
addNode
public void addNode(String nodeName)
contains
public boolean contains(String nodeName)
connectNodes
public void connectNodes(String sourceNodeName,
String destNodeName,
Relationship rel)
throws DBException
- Throws:
DBException
getRootNodeNameSet
public Set<String> getRootNodeNameSet()
destinationOf
public List<String> destinationOf(String nodeName)
path
public List<String> path(String src,
String dest)
hasPath
public boolean hasPath(String src,
String dest)
save
public void save(SQLiteAccess query)
throws DBException
- Throws:
DBException
load
public void load(SQLiteAccess query)
throws DBException
- Throws:
DBException
toString
public String toString()
- Overrides:
toString in class Object
attachSQLiteDatabase
public void attachSQLiteDatabase(String sqliteDBFile)
throws DBException
- Throws:
DBException
addRelation
public void addRelation(Relation relation)
hasEdge
public boolean hasEdge(String src,
String dest)
getRelationship
public Relationship getRelationship(String src,
String dest)

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.