Top Banner
Video and audio – summary We will take a look at: Video Audio Digitalization TV-formats and standards Human shortcomings Compression Coding What features are interesting? DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 1 / 30
123

Video and audio – summary

Feb 04, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Video and audio – summary

Video and audio – summary

We will take a look at:• Video• Audio• Digitalization• TV-formats and standards• Human shortcomings• Compression• Coding• What features are interesting?

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 1 / 30

Page 2: Video and audio – summary

Video and audio

Video is the most challenging data type partly because it “contains” all other datatypes and partly because video data objects are big.Even highly compressed a one hour video (with good quality) occupies severalGB.

Also, it is important to distinguish between analogue and digital video/audio.Our senses work in an analogue fashion and thus we have to either showanalogue video/audio or trick the eye/ear into finding the data analogue, which infact is not all that hard.

Video may contain images or analogue pixel streams and also audio and text sowe may have to apply a number of techniques for a good result.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 2 / 30

Page 3: Video and audio – summary

Video and audio

Video is the most challenging data type partly because it “contains” all other datatypes and partly because video data objects are big.Even highly compressed a one hour video (with good quality) occupies severalGB.

Also, it is important to distinguish between analogue and digital video/audio.Our senses work in an analogue fashion and thus we have to either showanalogue video/audio or trick the eye/ear into finding the data analogue, which infact is not all that hard.

Video may contain images or analogue pixel streams and also audio and text sowe may have to apply a number of techniques for a good result.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 2 / 30

Page 4: Video and audio – summary

Video and audio

Video is the most challenging data type partly because it “contains” all other datatypes and partly because video data objects are big.Even highly compressed a one hour video (with good quality) occupies severalGB.

Also, it is important to distinguish between analogue and digital video/audio.Our senses work in an analogue fashion and thus we have to either showanalogue video/audio or trick the eye/ear into finding the data analogue, which infact is not all that hard.

Video may contain images or analogue pixel streams and also audio and text sowe may have to apply a number of techniques for a good result.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 2 / 30

Page 5: Video and audio – summary

Video and audio . . .

To turn analogue video/audio into digital video/audio we must convert the signaland at play back we must re-convert the signal (or fool the eye/ear).If we record analogue signals, we have no need for AD/DA-conversion.

Still, the normal case is to convert ???

There is not only the AD/DA-conversion. In a media database we want to extractinteresting features for indexing and querying.And, in addition, storage media is not at all as good for analogue storage as it isfor digital storage.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 3 / 30

Page 6: Video and audio – summary

Video and audio . . .

To turn analogue video/audio into digital video/audio we must convert the signaland at play back we must re-convert the signal (or fool the eye/ear).If we record analogue signals, we have no need for AD/DA-conversion.

Still, the normal case is to convert ???

There is not only the AD/DA-conversion. In a media database we want to extractinteresting features for indexing and querying.And, in addition, storage media is not at all as good for analogue storage as it isfor digital storage.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 3 / 30

Page 7: Video and audio – summary

Video and audio . . .

To turn analogue video/audio into digital video/audio we must convert the signaland at play back we must re-convert the signal (or fool the eye/ear).If we record analogue signals, we have no need for AD/DA-conversion.

Still, the normal case is to convert ???

There is not only the AD/DA-conversion. In a media database we want to extractinteresting features for indexing and querying.And, in addition, storage media is not at all as good for analogue storage as it isfor digital storage.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 3 / 30

Page 8: Video and audio – summary

Video and audio . . .

Digital media has a universal representation and all digital media may be treatedthe same way (even if encoding is not the same and conversion may benecessary)

Digital signals are more compact both when storing them and when transmittingthem and they may easily be managed with computers

In the production stage, analogue signal quality suffer at each step in themanagement while digital signals have one initial quality loss (when converting todigital signals) and one final when converting back to analogue (which as hasbeen noted, not always must be performed)

The final total quality loss is much lower with digital than with analogue signals•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 4 / 30

Page 9: Video and audio – summary

Video and audio . . .

Digital media has a universal representation and all digital media may be treatedthe same way (even if encoding is not the same and conversion may benecessary)

Digital signals are more compact both when storing them and when transmittingthem and they may easily be managed with computers

In the production stage, analogue signal quality suffer at each step in themanagement while digital signals have one initial quality loss (when converting todigital signals) and one final when converting back to analogue (which as hasbeen noted, not always must be performed)

The final total quality loss is much lower with digital than with analogue signals•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 4 / 30

Page 10: Video and audio – summary

Video and audio . . .

Digital media has a universal representation and all digital media may be treatedthe same way (even if encoding is not the same and conversion may benecessary)

Digital signals are more compact both when storing them and when transmittingthem and they may easily be managed with computers

In the production stage, analogue signal quality suffer at each step in themanagement while digital signals have one initial quality loss (when converting todigital signals) and one final when converting back to analogue (which as hasbeen noted, not always must be performed)

The final total quality loss is much lower with digital than with analogue signals•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 4 / 30

Page 11: Video and audio – summary

Video and audio . . .

Digital media has a universal representation and all digital media may be treatedthe same way (even if encoding is not the same and conversion may benecessary)

Digital signals are more compact both when storing them and when transmittingthem and they may easily be managed with computers

In the production stage, analogue signal quality suffer at each step in themanagement while digital signals have one initial quality loss (when converting todigital signals) and one final when converting back to analogue (which as hasbeen noted, not always must be performed)

The final total quality loss is much lower with digital than with analogue signals•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 4 / 30

Page 12: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 13: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 14: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 15: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 16: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 17: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 18: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 19: Video and audio – summary

Against digital media

The coding introduces distorsion

Complicated decoding

Sampled media has to be digitized in two steps

Each step introduces distorsion

More advanced techniques demand more storage

More bits per pixel demands more storage

It can never match the original

Partial semantic loss in the digitizing step•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 5 / 30

Page 20: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 21: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 22: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 23: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 24: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 25: Video and audio – summary

For digital media

Technical development is rapid – giving better and better results

Compression techniques evolve faster than digitizing techniques. Thus theincrease is far from linear.

Vector graphics make digitizing more exact and less bulky

Symbolic representation (like vector graphics) preserve semantics

Symbolic representation is not as distorsion prone as pixel based (thus betterinitial digitalization)

May be compressed to a higher degree than the pixel based counterpart•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 6 / 30

Page 26: Video and audio – summary

New standards

XML-based standards, like Scalable Vector Graphics (SVG) give more compactimages that scale (up and down) with maintained quality.

May be modified by software . . .

XML is not that compact so compression is needed anyway.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 7 / 30

Page 27: Video and audio – summary

New standards

XML-based standards, like Scalable Vector Graphics (SVG) give more compactimages that scale (up and down) with maintained quality.

May be modified by software . . .

XML is not that compact so compression is needed anyway.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 7 / 30

Page 28: Video and audio – summary

New standards

XML-based standards, like Scalable Vector Graphics (SVG) give more compactimages that scale (up and down) with maintained quality.

May be modified by software . . .

XML is not that compact so compression is needed anyway.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 7 / 30

Page 29: Video and audio – summary

Technologies and formats

There are many formats and technologies, each having advantages anddisadvantages

PAL EuropeSECAM FranceNTSC USA/Canada/Japan

NTSC was first.

SECAM was originally NTSC with better resolution

PAL is NTSC + feedback for colour compensation by correlation (delay and coloursmoothing)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 8 / 30

Page 30: Video and audio – summary

Technologies and formats

There are many formats and technologies, each having advantages anddisadvantages

PAL EuropeSECAM FranceNTSC USA/Canada/Japan

NTSC was first.

SECAM was originally NTSC with better resolution

PAL is NTSC + feedback for colour compensation by correlation (delay and coloursmoothing)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 8 / 30

Page 31: Video and audio – summary

Technologies and formats

There are many formats and technologies, each having advantages anddisadvantages

PAL EuropeSECAM FranceNTSC USA/Canada/Japan

NTSC was first.

SECAM was originally NTSC with better resolution

