In: Computer Science
Demonstrate how a temporal database is used in business
Explain how spatial databases are used in business
Explain how SQL is used with spatial databases
Explain how NoSQL databases are being used to store unstructured business data
Demonstrate how a temporal database is used in business
A temporal database efficiently stores a time series of data, typically by having some fixed timescale (such as seconds or even milliseconds) and then storing only changes in the measured data. A timestamp in an RDBMS is a discretely stored value for each measurement, which is very inefficient. A temporal database is often used in real-time monitoring applications like SCADA. A well-established system is the PI database from OSISoft.
Business usage:Suppose A report is generated in January detailing sales the previous quarter and year. In February a correction is made to the sales numbers for some reason retroactive to December. The clerk who made the correction leaves the company in March. Then in April the 1st quarter report showing the previous 12 months does not agree with the year end report so someone has the year end report rerun and it still disagrees with the original report. Why? When did things change? Can we verify the original report. Bitemporal database has the details of what was known when the original report was generated and when it was changed.
Explain how spatial databases are used in business
A spatial database is a database that is enhanced to store and access spatial data or data that defines a geometric space. These data are often associated with geographic locations and features, or constructed features like cities. Data on spatial databases are stored as coordinates, points, lines, polygons and topology. Some spatial databases handle more complex data like three-dimensional objects, topological coverage and linear networks.
An example where Spatial databases are used:
Locating and organizing location dependent services
Providing services to mobile devices is more than just converting Web information to match the capabilities of the device (small screen, low bandwidth, etc.). A typical Web portal, as provided by companies such as Yahoo or as provided internally by corporations to their work force, is loaded with as much information as possible, usually in the form of jumping-off points to other information repositories. This approach is too limited once one considers mobile devices that, by definition, can be anywhere. However, once one adds the capability for the Web server to recognize the geographical location of a mobile device, the server can then adapt it self and provide services or information that are relevant to the current location.
Extending this model, one can see that large number of services can then be built all with content that is more or less local to specific locations: for example, a service monitors local buses and trains, while another monitors inter-city trains and commuter airline traffic. The model can extend to local restaurants advertising their menu, hotels with room availability, theaters that have last-minute tickets for sale, etc. Further along the line, services could themselves be physical devices that just advertise their availability: public printers on a campus, ATMs, vending machines, etc. Clearly, in such a model, the number of services potentially relevant for a given location can grow enormously and be very dynamic, with new services appearing and disappearing constantly.
Our current line of thought is to associate services with geographical areas or “regions”. A region can of course be defined as a member of a hierarchical structure (country, state or province, county, city or municipality, district, street, etc.). However, this model is too simple to represent the reality, where regions are likely to be defined in more flexible ways, crossing over the hierarchical boundaries. Examples can be metropolitan areas that spread over state or country boundaries, or company-specific sales areas that cover areas over multiple counties. The services provided by the spatial database can be used to define new service regions based on some spatial and non-spatial attributes. For example, a spatial union operator can be used to combine multiple existing service areas into a new service area. The spatial buffer operator can be used to construct a new service area based on some distance metric.
How SQL is used with spatial databases:
Spatial Query Processing
Spatial queries are often processed using filter and refine
techniques (for a survey on different spatial query processing
techniques see Gueting (1994)). In the first filter step, some
approximate representation of a spatial object is used to determine
a set of candidate objects which are likely to satisfy the given
spatial query. Common approximations used in spatial databases are
minimum orthogonal bounding box and multiple bounding boxes. Then
the candidate set is further examined using the exact
representations of the objects to find the actual set of objects
which satisfy the given query. The approximations are chosen such
that if the approximations of objects A and B do not satisfy a
relationship, then that relationship cannot be satisfied between
the objects A and B.
Spatial data describes the physical location and shape of geometric objects. These objects can be point locations or complex objects such as countries, roads, or lakes. SQL Server’s spatial data types, which are based on latitude and longitude coordinates, let you store these objects and make them available to calling applications.
SQL Server supports two spatial data types:
Each of the spatial data types has its own use. For example, the Geography type is often used to store an application’s GPS data, while the Geometry type is often used to map a three-dimensional object, such as a building.
Together, the two spatial data types support 16 types of data objects. Of the 16, 11 are instantiable (can be represented) in a database. They derive certain properties from their parent data type, and it’s these properties that distinguish them as objects such as points or linestrings.
Ten of the instantiable data objects are available to both the Geometry and Geography data types. The objects include Point, MultiPoint, LineString, CircularString, MultiLineString , CompoundCurve, Polygon, CurvePolygon, MultiPolygon, and GeometryCollection. The eleventh object type, FullGlobe, is instantiable only for the Geography data type.
The object types supported by the spatial data types can be divided in two groups:
Explain how NoSQL databases are being used to store unstructured business data
Relational databases rely on tables, columns, rows, or schemas to organize and retrieve data. In contrast, NoSQL databases do not rely on these structures and use more flexible data models. NoSQL can mean “not SQL” or “not only SQL.”s RDBMS have increasingly failed to meet the performance, scalability, and flexibility needs that next-generation, data-intensive applications require, NoSQL databases have been adopted by mainstream enterprises. NoSQL is particularly useful for storing unstructured data, which is growing far more rapidly than structured data and does not fit the relational schemas of RDBMS.
TYPES OF NOSQL DATABASES
Several different varieties of NoSQL databases have been created to support specific needs and use cases. These fall into four main categories: