user_guide:howto:poly_db_write

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
user_guide:howto:poly_db_write [2019/01/25 13:40] – ↷ Page moved from user_guide:poly_db_write to user_guide:howto:poly_db_write oroehriguser_guide:howto:poly_db_write [2019/05/02 09:14] (current) – [Writing to the database] mradons
Line 1: Line 1:
 ====== Writing to the database ====== ====== Writing to the database ======
  
-This tutorial explains basic write and update access to the polymake database using the polymake extension [[https://polymake.org/doku.php/data|polyDB]]. See [[poly_db_tutorial|here]] for an introduction tutorial on querying the database.+This tutorial explains basic write and update access to the polymake database. See [[poly_db_tutorial|here]] for an introduction tutorial on querying the database.
  
 ==== Write access ==== ==== Write access ====
Line 26: Line 26:
    * ''noinsert'' : only simulate insertion of objects up to the point when the data would actually be written to the database (useful to check feasibility of computation of additional properties)    * ''noinsert'' : only simulate insertion of objects up to the point when the data would actually be written to the database (useful to check feasibility of computation of additional properties)
  
-By default, all properties present in your object are copied in the database. For most of them it might not be interesting to filter by, so check out the [[user_guide:poly_db_write#type_information|section on type information]] to restrict the data that is actually searchable.+By default, all properties present in your object are copied in the database. For most of them it might not be interesting to filter by, so check out the [[user_guide:howto:poly_db_write#type_information|section on type information]] to restrict the data that is actually searchable.
  
 ==== Type information ==== ==== Type information ====
  
-Collections in the database have corresponding ''type_information'' entries that specify a list of properties, and metadata about contributer, type of objects inside the collection, etc. (see [[devel/polydb/format#Type Information|here]] for a complete list of what metadata is stored). All objects in the database have a ''type_information'' key, and only the properties specified there will be searchable in the database. All other properties will only be available after actually retrieving the object from the database.+Collections in the database have corresponding ''type_information'' entries that specify a list of properties, and metadata about contributer, type of objects inside the collection, etc. (see [[dev_corner:polydb_format#Type Information|here]] for a complete list of what metadata is stored). All objects in the database have a ''type_information'' key, and only the properties specified there will be searchable in the database. All other properties will only be available after actually retrieving the object from the database.
  
 There can be more than one type information entry for a collection. This is useful if, for some part of a collection a property should or cannot be computed or stored in the database. E.g., storing all lattice points for the nine-dimensional Fano polytopes is not feasible. There can be more than one type information entry for a collection. This is useful if, for some part of a collection a property should or cannot be computed or stored in the database. E.g., storing all lattice points for the nine-dimensional Fano polytopes is not feasible.
Line 41: Line 41:
  
 === Adding a new type information entry to your collection === === Adding a new type information entry to your collection ===
-To create a new type information entry, write it into a perl hash in the polymake shell, or into a JSON file (See [[devel/polydb/format#Type Information|here]] for the precise format).+To create a new type information entry, write it into a perl hash in the polymake shell, or into a JSON file (See [[dev_corner:polydb_format#Type Information|here]] for the precise format).
  
 New type information entries are written with the command ''db_set_type_information''. The basic command is New type information entries are written with the command ''db_set_type_information''. The basic command is
Line 69: Line 69:
 db_write_collection_info(file=>"collection.json"); db_write_collection_info(file=>"collection.json");
 </code> </code>
-where we read the information from the files ''db.json'' and ''collection.json'' in json format. For the format see [[devel/polydb/format#Documentation entries in the database|here]].+where we read the information from the files ''db.json'' and ''collection.json'' in json format. For the format see [[dev_corner:polydb_format#Documentation entries in the database|here]].
  
 Existing entries are updated. With the option ''replace=>1'' you can replace an entry instead.  Existing entries are updated. With the option ''replace=>1'' you can replace an entry instead. 
  • user_guide/howto/poly_db_write.1548423636.txt.gz
  • Last modified: 2019/01/25 13:40
  • by oroehrig