PAL is NTSC + feedback for colour compensation by correlation (delay and coloursmoothing)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 8 / 30

Page 32: Video and audio – summary

Technologies and formats

There are many formats and technologies, each having advantages anddisadvantages

PAL EuropeSECAM FranceNTSC USA/Canada/Japan

NTSC was first.

SECAM was originally NTSC with better resolution

PAL is NTSC + feedback for colour compensation by correlation (delay and coloursmoothing)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 8 / 30

Page 33: Video and audio – summary

Technologies and formats

There are many formats and technologies, each having advantages anddisadvantages

PAL EuropeSECAM FranceNTSC USA/Canada/Japan

NTSC was first.

SECAM was originally NTSC with better resolution

PAL is NTSC + feedback for colour compensation by correlation (delay and coloursmoothing)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 8 / 30

Page 34: Video and audio – summary

N T S C

National Television System Committee

Lines/Field 525/60Horizontal Frequency 15.734 kHzVertical Frequency 60 HzColour Sub carrier Frequency 3.579545 MHzVideo Bandwidth 4.2 MHzSound Carrier 4.5 MHz

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 9 / 30

Page 35: Video and audio – summary

P A L

Phase Alternating Line

SYSTEM PAL PAL N PAL MLine/Field 625/50 625/50 525/60Horizontal Freq. 15.625 kHz 15.625 kHz 15.750 kHzVertical Freq. 50 Hz 50 Hz 60 HzColour Sub Carrier 4.433618 MHz 3.582056 MHz 3.575611 MHzVideo Bandwidth 5.0 MHz 4.2 MHz 4.2 MHzSound Carrier 5.5 MHz 4.5 MHz 4.5 MHz

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 10 / 30

Page 36: Video and audio – summary

S E C A M

Sequential Couleur Avec Memoire

Sequential Colour with Memory

SYSTEM SECAM B,G,H SECAM D,K,K1,LLine/Field 625/50 625/50Horizontal Frequency 15.625 kHz 15.625 kHzVertical Frequency 50 Hz 50 HzVideo Bandwidth 5.0 MHz 6.0 MHzSound Carrier 5.5 MHz 6.5 MHz

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 11 / 30

Page 37: Video and audio – summary

Digital formats

DV-band miniDV, . . .CDROM QT, AVI, MPEG (I), . . .DVD MPEG II, MPEG N, . . .Internet server QT, AVI, . . .Stream server QT(stream), RA, ASF

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 12 / 30

Page 38: Video and audio – summary

Comparison

In TV you see only part of the image (edges are cut off)

In a computer screen everything is shown

In (PAL) TV the image is drawn in two steps, first all odd lines and then all evenlines. No flicker at 25 images per sec

The computer screen images is drawn in one sweep (progressive scan)

In TV there are no alternatives

In a computer connection bandwidth must be taken into consideration•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 13 / 30

Page 39: Video and audio – summary

Comparison

In TV you see only part of the image (edges are cut off)

In a computer screen everything is shown

In (PAL) TV the image is drawn in two steps, first all odd lines and then all evenlines. No flicker at 25 images per sec

The computer screen images is drawn in one sweep (progressive scan)

In TV there are no alternatives

In a computer connection bandwidth must be taken into consideration•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 13 / 30

Page 40: Video and audio – summary

Comparison

In TV you see only part of the image (edges are cut off)

In a computer screen everything is shown

In (PAL) TV the image is drawn in two steps, first all odd lines and then all evenlines. No flicker at 25 images per sec

The computer screen images is drawn in one sweep (progressive scan)

In TV there are no alternatives

In a computer connection bandwidth must be taken into consideration•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 13 / 30

Page 41: Video and audio – summary

Comparison

In TV you see only part of the image (edges are cut off)

In a computer screen everything is shown

In (PAL) TV the image is drawn in two steps, first all odd lines and then all evenlines. No flicker at 25 images per sec

The computer screen images is drawn in one sweep (progressive scan)

In TV there are no alternatives

In a computer connection bandwidth must be taken into consideration•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 13 / 30

Page 42: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 43: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 44: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 45: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 46: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 47: Video and audio – summary

