0

ADO Dataset has ten fields in it. And the size of each field is 2 bytes.

If the dataset fields are filled with null values, will it still occupy the space of 2 bytes for each field, and 20 bytes of data is sent over the network?

fr21
  • 1,746
  • 7
  • 26
  • 45
  • 2
    What do you mean by "dataset"? There are many, many ways to represent data. Please pick a specific one for your question. XML, CSV, JSON all do this differently. Also. You **can** run experiments for your specific data representation. Please run an actual experiment showing actual data you're actually working with and post that as part of your question. – S.Lott Mar 17 '11 at 12:38
  • Modified the dataset in question to ADO dataset. – fr21 Mar 17 '11 at 13:21

2 Answers2

2

Mark Byers has an answer here for sql server: How much size "Null" value takes in SQL Server

Community
  • 1
  • 1
Bastardo
  • 4,144
  • 9
  • 41
  • 60
1

Some space will be taken up. The amount depends on the actual database type you're using, and it's probably an implementation detail you shoudn't care about.

For example the Firebird database compresses all records when it writes them to disk. A raw of NULL's will probably take up less then a raw of 128 byte long strings. But it might take up the same amount of text as a raw of ZERO's.

Cosmin Prund
  • 25,498
  • 2
  • 60
  • 104