Context in practice … and what’s new Lorentz center, Wednesday, 21 November 2006
Context Handling large amounts of data Work together Work in a consistent way Experiment with source code Know what data and code was used Keep data private Make data public Throw away data
Projects Organize in Projects, that have A name and description Users Default privileges Responsible - privileged – users New objects are automatically part of the currently active context
Privileges User – Project – Astro-Wise … MyDB Project with same name as user User-only objects within a project, i.e. user can see all data within a project but creates data that is invisible to others within a project context.set_privileges_user_only() context.set_privileges_project_only() context.set_default_privileges()
Migrating data Migrating everything from MyDB awe dbmigrateall.py AWAUSER KIDS Migrating a single object including its dependencies for sl in SourceList.name.like('*TEST*'): context.migrate(sl, 'VESUVIO')
Deleting data Deleting everything in MyDB awe dbdeleteall.py AWAUSER Deleting a single object Requires careful checking for ALL dependent objects Is not yet possible DBA’s run dbvacuum to delete files from dataservers that belong to deleted objects
Project specific source code Put project source code in separate CVS repositories awe will use code that is specific to the currently selected project Only code that is different needs to be kept in project specific CVS Beware of unnecessary divergence!