Human shortcomings

The brain is the most sensitive for changes in contrast at about 10 Hz

At 25 Hz we don’t note single small changes. It takes big changes . . . . . .

Spatial changes are noted at up to 12 Hz per angular degree (≈ 0.00875 radiansper image in a PAL setting)

Sensitivity increases with lower frequency and gets really irritating at 4 HZ /angular degree

“From far away we dont notice the stripes”. “At dawn all cats are grey”. . . . . . .

Huge benefits (in terms of coding) if we are just outside of the limits. Contrastperception gives us image rate and spatial perception resolution. At normal (?)viewing distance PAL is more than just adequate.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 14 / 30

Page 48: Video and audio – summary

Human shortcomings . . .

NTSC is a smart invention. We see colour distortion only if it is considerable (?)and under special circumstances.

SECAM is a french overkill . . .

As we notice changes in intensity easier than colour distortion it is better to usefewer bits for colour and more bits for intensity information

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 15 / 30

Page 49: Video and audio – summary

Human shortcomings . . .

NTSC is a smart invention. We see colour distortion only if it is considerable (?)and under special circumstances.

SECAM is a french overkill . . .

As we notice changes in intensity easier than colour distortion it is better to usefewer bits for colour and more bits for intensity information

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 15 / 30

Page 50: Video and audio – summary

Human shortcomings . . .

NTSC is a smart invention. We see colour distortion only if it is considerable (?)and under special circumstances.

SECAM is a french overkill . . .

As we notice changes in intensity easier than colour distortion it is better to usefewer bits for colour and more bits for intensity information

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 15 / 30

Page 51: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 52: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 53: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 54: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 55: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 56: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 57: Video and audio – summary

Classification

HDTV - DTV - TV - VCR - Video conference

HDTV give us high resolution (to what benefit??)

TV = today’s mainstream technology (more than adequate)

DTV = tomorrows technology, same resolution as today, less noise

VCR = TV / 2 – in terms of quality

Video conference = TV / 8 + fewer images per sec (we have seen Steve Jobswalking like a robot with plastic facial expressions on Apples live broadcasts overthe internet)

But the human brain uses far more resources trying to classify “news” as “old” andrecognizable than to understand that it is in fact news.

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 16 / 30

Page 58: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 59: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 60: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 61: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 62: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 63: Video and audio – summary

Compression

MPEG = Moving Picture Experts Group

MPEG(1) – OK for VCR quality (≈ 1,5 Mbps)

MPEG(2) – DVD / HDTV but requires ≈ 40 Mbps so data is buffered and startis delayed

MPEG3 – never saw the light of day

MPEG4 – video format for limited bandwidths

MPEG7 – XML standard for MPEG (many different parts)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 17 / 30

Page 64: Video and audio – summary

Video/audio→ digital media

Digitizing by sampling(earlier RGB coding – now YUV more common)

Compression over time

Compression in the image plane

Coding (entropy-coding)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 18 / 30

Page 65: Video and audio – summary

Video/audio→ digital media

Digitizing by sampling(earlier RGB coding – now YUV more common)

Compression over time

Compression in the image plane

Coding (entropy-coding)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 18 / 30

Page 66: Video and audio – summary

Video/audio→ digital media

Digitizing by sampling(earlier RGB coding – now YUV more common)

Compression over time

Compression in the image plane

Coding (entropy-coding)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 18 / 30

Page 67: Video and audio – summary

Video/audio→ digital media

Digitizing by sampling(earlier RGB coding – now YUV more common)

Compression over time

Compression in the image plane

Coding (entropy-coding)

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 18 / 30

Page 68: Video and audio – summary

Coding principles

RGB = red – green – blue

old standard

YUV = Y (luminance) + UV (chrominance in two dimensions)

UV can be calculated from RGB and we need the luminance in any case

YUV coding is more compact than RGB and faster to decode.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 19 / 30

Page 69: Video and audio – summary

Coding principles

RGB = red – green – blue

old standard

YUV = Y (luminance) + UV (chrominance in two dimensions)

