[Owncloud] User primary key questions

Sarah Jones sarah.e.p.jones at gmail.com
Mon Jan 21 18:54:14 UTC 2013


Hi Frank,

Thank you for your help!

I apologize for my vagueness.  I meant the db structure found in the core
db_structure.xml (personally I am using MySQL, but I believe that is
irrelevant).  The users table is what I was referring to.  Currently I
don't have any written up documentation for you to refer to, but the idea
is this:

Since the owncloud instances need to be fault tolerant, there is no way to
guarantee that a username is unique across the whole network of owncloud
instances.  You can only guarantee that the username + location is unique
(the location would be the instance that the user created their account
on).  I'm planning on having one instance per city, which is why I call an
instance a location.

So what I would like the users table schema to look like is:
id (primary key)
username
location
(where username + location is unique -- perhaps use a unique index for
this).
password

My concerns are that 1) this requires modification to a core db table and
I'm not sure if apps can do that 2) changing the username to be nonunique
would probably require a lot of changes in the core as well 3) changing the
core might cause incompatibility with other apps.

I'd appreciate your thoughts about whether these changes can be done as an
app.  These changes would be the groundwork from which I would want to add
"friendships" to limit who you can share with and the ability for owncloud
instances to talk to one another.

If anything I have explained here is unclear or you need more detail on,
please let me know.  I really appreciate your help!

Thanks,
~Sarah

On Mon, Jan 21, 2013 at 2:42 AM, Frank Karlitschek <frank at owncloud.org>wrote:

> Hi Sarah,
>
> thanks a lot for your message. This sounds very interesting.
> It would be awesome to have your plan implemented. Especially as app.
> So I can definitely try to help you.
>
> I'm not sure which DB table you are referring to. Is there some
> documentation about the planed architecture or the concept that you want to
> implement?
>
> Thanks a lot.
>
>
> Frank
>
>
> On 19.01.2013, at 22:17, Sarah Jones <sarah.e.p.jones at gmail.com> wrote:
>
> > Hi,
> >
> > I'm working on a research project for ICT4D in which I want to have a
> network of owncloud instances that are delay/fault tolerant.
> >
> > I was hoping to do most of this work entirely as an app, so I could
> easily publish it for others to use as well, but I'm starting to wonder if
> that is possible.
> >
> > The db structure has the uid as the primary key.  In my case, I would
> want the primary key to be the uid and the owncloud instance (so I'd
> probably also want the table primary key to be a auto-increasing unique
> integer to make lookup/referencing faster).
> >
> > I was hoping that you would share with me if it would be possible to do
> these kinds of modifications as an app, or if I would have to make those
> modifications directly to the core.  Also, I was wondering if there were
> any significant design choices to why you chose to use the uid string as
> the primary key rather than an auto-increasing integer (perhaps I should
> take a different approach in my design).
> >
> > BTW, this product is awesome and I'm so glad that it is open source!
> >
> > Thanks,
> > ~Sarah
> > _______________________________________________
> > Owncloud mailing list
> > Owncloud at kde.org
> > https://mail.kde.org/mailman/listinfo/owncloud
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130121/403f2f5b/attachment.html>


More information about the Owncloud mailing list