How are empty sets and null sets different?

197 views

How are empty sets and null sets different?

In: 2

5 Answers

Anonymous 0 Comments

There is no difference.

They’re different names for the same thing.

A null set is a set with nothing in it. Aka an empty set.

Anonymous 0 Comments

[deleted]

Anonymous 0 Comments

In set theory, null set and empty set mean the same thing – the set that contains no elements. Note that there’s only one empty/null set, because when two sets have the same elements, they are considered the same set.

In [measure theory](https://en.wikipedia.org/wiki/Measure_(mathematics)) there another definition of a null set, which is a set whose measure is 0.

Anonymous 0 Comments

From a data point of view NULL is not necessarily = blank.

blank data can be an empty string, a blank text field, a 0, or any other data representing blank data.

NULL is the data not existing. This can be for the same reasons that you have blank data (e.g. data not filled in), but can also represent missing data. Missing data might be an error in the data collection, data deliberately removed, or data not provided for any number of business reasons.

It trips a lot of inexperienced database scripters off guard

Anonymous 0 Comments

Imagine a motel with 10 rooms. You ask how many are vacant. You’re told 3 rooms are empty: room #2, room #7, room #8. A set to represent this is “3 rooms: [2, 7, 8]”.

Imagine the same motel with no vacant rooms. A set to represent this is “0 rooms: []”.

Imagine a fast food restaurant. You ask how many vacancies there. Sir, this is a Wendy’s – we don’t have vacancies. A set to represent this is “null”.

Imagine the same motel with some vacant rooms. Your parents ask you to find out, but you get distracted playing. They ask you later – you tell them you don’t know. A set to represent this is “null”.

There are many situations where “empty set” and “no set” CAN be used to impart meaningful information. “null” is a convenient placeholder for “the absence of a thing” or “this has no meaningful data” or “we were unable to build the dataset for you”. It’s optional, but useful.