UV can be calculated from RGB and we need the luminance in any case

YUV coding is more compact than RGB and faster to decode.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 19 / 30

Page 70: Video and audio – summary

Coding principles

RGB = red – green – blue

old standard

YUV = Y (luminance) + UV (chrominance in two dimensions)

UV can be calculated from RGB and we need the luminance in any case

YUV coding is more compact than RGB and faster to decode.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 19 / 30

Page 71: Video and audio – summary

Coding principles

RGB = red – green – blue

old standard

YUV = Y (luminance) + UV (chrominance in two dimensions)

UV can be calculated from RGB and we need the luminance in any case

YUV coding is more compact than RGB and faster to decode.•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 19 / 30

Page 72: Video and audio – summary

Compression principles

Compression algorithms are smart.

Compression over time is based on the fact that not much differ from one image toanother so you don’t resend the whole image but rather information aboutchanges and advanced predictions and error compensations.

In the image plane you compress using Fourier transforms. As discretization hasalready been performed in the digitizing step you only apply a cosine transform toget a “frequency plane image”.

Then you cut off frequencies that the human eye cannot perceive•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 20 / 30

Page 73: Video and audio – summary

Compression principles

Compression algorithms are smart.

Compression over time is based on the fact that not much differ from one image toanother so you don’t resend the whole image but rather information aboutchanges and advanced predictions and error compensations.

In the image plane you compress using Fourier transforms. As discretization hasalready been performed in the digitizing step you only apply a cosine transform toget a “frequency plane image”.

Then you cut off frequencies that the human eye cannot perceive•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 20 / 30

Page 74: Video and audio – summary

Compression principles

Compression algorithms are smart.

Compression over time is based on the fact that not much differ from one image toanother so you don’t resend the whole image but rather information aboutchanges and advanced predictions and error compensations.

In the image plane you compress using Fourier transforms. As discretization hasalready been performed in the digitizing step you only apply a cosine transform toget a “frequency plane image”.

Then you cut off frequencies that the human eye cannot perceive•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 20 / 30

Page 75: Video and audio – summary

Entropy codingClaude Shannon defined in 1948 the entropy of an information source generatingsymbols based on the probability that a symbol occurs as

H = −∑

i

pi log pi

It was defined out of the need to understand how you have to dimension thecapacity of a communication channel (roughly its bandwidth) and is based onstochastic probabilities.It gives a good measure on how many bits that will be necessary for the codingand combined with Huffman coding it is possible to minimize coding length forinformation storage and transfer.

It also makes it possible to differentiate between requirements for differentscenarios. A quite day on a summer meadows will require much less bandwidththan an action movie

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 21 / 30

Page 76: Video and audio – summary

Entropy codingClaude Shannon defined in 1948 the entropy of an information source generatingsymbols based on the probability that a symbol occurs as

H = −∑

i

pi log pi

It was defined out of the need to understand how you have to dimension thecapacity of a communication channel (roughly its bandwidth) and is based onstochastic probabilities.It gives a good measure on how many bits that will be necessary for the codingand combined with Huffman coding it is possible to minimize coding length forinformation storage and transfer.

It also makes it possible to differentiate between requirements for differentscenarios. A quite day on a summer meadows will require much less bandwidththan an action movie

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 21 / 30

Page 77: Video and audio – summary

Entropy codingClaude Shannon defined in 1948 the entropy of an information source generatingsymbols based on the probability that a symbol occurs as

H = −∑

i

pi log pi

It was defined out of the need to understand how you have to dimension thecapacity of a communication channel (roughly its bandwidth) and is based onstochastic probabilities.It gives a good measure on how many bits that will be necessary for the codingand combined with Huffman coding it is possible to minimize coding length forinformation storage and transfer.

It also makes it possible to differentiate between requirements for differentscenarios. A quite day on a summer meadows will require much less bandwidththan an action movie

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 21 / 30

Page 78: Video and audio – summary

Entropy codingClaude Shannon defined in 1948 the entropy of an information source generatingsymbols based on the probability that a symbol occurs as

H = −∑

i

pi log pi

