Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Database Table Locks/unlocks (for reading, writing or both) [RSS Feed]

#1 Jan. 11, 2011 02:48:35

Jagdeep S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Database Table Locks/unlocks (for reading, writing or both)


Hi..

Is Django automatically done the table locking /unlocking concept in
case of Mysql/PostGreSQL?

if not how I done this manually?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 12, 2011 16:14:23

Jagdeep S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Database Table Locks/unlocks (for reading, writing or both)


> > Is Django automatically done the table locking /unlocking concept in
> > case of Mysql/PostGreSQL?
>
> Depends how backend handles database sessions.
>
> > if not how I done this manually?
>
> Thing you described is called pessimistic locking. What are you trying to
> accomplish with that?

I only want to know is Django is able Lock/Unlock the Database tables,
If yes.
How its possible? how its works

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 12, 2011 16:21:00

Mo J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Database Table Locks/unlocks (for reading, writing or both)


You could use custom SQL

Sent from my iPhone

On Jan 12, 2011, at 7:14 PM, Jagdeep Singh Malhi
<singh.malh...@gmail.com> wrote:

>
>>> Is Django automatically done the table locking /unlocking concept in
>>> case of Mysql/PostGreSQL?
>>
>> Depends how backend handles database sessions.
>>
>>> if not how I done this manually?
>>
>> Thing you described is called pessimistic locking. What are you trying to
>> accomplish with that?
>
> I only want to know is Django is able Lock/Unlock the Database tables,
> If yes.
> How its possible? how its works
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 12, 2011 16:46:45

Christophe P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Database Table Locks/unlocks (for reading, writing or both)


On Jan 12, 2011, at 8:14 AM, Jagdeep Singh Malhi wrote:
> I only want to know is Django is able Lock/Unlock the Database tables,
> If yes.
> How its possible? how its works

Django by itself doesn't issue locking instructions to the database, and
doesn't have any built-in primitives to do so. You can use direct SQL,
bypassing the ORM, to issue those commands if you really need to.

But the previous commenter's note is right: Pessimistic locking often kills
database performance, and is rarely the best solution.

--
-- Christophe Pettus
x...@thebuild.com

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Database Table Locks/unlocks (for reading, writing or both) [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support