It's pretty easy.
{{ form.vars.name }}
Useful Tips and Articles for Programmers
{{ form.vars.name }}
In the first place, the relational algebra is a part of computer science and so it should be useful thing ;)
Secondly, although the relational algebra is a formal model, it's the basis for database query languages. Widely used SQL is based on it. The study of the relational algebra is supposed to make the comprehension of SQL easier.
FoundationsFirst of all the relational algebra is a procedural query language. The word "procedural" means that the language consists of operations. The operations are performed on relations (tables or parts of them).
Relational Algebra Operations:I believe you know the general way to write update statements. But let's revise and take a look at Figure 1.
If we want to update salary of the persons with salary over $50000, the query will look like this:
UPDATE Persons
SET salary = salary*2
WHERE salary > 50000;
We have just doubled salary for these persons!
Let's see a more interesting example. Suppose we want to increase salary for persons with salary over $60000 by 3 percent, whereas all others receive a 5% raise. We want to do that by executing only one(!) query.
Try to write the query by yourself before you look at the solution.
We can do it using case statement:
This article is about the right use of grouping in SQL-queries. I wrote the article, because this subject is very important. More than that it is not too much complicated and suits to the format of short useful articles, that my blog is for.
Job interviews like questions concerning grouping (using GROUP BY in SQL-queries). If you don't use SQL-queries every day or don't know them well, refresh your memory before your interview.
Let's take an example. Figure 1 shows a table Persons, which stores information about persons. The table has four column headers: ID, name, dept_name, salary.
First of all we use GROUP BY with aggregation.
Aggregate functions are functions that take a collection of values as input and return a single value. SQL offers five built-in aggregate functions:Consider the query "Find the average salary of persons." Try to write the query by yourself before you look at the solution. We write query as follows:
I started studying Design Patterns with "Design Patterns: Elements of Reusable Object-Oriented Software" by famous Gang of four: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. It was my mistake.
This book is great, but it is not for beginners. I spent a lot of hours trying to understand patterns. But it was not useful for me, because I was a beginner. I stopped reading and was disappointed with myself.
If you are a really tough programmer you might know this book very well and you don't need my advice to read it. But if you are a beginner I have an advice for you. Please, don't begin to study design patterns with the book of Gang of four.
"Head First Design Patterns" by Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson is written for beginners.
One day I found the book "Head First Design Patterns" by Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson. Authors use JAVA to explain design patterns.
It was indispensable for me and I believe it will be very useful for every beginner.
In the beginning of the book there is an interesting chapter about brain and thinking. It contains tips how to learn more efficiently.
More than that this book is rather funny. Check it out.