dbTalk Databases Forums  

how to design db

comp.databases.theory comp.databases.theory


Discuss how to design db in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #51  
Old   
rpost
 
Posts: n/a

Default Re: how to design db - 12-12-2008 , 06:07 AM






I just wrote:

Quote:
select sum(energytable.calories*meal.amount)
from meal join energytable using (foodname)
where meal.username=<BoundParameter
where BoundParameter is SQLite's way of putting the username into your
sql query.
For inserts it becomes just another value to enter and for update/delete
it goes into the where clause.

This (the ability to run queries on combined shared and non-shared data)
is a big advantage of both Bob's/Volker's and 'my' approach.
Of course you're trying to allow this by adding per-user tables
to the database, but that only has drawbacks compared to B's/V's approach.

--
Reinier


Reply With Quote
  #52  
Old   
rpost
 
Posts: n/a

Default Re: how to design db - 12-12-2008 , 06:07 AM






I just wrote:

Quote:
select sum(energytable.calories*meal.amount)
from meal join energytable using (foodname)
where meal.username=<BoundParameter
where BoundParameter is SQLite's way of putting the username into your
sql query.
For inserts it becomes just another value to enter and for update/delete
it goes into the where clause.

This (the ability to run queries on combined shared and non-shared data)
is a big advantage of both Bob's/Volker's and 'my' approach.
Of course you're trying to allow this by adding per-user tables
to the database, but that only has drawbacks compared to B's/V's approach.

--
Reinier


Reply With Quote
  #53  
Old   
rpost
 
Posts: n/a

Default Re: how to design db - 12-12-2008 , 06:07 AM



I just wrote:

Quote:
select sum(energytable.calories*meal.amount)
from meal join energytable using (foodname)
where meal.username=<BoundParameter
where BoundParameter is SQLite's way of putting the username into your
sql query.
For inserts it becomes just another value to enter and for update/delete
it goes into the where clause.

This (the ability to run queries on combined shared and non-shared data)
is a big advantage of both Bob's/Volker's and 'my' approach.
Of course you're trying to allow this by adding per-user tables
to the database, but that only has drawbacks compared to B's/V's approach.

--
Reinier


Reply With Quote
  #54  
Old   
rpost
 
Posts: n/a

Default Re: how to design db - 12-12-2008 , 06:07 AM



I just wrote:

Quote:
select sum(energytable.calories*meal.amount)
from meal join energytable using (foodname)
where meal.username=<BoundParameter
where BoundParameter is SQLite's way of putting the username into your
sql query.
For inserts it becomes just another value to enter and for update/delete
it goes into the where clause.

This (the ability to run queries on combined shared and non-shared data)
is a big advantage of both Bob's/Volker's and 'my' approach.
Of course you're trying to allow this by adding per-user tables
to the database, but that only has drawbacks compared to B's/V's approach.

--
Reinier


Reply With Quote
  #55  
Old   
rpost
 
Posts: n/a

Default Re: how to design db - 12-12-2008 , 06:07 AM



I just wrote:

Quote:
select sum(energytable.calories*meal.amount)
from meal join energytable using (foodname)
where meal.username=<BoundParameter
where BoundParameter is SQLite's way of putting the username into your
sql query.
For inserts it becomes just another value to enter and for update/delete
it goes into the where clause.

This (the ability to run queries on combined shared and non-shared data)
is a big advantage of both Bob's/Volker's and 'my' approach.
Of course you're trying to allow this by adding per-user tables
to the database, but that only has drawbacks compared to B's/V's approach.

--
Reinier


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.