It was defined out of the need to understand how you have to dimension thecapacity of a communication channel (roughly its bandwidth) and is based onstochastic probabilities.It gives a good measure on how many bits that will be necessary for the codingand combined with Huffman coding it is possible to minimize coding length forinformation storage and transfer.

It also makes it possible to differentiate between requirements for differentscenarios. A quite day on a summer meadows will require much less bandwidththan an action movie

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 21 / 30

Page 79: Video and audio – summary

Interesting features

In media databases we index even meta-data. It is more common to query basedon meta-data than on the data itself.

Features that are interesting for one type of media may be interesting for othermedia as well. Indexes may cover data of several types

In addition we are interested in recurring patterns in the features/attributes.Is the background red(-dish) on many pictures?How many pictures in a sequence had a mostly red background?

Sound volume – a persons tone of voice – background noise

Voice recognition is complicated and challenging both in video and audio•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 22 / 30

Page 80: Video and audio – summary

Interesting features

In media databases we index even meta-data. It is more common to query basedon meta-data than on the data itself.

Features that are interesting for one type of media may be interesting for othermedia as well. Indexes may cover data of several types

In addition we are interested in recurring patterns in the features/attributes.Is the background red(-dish) on many pictures?How many pictures in a sequence had a mostly red background?

Sound volume – a persons tone of voice – background noise

Voice recognition is complicated and challenging both in video and audio•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 22 / 30

Page 81: Video and audio – summary

Interesting features

In media databases we index even meta-data. It is more common to query basedon meta-data than on the data itself.

Features that are interesting for one type of media may be interesting for othermedia as well. Indexes may cover data of several types

In addition we are interested in recurring patterns in the features/attributes.Is the background red(-dish) on many pictures?How many pictures in a sequence had a mostly red background?

Sound volume – a persons tone of voice – background noise

Voice recognition is complicated and challenging both in video and audio•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 22 / 30

Page 82: Video and audio – summary

Interesting features

In media databases we index even meta-data. It is more common to query basedon meta-data than on the data itself.

Features that are interesting for one type of media may be interesting for othermedia as well. Indexes may cover data of several types

In addition we are interested in recurring patterns in the features/attributes.Is the background red(-dish) on many pictures?How many pictures in a sequence had a mostly red background?

Sound volume – a persons tone of voice – background noise

Voice recognition is complicated and challenging both in video and audio•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 22 / 30

Page 83: Video and audio – summary

Interesting features

In media databases we index even meta-data. It is more common to query basedon meta-data than on the data itself.

Features that are interesting for one type of media may be interesting for othermedia as well. Indexes may cover data of several types

In addition we are interested in recurring patterns in the features/attributes.Is the background red(-dish) on many pictures?How many pictures in a sequence had a mostly red background?

Sound volume – a persons tone of voice – background noise

Voice recognition is complicated and challenging both in video and audio•

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 22 / 30

Page 84: Video and audio – summary

Interesting features in speech

Number of identifiable words

Number of speakers

Vocabulary size

Grammar

From the flow of words (sometimes more than one flow) it is interesting to extractnames, places, recognizable idioms, dates (including time specs), organizations(if people can be identified as belonging to an . . . )

There is (according to rumours) speech and video QBE where you may stateelements of a story and get “similar” stories fetched from a database

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 23 / 30

Page 85: Video and audio – summary

Interesting features in speech

Number of identifiable words

Number of speakers

Vocabulary size

Grammar

From the flow of words (sometimes more than one flow) it is interesting to extractnames, places, recognizable idioms, dates (including time specs), organizations(if people can be identified as belonging to an . . . )

There is (according to rumours) speech and video QBE where you may stateelements of a story and get “similar” stories fetched from a database

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 23 / 30

Page 86: Video and audio – summary

Interesting features in speech

Number of identifiable words

Number of speakers

Vocabulary size

Grammar

From the flow of words (sometimes more than one flow) it is interesting to extractnames, places, recognizable idioms, dates (including time specs), organizations(if people can be identified as belonging to an . . . )

