Re: how to design db

From: Volker Hetzer <>
Date: Mon, 08 Dec 2008 20:29:16 +0100
Message-ID: <ghjsid$kva$>

ilochab schrieb:
> I'm using sqlite.
> I need a DB that contains:
> - a set of general tables
> - a variable number of sets of users tables.
> The first set is accessed by every-one.
> Each of the users' set 'is identical in structure to the others,
> but it is specific in content respect to the owner.
> I can manage authentication through my application.
> What I don't know how to do in a suitable way is the design of a group
> of identical tables repeated for each user.
Bob is right, that's not the way to do it. Instead, you have one table, with the user id in one column as part of the key. Then you can have views that add a "where user = getusername()" or something to your queries and instead-of triggers for DML. If it's not a cellphone, I'd suggest you consider a bigger database system like mysql, or sqlserver express.

Lots of Greetings!

For email replies, please substitute the obvious.
Received on Mon Dec 08 2008 - 20:29:16 CET

Original text of this message