120 likes | 207 Views
The E/R model, triggers, HTML5. Reminder … next Tuesday is the first exam. E/R. A design front end for relational databases, not as an independent model Intended to have a visual syntax As opposed to “semantic” models that were intended as alternatives to the relational model
E N D
The E/R model, triggers, HTML5 Reminder … next Tuesday is the first exam.
E/R • A design front end for relational databases, not as an independent model • Intended to have a visual syntax • As opposed to “semantic” models that were intended as alternatives to the relational model • Knowledge representation to semantic models • Another alternative: object-oriented models • Object-oriented programming languages to object-oriented data models to object-relational data models • At a higher perspective: there is a long spectrum of data structuring, and our models only handle a small part
E/R • Entities • Relationships • Attributes • Roles • Cardinality constraints • Type hierarchies • Exclusive relationships
Mapping to relational schemas • Both entities and relationships turn into tables • Attributes are attributes • Constraints lead to multiple tupes or set-valued atts
Triggers • ON event IF precondition THEN action • Used for constraints and “business rules” and monitoring • Triggers are “activated” • Consideration: immediately or deferred to commit time • Before, after, instead of triggers • Row level versus table level triggers • Can refer to old and new tuples • On delete: cascade or turn null • Issue: chain reactions • Issue: tangled, non-declarative semantics
HTML5 • Web 2.0/3.0 versus the “semantic web” • New elements, largely to support advanced media • New elements for structuring pages, as well
Illustrations and rendering • Major goal: supporting interactive and data-fed animations, such as pie charts and change their shapes • Current: JPG and GIF and PNG raster images • New: Canvas – to create bit mapped images and animation • New: SVG (scalable vector graphics) – vector graphics in an XML syntax, with color and gradient color • But right now there are few apps that produce these animations • Goal is a standard for apps that produce interactive and non-interactive animation • Goal: to get images to appear identical in different browsers and varying sizes, in particular on small devices • Goal: to get animations to appear identical in different browsers and on small devices
CANVAS • An alternative to Flash animation • Displacing SMIL • Creates bit mapped images (not vector graphics, as with SVG) • Can build lines, rectangles, curves • Curves: Bezier, arcs, and others • Colors
Other media and applications • Video • Audio • Logos: with SVG • Charts: with Canvas
Managing local data • Long a problem with standard HTML • Previously, we had to use cookies and/or Ajax code • In HTML5, there is a “LocalStorage” • In use already in Gmail for Iphones • It makes use of SQLite • But an SQL database is not part of the standard; it just makes it possible to plug one in
Video: a special focus • Video is embedded in many sites now • Streaming rates are fast enough for most people to play even large videos on the Web • Two supported formats • MPEG4 • Ogg (like MPEG4, can handle small video all the way to HD) • Audio Ogg is also supported – but not MP3 • The goal is to remove the highly varying ways in which browsers will manage video • Before HTML5 it was difficult to put video in a form that all browsers would play • You are no longer expected to test to see what plugin exists in the user’s browser • But Ogg support is not broad yet
Style sheets: CSS3 (not strictly tied to HTML5) • Some advancements, such as embedding specific fonts in pages, and not hoping your “font family” is supported well enough on your user’s page • Better and finer grained support of font color • Supports finer grained control of fonts on pages • Better multi-column support • Easier and more fine grained control of position on web pages • Better control of graphics color • Two forms of animation: • Transitions: time, easing in and easing out, motion curves (Bezier) • Transforms: more advanced movement, like bouncing • Better support for mobile devices