On Wed, 12 Jun 2013 13:55:25 +0400
dd wrote:
> I am trying minimize queries on Authors table. For every deletion of
> record from Books, it needs to check in Authors table. One extra
> query execution is there. I am trying minimize that.
You might not be aware of what you can do in a single quer
I got it.
Thank you RSmith and Simon Slavin.
On Wed, Jun 12, 2013 at 2:54 PM, Simon Slavin wrote:
>
> On 12 Jun 2013, at 11:14am, dd wrote:
>
> > Yes Simon. I am looking for it. ON DELETE RESTRICT.
> >
> > I got the answer.
> >
> > Should I enable foreign key support to use on delete restrict
On 12 Jun 2013, at 11:14am, dd wrote:
> Yes Simon. I am looking for it. ON DELETE RESTRICT.
>
> I got the answer.
>
> Should I enable foreign key support to use on delete restrict?(
> http://www.sqlite.org/foreignkeys.html)
I think that that fits with your earlier description: it will make SQ
Foreign Key constraints are enabled or disabled for a connection to a database using the "PRAGMA foreign_keys = ON" SQL on the
connection that should be doing the constraining.
After that, only DBs that have tables with foreign key constraints in one or more Tables will be affected by the setting
Yes Simon. I am looking for it. ON DELETE RESTRICT.
I got the answer.
Should I enable foreign key support to use on delete restrict?(
http://www.sqlite.org/foreignkeys.html)
I have x databases without enabling foreign key support. Can I enable
foreign key support for x+1 database only?
On Wed
Hi there,
May I ask, if you have a one-to-one relation of Books vs. Authors and wish to maintain it as such, why do you not just have one
table with both fields and appropriate indexes? Searches wouldn't really be much faster, but all this deletion maintenance would go
right down to near nothi
On 12 Jun 2013, at 9:49am, dd wrote:
>>> Book titles are not unique.
> I agree. 2. Books : columns(BookId_primarykey,
> Book_id_in_string_format_like_guid)
I’m not sure why you would need a GUID. You can store
2. Books : columns(BookId_primarykey, Title)
Just don’t put a restr
Thanks for your response.
It will delete from Author_Books when book deleted.
I am trying minimize queries on Authors table. For every deletion of record
from Books, it needs to check in Authors table. One extra query execution
is there. I am trying minimize that.
On Wed, Jun 12, 2013 at 1:00 P
dd wrote:
> my app need to delete author record from author table when author
> doesn't have any books. How to handle this? (I can verify in author
> table, whether this author belongs to any other book when book
> deletion.
You mean the Author_Books table.
> If no, delete from author table.
Tha
>>Book titles are not unique.
I agree. 2. Books : columns(BookId_primarykey,
Book_id_in_string_format_like_guid)
>>Why is there a problem when there is an author without any books?
No problem. But, my app need to delete author record from author
table when author doesn't hav
dd wrote:
> I am working on sample database application. I want to store book names
> and authors.
>
> 1. Authors: columns(AuthorId_primarykey, Name, SSN)
> 2. Books : columns(BookId_primarykey, Title)//Title is unique
Book titles are not unique.
> 3. Author_Books: columns(AuthorId_primary
11 matches
Mail list logo