There is (according to rumours) speech and video QBE where you may stateelements of a story and get “similar” stories fetched from a database

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 23 / 30

Page 87: Video and audio – summary

Other interesting features

I already mentioned that media data is spatial and temporal in essence, meaningthat knowledge of such systems is an advantage (GIS e.g.)

Temporal aspects deal with time. Not only with exact time specifications but alsotime in relation to events or facts.Was there a house before the road was built?Was the place excavated for archaeological remains prior to erecting the newbuildings?Did house A disappear before house B?. . .

Spacial aspects deal with absolute location as well as relative location.Are the houses along-side road E18 within noise limits for the railroad and / or thefree-way?What areas must be evacuated in case of a tsunami alert?Which rescue stations are within 15 minutes from an accident?

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 24 / 30

Page 88: Video and audio – summary

Other interesting features

I already mentioned that media data is spatial and temporal in essence, meaningthat knowledge of such systems is an advantage (GIS e.g.)

Temporal aspects deal with time. Not only with exact time specifications but alsotime in relation to events or facts.Was there a house before the road was built?Was the place excavated for archaeological remains prior to erecting the newbuildings?Did house A disappear before house B?. . .

Spacial aspects deal with absolute location as well as relative location.Are the houses along-side road E18 within noise limits for the railroad and / or thefree-way?What areas must be evacuated in case of a tsunami alert?Which rescue stations are within 15 minutes from an accident?

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 24 / 30

Page 89: Video and audio – summary

Other interesting features

I already mentioned that media data is spatial and temporal in essence, meaningthat knowledge of such systems is an advantage (GIS e.g.)

Temporal aspects deal with time. Not only with exact time specifications but alsotime in relation to events or facts.Was there a house before the road was built?Was the place excavated for archaeological remains prior to erecting the newbuildings?Did house A disappear before house B?. . .

Spacial aspects deal with absolute location as well as relative location.Are the houses along-side road E18 within noise limits for the railroad and / or thefree-way?What areas must be evacuated in case of a tsunami alert?Which rescue stations are within 15 minutes from an accident?

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 24 / 30

Page 90: Video and audio – summary

Some notes on persistence

Persistence may be achieved in several ways,

• as an extension to an existing language, not necessarily object oriented,• by using a specially dedicated database programming language or• by extending traditional database management systems by including a

programming language. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 25 / 30

Page 91: Video and audio – summary

Some notes on persistence

Persistence may be achieved in several ways,

• as an extension to an existing language, not necessarily object oriented,

• by using a specially dedicated database programming language or• by extending traditional database management systems by including a

programming language. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 25 / 30

Page 92: Video and audio – summary

Some notes on persistence

Persistence may be achieved in several ways,

• as an extension to an existing language, not necessarily object oriented,• by using a specially dedicated database programming language or

• by extending traditional database management systems by including aprogramming language. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 25 / 30

Page 93: Video and audio – summary

Some notes on persistence

Persistence may be achieved in several ways,

• as an extension to an existing language, not necessarily object oriented,• by using a specially dedicated database programming language or• by extending traditional database management systems by including a

programming language. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 25 / 30

Page 94: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:

• Transient data, data that need to be temporarily stored during the evaluation ofexpressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 95: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 96: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 97: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 98: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 99: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes

and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 100: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 101: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 102: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 103: Video and audio – summary

Some notes on persistence . . .

The purpose of persistence is to guarantee secure data storage regardless of thelifespan of the data. The following is a subjective classification:• Transient data, data that need to be temporarily stored during the evaluation of

expressions

• Local variables that occur when activating procedures and functions

• Variables that are declared in procedure and function bodies

• Global and/or dynamic variables (data that exist during program runtime)

which are the traditional persistence classes and

• Data that exist as long as a computer program exists

• Data that survive several program versions

• Data that survive “for ever”

which are the new persistence classes, in which data lifespan no longer is determined by asingle program activation. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 26 / 30

Page 104: Video and audio – summary

Some notes on persistence – requirements and principles

• Orthogonal persistence No data “discrimination”.

• Program must execute in the same “way” regardless of the lifespan of its data. . . •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 27 / 30

