How much is your time worth to you? A union is an organization of workers who push for the best possible working conditions - who else will? The boss? The boss invented sweatshops! Unions are easy to demonize, if you don't belong to one. They brought about the 40-hour work week, overtime pay, safety laws, and more, including previously-unknown prosperity for those who punched a clock. It enabled many to move to suburbia, buy homes, and raise kids who would grow up to demonize unions.

Unions are one of the workers' fundamental tools in the class struggle. This is motivation enough for their existence.

Just in case there are people out there who do not see the benefits of creating an oppression-free society I feel that I should provide some more arguments.
What it boils down to is that the relationship between a corporation and an individual employee is a very uneven one. The loss of a job is much more damaging to the employee than the loss of an employee to the corporation. Unions lessen this distortion and the resulting losses.
One area where unions have a beneficial impact is workplace safety and conditions. If workers are easily replaceable and have difficulty making themselves heard it will be more profitable for the companies to pay little attention to those issues. For the society as a whole (not to mention the workers concerned) people being worn out or injured represents a large cost.
And there are of course the wages. The result of the corporations' more powerful bargaining position is that wages are pushed low. Since the price of labour is lower than its actual cost this causes resource misallocation. The introduction of unions therefore helps the functioning of the market economy.

It is also worth considering what sakico mentions above: a company shutting down rather than paying the wages demanded by the union. According to sakico this shows that unions are damaging, and that union busting should therefore not be discouraged.
We can distinguish between two cases:

Paying the wages demanded by the union would make the enterprise unprofitable
To quote sakico: "Good riddance". If the company can only make profits when the price of the factors of production they utilise do not reflect the true cost, then they have nothing to do in the market in the first place. The removal of incompetent entrepreneurs improves the efficiency of the economy.

Paying the wages demanded by the union would not make the enterprise unprofitable
The capitalist's decision to shut down is damaging to everyone: himself he loses his profits, the workers lose their wages, and society loses tax revenue. The reason for the action is that he looks to his class interest: yielding to reasonable demands for higher wages is a threat to future profits for all capitalists. Better then to strongarm the unions into submission.
In effect the capitalist is taking the production hostage, and shuts it down if his demands are not met. It is hardly the unions who should be blamed for the resulting loss. Bust the capitalists and not the unions.

This was a response to a write-up written by sakico, voicing the opinion that there should be no laws preventing union busting since unions are harmful anyway.

Unions are powerless in the US. Only 12% of the workforce is unionized. So, this argument that they have some kind of unfair advantage simply isn't true. These strike laws don't apply to 88% of the workforce.

Those who aren't represented by unions, doing the same jobs, tend to have lower pay, less job security, work harder, and have fewer benefits if they have them at all.

Furthermore, entire segments of the service economy, like janitors, fast food workers, and others, don't have unions. Most unions are out to protect middle class jobs like teaching or nursing (which only recently started organizing home health care and orderlies).

It's true that unions can abuse their power, but in my experience, the unions are always getting this shit end of the stick. The Reagan administration, and even the Clinton administration, were pro business and anti-union. The unions have little political clout. Strikes still end with pay cuts in exchange for retained benefits and job security. Sometimes, the unions sell out the future members by locking in high wages for todays workers in exchange for low wages for new ones.

If anything, the unions need more power. They're the only group that has any kind of power against the severe attitude of the corporations toward their least skilled workers.

If you're a capitalist, with a couple million in the bank or tied up in property, it makes sense to be against unions. If you're selling your labor for money, you should support unions, because you're a worker.

In the field of computation theory, union is one of the regular operations. If A and B are languages (not necessarily regular languages) then the union of A and B (usually written A B) is defined as follows.

{x | x A or x B}

In plain English: A B is the set of all strings which are either members of A or B or both.

For example, if A = {a,b,c}, and B = {c,d,e}
A B = {a,b,c,d,e}

Some interesting things to note about the union operation:

  • The union of a set with any subset is equal to the original set (iff B A, then A B = A).
  • Regular languages are closed under the union operation. This means that if A and B are regular languages, then so is A B.

