locking – Are conditions of competition possible in SQL?

I would like to understand what the SQL standard says about parallel queries and conditions of competition. If there is no standard, I would be interested in the approach adopted by the popular databases.

I understand that more than 2 read-only queries can be executed in parallel, but can a read / write or write / write pair also run in parallel?

For example, suppose a simple aggregation such as

SELECT AVG (col1) FROM tbl;

And while it's working, I'm going to issue a

INSERT INTO tbl (col1) VALUES (3);

Is the INSERT executed while the TO SELECT is running or will be the INSERT to be blocked until the end of the execution?

In other words, race conditions are possible in SQL?

In addition, I would appreciate a discussion of how row, page, and table locks are used in this context.

Thank you

java – Implementation of a pessimistic approach in the competition of Web applications

I usually have an optimistic approach to handling competition in web applications. I let two users access the same record, and if any of them performs an update, when the second tries to update it, the application tells him that a other user has already changed the registration. The second user must leave without saving. I've implemented this with a version column.

This approach is acceptable if the amount of information to enter is small. If the recording is large, you can not use this approach because the user can spend a lot of time making changes. You can not tell them that another user has already updated the registration.

So, in this case, I'd like to take a pessimistic approach: do not let the user open a record being edited.

My problem is that if I mark the recording when a user opens it, if there is something left, the recording can remain locked. For example:

    - The user 1 opens the recording
- The recording is marked with the name of the user 1
- User 2 attempts to access the record but can not because it is marked
- The user 1 terminates the browser by interrupting its process (does not close the window)
- The folder is locked

An administrator can remove the mark, but this is not always the case (not to say that it is dangerous because they can delete the mark when a user is locking the mark. ;recording).

I would like to hear approaches to solve this problem. I am particularly interested in Java applications.

Competition – $ 10 business card redesign

This is the current design, used for business cards.


Please redesign it so that it looks more professional and – easy to read.

The text in the picture is Irvin Karan

This will be used on a business card, so think accordingly.

$ 10 via paypal
Required files: PSD

mysql – How to calculate the average weight of runners per competition?

I have a mission for which I have to calculate the average weight of the runners per competition. The mission has many different parts but I found myself stuck in it, so help me if you can.

I have the following tables:

name VARCHAR (30),
REAL weight,
) ENGINE = innodb;

CREATE TABLE Participants (
VARCHAR contest (30) NOT NULL,
VARCHAR runner (30) NOT NULL,
PRIMARY KEY (competition, runner),
FOREIGN KEY (contest) REFERENCES Contest (name),
FOREIGN KEY (runner) REFERENCES Runner (name)
) ENGINE = innodb;

name VARCHAR (30),
) ENGINE = innodb;

With the following data:

Name: Weight
---- ------
Alan: 55 years old
David: 60
Peter: 65
Stan: 60

first name

Competition: Rider
----------- -----
Derby: Alan
Derby: David
York: Alan
York: Peter
York: Stan

So, the results I should get from my SQL query for different competitions should be:

  • Derby: 57.5 (average of Alan and David)
  • York: 60 (average of Alan, Peter and Stan)

I have tried several queries. For the moment, my best is:

SELECT Competition.name, AVG (Rider.weight)
Rider, Compeition, Participants
GROUP BY Competition.name;

How should I approach this SQL query?

How do we know why our website traffic is in free fall?

The reason I need to know this is that since our redirection problem is resolved, all website traffic has increased significantly (both English) with the exception of the Chinese website.

We added more content, it is very easy to classify, (no competition), so the traffic dropped is due to some configuration changes maybe?
How can I recover my traffic? English-Website.jpgRed-Blue-Card.jpgChinese-Website.jpg


Design competition in progress …. No limit of money

I need the word "FOCUS" with my logo (attached) in different ways to be applied on t-shirts. We can also include "STAY FOCUSED" on some designs


My current creations are a little old fashioned so I want to come up with something cool for the summer.

There is no limit to the number of entries. I will pay between $ 10 and $ 25 for each selected entry. Submit 10 entries and I leave with the 10, I send you between $ 100 and $ 250, etc. You can submit all variants. circular, rectangular, images included, etc. Just create and keep it clean with the fonts of your choice. You will find attached an example of some of the styles I already have.

Remember that these rules will be applied to clothing, so beware of ultra-thin lines.

If you want to see the current models, you can see them on www dot dot dot

Competition – Question of the competition

Hello everyone!
Andrew Sherer (https://www.facebook.com/andrew.scherer.31), president of Marketers Center, referred me to this exceptional website. I have been a client for a few years.

I just signed up for a premium membership and I love this design contest forum. I am a big fan of things automation. This saves me time and I can shell out more money for design competitions.

Before posting my first contest, I wanted to start this. I created this form in which all drawings are placed in a Google Drive folder.

Is it okay? Do the designers here use it?


thank you very much for all your comments!

Looking forward to having fun at the design competition!