Page 105: Video and audio – summary

Some notes on persistence – requirements and principles

• Orthogonal persistence No data “discrimination”.

• Program must execute in the same “way” regardless of the lifespan of its data. . . •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 27 / 30

Page 106: Video and audio – summary

Some notes on persistence – requirements and principles

• Orthogonal persistence No data “discrimination”.

• Program must execute in the same “way” regardless of the lifespan of its data. . . •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 27 / 30

Page 107: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 108: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 109: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 110: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 111: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 112: Video and audio – summary

Some notes on persistence – benefits

• Simpler semantics→ increased productivity

• Without persistence people often use “ad hoc”-solutions to cover the need for valuesthat persist and for transactions.

• Type checks may be performed globally instead of just within an application.

• Simpler to uphold referential integrity as there is a relation to values outside of theapplication.

• Conceptually simpler with one mapping instead of three.

db connection

3GL−world mapping

3GL−world mapping

application

application

DB DB−model

the world

the world

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 28 / 30

Page 113: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 114: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 115: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 116: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 117: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.

Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 118: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 119: Video and audio – summary

Some notes on persistent object memoryObjects that are to persist may be identified in 3 different ways:

• All data are persistent. Simplest. A specific data area contains all variables (possibly the wholeprogram memory) and is saved at program termination.At restart it is read into primary memory.Known as “core dumping”.Drawbacks: The data area (or the whole program) is managed as one unit.

• Only explicitly marked data are persistent. All transfers between program variables andpersistent memory are explicit.Persistent variables are declared as “dynamic”, “persistent”, . . .Data is stored with commands like “export” and fetched with “import”.Exported values become persistent when “checkpoints” are executed.Drawbacks: You work with copies of persistent data.

• Data that can be reached from a “persistent roots are persistent. All data is organised as objectscontaining references to other persistent objects.Objects become persistent when changes are discovered or a “commit” is executed.Data is retrieved when referenced.

Transaction system necessary to guarantee correct updates of persistent data.Object identity is mandatory (naming or by reference).

Object complexity may vary from simple values to complex data structures. •

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 29 / 30

Page 120: Video and audio – summary

Languages for persistent programmingmostly historical

PS-Algol:I Orthogonal persistenceI Both static and dynamic bindingI Procedures are first class valuesI Reflection

Napier:I Built on PS-Algol (has all PS-Algol features)+I Polymorphism and abstract data typesI environments are first class values!!

O++:I Object oriented, built on C++I All values are first class values

Pjama:I Object oriented, extension to JavaI Orthogonal persistence

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 30 / 30

Page 121: Video and audio – summary

Languages for persistent programmingmostly historical

PS-Algol:I Orthogonal persistenceI Both static and dynamic bindingI Procedures are first class valuesI Reflection

Napier:I Built on PS-Algol (has all PS-Algol features)+I Polymorphism and abstract data typesI environments are first class values!!

O++:I Object oriented, built on C++I All values are first class values

Pjama:I Object oriented, extension to JavaI Orthogonal persistence

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 30 / 30

Page 122: Video and audio – summary

Languages for persistent programmingmostly historical

PS-Algol:I Orthogonal persistenceI Both static and dynamic bindingI Procedures are first class valuesI Reflection

Napier:I Built on PS-Algol (has all PS-Algol features)+I Polymorphism and abstract data typesI environments are first class values!!

O++:I Object oriented, built on C++I All values are first class values

Pjama:I Object oriented, extension to JavaI Orthogonal persistence

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 30 / 30

Page 123: Video and audio – summary

Languages for persistent programmingmostly historical

PS-Algol:I Orthogonal persistenceI Both static and dynamic bindingI Procedures are first class valuesI Reflection

Napier:I Built on PS-Algol (has all PS-Algol features)+I Polymorphism and abstract data typesI environments are first class values!!

O++:I Object oriented, built on C++I All values are first class values

Pjama:I Object oriented, extension to JavaI Orthogonal persistence

DD2471 (Lecture 04) Modern database systems & their applications Spring 2012 30 / 30