In SQL, UNION keyword does nothing more than mash the output of two or more queries together into one big result set. UNION requres the queries to have the same number of columns. Second, the columns should have compatible data type and size, but some query engines are flexible on this strict ANSI requirement. Third, the columns must have the same constraints with regard to null values. Either both columns must allow nulls or forbid nulls. Again, some products are less strict than the standard. Last, UNIONs may not be subqueries, nor may they have aggregate functions. Check your product's documentation for details.

Here is what one looks like:

   SELECT name, email, phone_number FROM salespeople

   UNION

   SELECT name, email, phone_number FROM engineers;
And the output might look like:
Jones, Jim      bobj@salesman.com      123-123-1234
Sousa, Sam      sams@salesman.com      123-123-1235
Dilbert, J      jd@engineer.com        234-234-1234
Smart, Alec     sa@engineer.com        234-234-2344

There are no column headings on purpose in the output example above. Since the column names are often different in the SELECT statements comprising the UNION, the query engine cannot know what to call the columns so quite often there are no column names in the output. Remember, the columns must be of the same type and size, but there is no requirement that their data be in any way related. You really can mix apples and oranges with a UNION query.

One important "gotcha" with UNION is that by default it eliminates duplicate rows in each SELECT statement (see DISTINCT). To ensure each row gets returned, UNION ALL must be used.

Set Theory

Set theory defines a union operation. For any set A, an axiom guarantees the existence of the union: a set

B = A = { x : y.y∈A&x∈y }.
B is the set of all elements of elements of A.

When A={a,b} is a pair (derived e.g. by the axiom of pairing), we use the more common notation a∪b = A. This notation is also used when a=b.

Note, however, that the existence of unions A when A is infinite does not follow from the existence of unions of such pairs. In particular: The cardinality of a finite union is bounded by the cardinalities of A and of each of the elements of A. But the cardinality of an infinite (even countable) union has no such bound. Hence the need for an axiom.

When A is an indexed set A = {ai: i∈I} for some index set I, notations based on ∪i∈Iai = A are common. Thus, we may see

N = n=1 {k⋅pn : k=1, 2, ...}
where p1=2, p2=3, p3=5, ... is the sequence of prime numbers.

These less formal notations are more common in most of mathematics.

Given a "universal" set in which to take complements, unions are related to intersections by means of DeMorgan's laws.


C and C++

In C and in C++, a union is a type. The syntax of a union is exactly the same as the syntax of a struct:

union U {
  char *   a_string;
  int      an_integer;
  double   a_number;
};
defines a union U with 3 fields. However, unions are limited in such a way as to allow access to only one field at a time.

Defined behaviour

The informal rule is that a union holds all fields overlapping in memory. The formal rules are more complex, but amount to the same thing:

  • A pointer to the union can be converted into a pointer to the type of any of the fields (in particular, it has the correct alignment for each of these types);
  • Reading any but the last-written field of the union yields undefined behaviour;
  • The sizeof the union is the largest of the sizeofs each of the members.
As usual, standardese prohibits the use of words such as "memory", or indeed any mention of implementation. But we all know what they mean.

Since no portable conversions exist in such a configuration, standard C unions are limited to expressing just the "variant" part of Pascal's variant records. C has no notion of the type member; if YOU want to know the type currently stored in a union, YOU have to make sure you know what it is. One way to do this could be to say

struct variant {
  enum {e_pchar, e_int, e_double} type;
  union U value;
};
and use the type field to keep track of the type of the last stored data.

But C doesn't force you to do it this way. Your program might store types differently. For instance:

struct leaf { /* ... */ };
struct node { /* ... */ };
struct tree {
  struct tree *left, *right;      /* left and right subtrees */
  union {
    struct leaf a_leaf;           /* If (!left) && (!right) */
    struct node a_node;           /* Otherwise */
  } data;
};
could be one way to define a tree.

Undefined Behaviour

Once compiler-specific features are taken into account, unions naturally become more flexible: you can taken advantage of specific knowledge of what the "undefined behaviour" of reading from a "wrong" member will do. For instance, the standard assigns no meaning to this code:

union address_convert {
  void *ptr;
  long addr;
};
void *convert(long addr)
{
  union address_convert cvt;
  cvt.addr = addr;
  return cvt.ptr;
}
It invokes undefined behaviour. However, a particular implementation MAY specify that such code will work "correctly". This would involve ensuring that longs and void pointers have appropriate sizes, and that the "correct" conversion does indeed occur.

