[BioSQL-l] Versioning in BioSQL Database

Lsting likebee lukeswabypetts at gmail.com
Mon Aug 3 10:46:29 UTC 2020


Hi Peter

Yes, where possible I’m using BioSQL—especially BioSeqDatabase—which has been perfectly fine for all my scripts (so far just data ingestion and output) but am having a particularly difficult time with data replacement.

The goal is to be able to extract some records, modify them, and push them back in under the same name with an updated version number and bioentry_id, such that whenever those records are next extracted it is the latest version that is pulled by default.

I am very new to all of this (just about to start my masters) so this is no doubt just a shortcoming in my understanding, but it feels like I must be missing something very simple, as this is surely something that most users would need!

Can you think of anything that could help?

Very much appreciated

Luke

Get Outlook for iOS<https://aka.ms/o0ukef>

________________________________
From: Peter Cock <p.j.a.cock at googlemail.com>
Sent: Monday, August 3, 2020 9:39 am
To: Luke Swaby
Cc: biosql-l at mailman.open-bio.org
Subject: Re: [BioSQL-l] Versioning in BioSQL Database

Hello Luke,

It has been some time since I looked at the tables in BioSQL, but just to be clear - you are not using the Biopthon BioSQL wrapper, are you?

https://github.com/biopython/biopython/tree/master/BioSQL/

Peter

On Mon, Aug 3, 2020 at 2:36 AM Luke Swaby <lukeswabypetts at gmail.com<mailto:lukeswabypetts at gmail.com>> wrote:
Hello

I’m currently writing a load of Python scripts to interact with a slightly modified version of your BioSQL database (pretty much identical, with an additional table for metadata), and am having a lot of trouble working out how to implement record versioning in it.

Comments in the schema—and the version field in the bioentry table—suggest a particular method of doing this was in mind when the schema was written, but I can’t find any documentation on how this is to be done.

In sum, I need it to be able to hold multiple versions of the same record in the same table, and a means of accessing (ideally by default) only the latest version of each record when it is requested. It would ideally also automatically add a new version of a record whenever any change is made to it, either internally by direct MySQL queries or externally by ingestion of newly modified .gb/.csv files. I’ve thought of numerous ways of doing this, including creating a new table which points to the unique bioentry_id/metadata_id of the latest version of each record, but am very stuck on how to do this.

Do you have any suggestions? I’m sure there is a relatively basic answer that I am totally missing, but I’m pressed for time now and am finding nothing anywhere!

Very much appreciated if so

Luke
_______________________________________________
BioSQL-l mailing list
BioSQL-l at mailman.open-bio.org<mailto:BioSQL-l at mailman.open-bio.org>
https://mailman.open-bio.org/mailman/listinfo/biosql-l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biosql-l/attachments/20200803/ebe6ecf5/attachment-0001.htm>


More information about the BioSQL-l mailing list