For such purposes too, unions are a very practicable way for implementation-specific code to achieve certain behaviours.


The connection

There isn't really one, except that the English language provides the same word for both. The C union { A a; B b; }; can store all values of the disjoint union A∪B. But it relies on labeled values (you can store in either of the fields .a and .b, and you must specify which one you mean). And if A and B refer to the same type, the distinction is even more pronounced.

C unions better fit (one of) the semantics commonly ascribed to "A ``square cup'' B", which isn't really a union in the mathematical sense.

Un"ion [F., from L. unio oneness, union, a single large pearl, a kind of onion, fr. unus one. See One, and cf. Onion, Unit.]

1.

The act of uniting or joining two or more things into one, or the state of being united or joined; junction; coalition; combination.

Union differs from connection, as it implies that the bodies are in contact, without an interening body; whereas things may be connected by the invention of a third body, as by a cord or chain.

2.

Agreement and conjunction of mind, spirit, will, affections, or the like; harmony; concord.

3.

That which is united, or made one; something formed by a combination or coalition of parts or members; a confederation; a consolidated body; a league; as, the weavers have formed a union; trades unions have become very numerous; the United States of America are often called the Union.

A. Hamilton.

4.

A textile fabric composed of two or more materials, as cotton, silk, wool, etc., woven together.

5.

A large, fine pearl.

[Obs.]

If they [pearls] be white, great, round, smooth, and weighty . . . our dainties and delicates here at Rome . . . call them unions, as a man would say "singular," and by themselves alone. Holland.

In the cup an union shall he throw, Richer than that which four successive kings In Denmark's crown have worn. Shak.

6.

A device emblematic of union, used on a national flag or ensign, sometimes, as in the military standard of Great Britain, covering the whole field; sometimes, as in the flag of the United States, and the English naval and marine flag, occupying the upper inner corner, the rest of the flag being called the fly. Also, a flag having such a device; especially, the flag of Great Britain.

⇒ The union of the United States ensign is a cluster of white stars, denoting the union of the States, and, properly, equal in number to that of the States, displayed on a blue field; the fly being composed of alternate stripes of red and white. The union of the British ensign is the three crosses of St. George, St. Andrew, and St. Patrick in combination, denoting the union of England, Scotland and Ireland, displayed on a blue field in the national banner used on shore, on a red, white, or blue field in naval ensigns, and with a white border or fly in the merchant service.

7. Mach.

A joint or other connection uniting parts of machinery, or the like, as the elastic pipe of a tender connecting it with the feed pipe of a locomotive engine; especially, a pipe fitting for connecting pipes, or pipes and fittings, in such a way as to facilitate disconnection.

8. Brewing

A cask suspended on trunnions, in which fermentation is carried on.

Hypostatic union Theol. See under Hypostatic. -- Latin union. See under Latin. -- Legislative Union Eng. Hist., the union of Great Britain and Ireland, which took place Jan. 1, 1801. -- Union, ∨ Act of Union Eng. Hist., the act by which Scotland was united to England, or by which the two kingdoms were incorporated into one, in 1707. -- Union by the first, ∨ second, intention. Surg. See To heal by the first, ∨ second, intention, under Intention. -- Union down Naut., a signal of distress at sea made by reversing the flag, or turning its union downward. -- Union jack. Naut. See Jack, n., 10. -- Union joint. Mech. (a) A joint formed by means of a union. (b) A piece of pipe made in the form of the letter T.

Syn. -- Unity; junction; connection; concord; alliance; coalition; combination; confederacy. -- Union, Unity. Union is the act of bringing two or more things together so as to make but one, or the state of being united into one. Unity is a state of simple oneness, either of essence, as the unity of God, or of action, feeling, etc., as unity of design, of affection, etc. Thus, we may speak of effecting a union of interests which shall result in a unity of labor and interest in securing a given object.

One kingdom, joy, and union without end. Milton.

[Man] is to . . . beget Like of his like, his image multiplied. In unity defective; which requires Collateral love, and dearest amity. Milton.

 

© Webster 1913.

Log in or register to write something here or to contact authors.