Sunday, September 7, 2008
csc as i see it now 009
I currently work as a software tester, and to fully test the application I had a need to insert random dates between 2006-12-01 and 2006-12-20 into an Oracle database. DBMS_RANDOM can be used to generate random numbers, and it can also be used to generate random dates with a few tricks.
Oracle supports the use of Julian dates, or actually Julian day number, which is the number of days that has elapsed since January 1, 4712 BC. This is an integer value (the Julian day number). Since DBMS_RANDOM generates a random value (number), and the number can be converted to a date, it is possible to generate random dates using DBMS_RANDOM. This is how to do it:
--
This will generate the number 2454071. This is the Julian day number. Now, to generate a random date between 2006-12-01 and 2006-12-20 (that is a difference of 20 days), the following SQL query can be used.
SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2454071, 2454071+20)), 'J') FROM DUAL;
The generated (and random) date can now easily be insterted into the table, or update an existing row.
Making table in the firebirds”
Stuart Langridge created a wonderful script called sorttable:
[url=http://www.kryogenix.org/code/browser/sorttable/]sorttable: make all your tables sortable[/url]
He created a class called "sortbottom" for rows which contain data such as totals so that they'll always be placed in the bottom row. But he didn't create a class called "sorttop" or "static" for those rows that aren't the top row but should remain in place rather than getting sorted. I want to make a row sortable that isn't the first one, though it's still a header.
BTW, I got the (x)html/css from Elderweb.com's excellent [url=http://www.elderweb.com/accessibility/default.php?PageID=2950]When You Absolutely, Positively Need a table[/url]. It's valid code and very useful... but it would be more useful if I could get the sorttable to support my code.
I've tried a number of things, none of them even close to successfully. Any ideas would be greatly appreciated.
Creating the Database of file maker
Now that we know how our database will be structured, let’s begin creating it. Open FileMaker. If you’re opening it for the first time (i.e., you haven’t yet turned the preference off), you’ll see the New Database dialog box asking if you’d like to create a file from a template, create an empty file, or open an existing database. Click the radio button for “Create new empty file” and click the OK button. A save dialog will appear where you can choose what to name the new file and where to save it. Choose SerialNumbers.fp7 as the name and pick a good place in your home folder to save the file.
After FileMaker has finished creating the file, it will bring up the Define Database dialog box. This is where you specify how your database is structured, creating tables, fields, and relationships. FileMaker has begun by creating one table named with the same name as the file we created (SerialNumbers), which is a table we need, but we also need two additional tables: Publishers and Products.
Click the Tables tab at the top of the window. In the Table Name field type “Publishers” and click the Create button. Repeat this for the Products table. Your window should like something like this:
Now that we have our tables, let’s create some fields. First we’ll define the fields for Publishers. To do this, either double-click the Publishers row in the list of tables or select the Fields tab and choose Publishers from the Table pop-up menu in the upper-left corner of the window. Then type “PublisherID” in the “Field Name” text field and click Create. Repeat this process for the additional fields of “PublisherName” and “WebAddress.”
The PublisherID field is the primary key field, so we need to tell FileMaker to handle this field in a special way. Double-click the PublisherID field or select it and click Options. In the Options dialog box that appears, click the checkbox for “Serial number” leaving the options that are enabled after doing so with their default values (Generate on creation, next value 1, increment by 1). Also click the checkbox for “Prohibit modification of value during data entry.” Then click the OK button to save your changes to the field.
This tells FileMaker that the next time a record is created in the Publishers table to assign a value of 1 to the PublisherID field. The second time a record is created, assign a value of 2. In this way, each record will have a unique identifier that can be used to create relationships to this table.
Repeat these field creation steps for the Products and SerialNumbers tables. In addition to the ProductID field, the Products table will also need a field for ProductName and PublisherID. The ProductID field should have its options set to auto-enter a serial number just like the PublisherID field in the Publishers table, but the PublisherID field in the Products table is just a normal field with no auto-enter options set. Similary, the SerialNumbers table will need a SerialNumberID, a ProductID and a SerialNumber field with the same auto-enter options for the SerialNumberID as we applied to the other primary key fields.
Now that we have our fields, including our primary and foreign key fields, we can create the relationships between our tables. Click the Relationships tab. You’ll see that a table item has been created for each of our tables, and we can see the fields for each table listed. You may want to rearrange the table items so that they appear from left to right:
Notice that I didn’t call the boxes you see in the Relationships tab tables. They are table items or table occurrences. A database in FileMaker can have multiple table items for each table. The reason for this is beyond the scope of this tutorial, but simply put, when we create relationships, the path from one table item to another table item must be unique. There can’t be any circular relationships. If creating a relationship would create a circular path, a new table item is needed that points to the same table. We can cover such complex relationships in a future tutorial.
FileMaker 7 makes it very easy to create relationships by simply dragging from one table item’s field to the matching field in another table item. We are going to create two relationships, one between Publishers and Products and another between Products and SerialNumbers. We do this by specifying the match field of the relationship. Create the first relationship by dragging from the PublisherID field in the Publishers table item to the same field in the Products table item. This tells FileMaker that when a record exists in each of these tables and the values in these fields are the same, they are related. If we have a record for Apple Computer in the Publishers table and the PublisherID has a value of 1, then a record in the Products table for QuickTime Pro would be linked to that publisher by entering a value of 1 into the PublisherID field of that record.
Repeat the process of creating a relationship by dragging from the ProductID field in Products to the same field in SerialNumbers. Your Define Database dialog should look like this:
To indicate the relationships we’ve created, FileMaker displays a line connecting the match fields between the tables. Notice the line between Publishers and Products. There is a single line at the point it connects with the Publishers table, three lines where it connects with the Products table, and a box between the two table items with an equal sign in it. FileMaker has noticed that one of the fields we used in our relationship is a primary key (because it’s set to auto-enter a serial number) while the other field is a foreign key (because it does not have any auto-enter options set). This means that we could have many Products linked to a single Publisher record, which is what the three lines mean. The equal sign means that the relationship is established only when the fields match exactly. Other kinds of relationships, using inequalities such as greater than or less than, are also possible, but the default of “equals” is what we want for both of our relationships.
Congratulations! We’ve finished the design of our database and can now define how the database will look to users. Click the OK button to save your changes.
Creating the Interface
FileMaker presents data to users on layouts, each layout being assigned to a single table item. Because we created three tables, FileMaker has created three layouts, named appropriately enough after the table items they point to. FileMaker has also placed all of the fields in each table on the layout. We’ll keep this default setup, but we are going to change the behavior of the fields a bit.
When we are working with Products, we will want to be able to easily assign a Publisher to a Product by selecting the Publisher from a menu. Near the top left of the window for our database is a Layout pop-up menu. Choose Products from this menu and then choose “View ‣ Layout Mode” or press Command-L. We are moving from Browse mode, in which we edit the data within the database, to Layout mode, in which we alter the look of the database.
Click on the PublisherID field on the layout. The PublisherID field is to the right of the PublisherID label and will probably appear in a larger font than the label. Choose “Format ‣ Field Format” and you should see the Field Format dialog box. (If “Format ‣ Field Format” is disabled in the menu, then you have probably selected the PublisherID label rather than the field). Change “Format field as” from “Edit Box” to “Pop-up List.” For “Display values from” select “Define Value Lists” and click the “New” button. Enter Publishers for the value list name and click the radio button for “Use values from field.” In the Specify Fields for Value List dialog box, choose Publishers from the “Use values from first field” pop-up menu, and select the PublisherID field.
Click the check box for “Also display values from second field,” make sure Publishers appears in the menu below the checkbox, and select the PublisherName field. Save your changes by clicking the OK button in each of the dialog boxes until you’ve exited all of them and have returned the the layout.
Select SerialNumbers from the Layout pop-up menu. If you haven’t turned the confirmations off, you’ll see a dialog asking if you wish to save your changes to the layout. Click Save and click the “Save layout changes automatically (do not ask)” checkbox if you’d like to avoid these confirmations in the future.
Entering Data
We are now ready to create records and link records in one table to those in another table. Choose “View ‣ Browse Mode” or type Command-B to return to Browse mode. Use the Layout pop-up menu in the tool bar to view the Publishers layout. Choose “Records ‣ New Record” or press Command-N to create a new Publisher record. Notice that the PublisherID has been filled in with a value of 1, just as we defined it to do when we defined the database structure. Also notice that if you try to edit this field, you’ll be informed that it is not modifiable.
Click in the PublisherName field (to the right of the PublisherName label) and enter “Apple Computer,” press tab to move to the WebAddress field and enter “http://www.apple.com.” Create a few more Publisher records, perhaps three or four total. Notice that each time you create a record the PublisherID is incremented by 1.
Move to the Products layout and create a record in that table. Tab to the ProductName field and enter “QuickTime Pro.” Tab again, this time to the PublisherID field. Notice that a menu appears where you can select which publisher this product belongs to. Select the menu item with Apple Computer in it, and you’ll see that the number 1 is entered into the PublisherID field (because Apple Computer was the first record we created). Go ahead and create a few more products before moving onto the SerialNumbers layout and creating some serial numbers for your software and using the pop-up menu in the ProductID field to assign each serial number to a product.
Viewing Related Data
I’m sure you noticed a major deficiency in our layouts. Although we can assign a publisher to a product and a product to a serial number, we can’t see who the publisher is or what the product is. Let’s correct this.
Return to the Products layout and enter Layout mode. In the toolbar on the left you’ll see a group of buttons, one of which is labeled Field. Click and drag this button onto your layout just below the PublisherID field. As soon as you let go of the mouse button, a Specify Field dialog will appear. From the menu at the top of the dialog, select the Publishers table, then select the PublisherName field and make sure the “Create field label” checkbox is checked. Click OK.
Resize the field by dragging the black handle in at one of the right side corners so that it’s about the same size as the PublisherID field. Return to Browse mode and you should see the name of the publisher that corresponds to the ID you chose in the PublisherID field.
Repeat the above steps for the SerialNumbers layout, this time adding the ProductName field from the Products table item. If you recall, when we defined the relationships, we created a relationship from SerialNumbers to Products and from Products to Publishers, so we have a “grandparent” relationship from SerialNumbers to Publishers. Use the same technique outlined above to add the PublisherName field from the Publishers table item to the SerialNumbers layout. Create a few more serial number records and see how once you select the ProductID, both the ProductName and the PublisherName will be automatically displayed for you.
Let’s move to the other end of the relationship hierarchy. Move to the Publishers layout and enter Layout mode. Just above the Field button that we used to add a field to a layout is another group of buttons. The bottom row of these buttons contains two tools, one that looks like a button with a hand over it and the other that looks like a group of three horizontal bars. Select this second tool, which is the portal creation tool.
Remember that many products can be linked to a single publisher and many serial numbers can be linked to a single product. However, only one publisher can be linked to a product and only one product can be linked to a serial number. When viewing related publisher information from the products table, a single field is sufficient, but when viewing related product information from the publisher table, we want to be able to see multiple records. This is where a portal is used. A portal allows us to view multiple related records on a layout.
After you’ve selected the portal creation tool, click and drag in the layout to define the boundaries of the portal. As soon as you let go of the mouse button, the Portal Setup dialog box will appear. We are in the Publishers table and want to view information in the Products table, so choose Products from the “Show related records from” menu, click the “Show vertical scroll bar” checkbox in the Portal Setup dialog, and click OK. You’ll then be presented with an “Add Fields to Portal” dialog. We only need a single field in this case, so click the ProductName field and click the Move button, followed by the OK button.
Return to browse mode and you should see all the products that have been linked to the current publisher. (You can use the book buttons in the toolbar to move from one record to another.) Perform similar steps to show the related serial number records on the Products layout.
So, what’s the purpose of all of these relationships, related fields, and portals? Remember, part of the reason is to eliminate duplicate data entry. If we own many products from a publisher, we don’t want to enter that publisher’s name many times. Also, if we need to change something about the publisher, we don’t want to have to go to every product record and change it many times. For instance, I entered “FileMaker” as a publisher, but the name of the company is actually “FileMaker, Inc.” Because we only entered the publisher’s name once within the Publishers table, I can change the name there and the new information will flow down to the products and serial numbers tables.
Generating SQL Lite
Looking for a SQL Server script generation tool? Look no more - whether you need to generate the script for a given object like a table, a view, a stored procedure etc. or you need to generate the script for the whole database you can do that with a click - both xSQL Object and xSQL Data Compare allow you to script individual objects or script the whole database.
How do I generate the script I need?
Once you have added the databases you want to the workspace simply right click on the object you want or on the name of the database itself, choose whether you want to see the script on a new window, save it to a file or directly on the clipboard and then lastly choose whether you want to script the schema of the object, the data (if applicable) or both schema and data (view screenshot). A range of scripting options allow you to customize the way the script is generated.
Is this expensive?
NO! You may not have to pay a single dime for this - xSQL Bundle which includes both xSQL Object and xSQL Data Compare is completely free for SQL Server Express and comes in a free Lite Edition for other editions of SQL Server.
What SQL Server Versions does it support?
SQL Server 2005 and SQL Server 2000 are supported by xSQL Object and xSQL Data Compare.
Where do I go next?
Learn more about:
xSQL Object
xSQL Data Compare
Download the xSQL Bundle here.
Monday, August 11, 2008
CSC AS I SEE IT NOW 008
MySQL is a relational database management system (RDBMS) which has more than 11 million installations. The program runs as a server providing multi-user access to a number of databases.
This is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now a subsidiary of Sun Microsystems, which holds the copyright to most of the codebase. The project's source code is available under terms of the GNU General Public License, as well as under a variety of proprietary agreements.
"MySQL" is officially pronounced /maɪˌɛskjuːˈɛl/[4] (My S Q L), not "My sequel" /maɪˈsiːkwəl/. This adheres to the official ANSI pronunciation; SEQUEL was an earlier IBM database language, a predecessor to the SQL language.[5] The company does not take issue with the pronunciation "My sequel" or other local variations.
MySQL is popular for web applications and acts as the database component of the LAMP, BAMP, MAMP, and WAMP platforms (Linux/BSD/Mac/Windows-Apache-MySQL-PHP/Perl/Python), and for open-source bug tracking tools like Bugzilla. Its popularity for use with web applications is closely tied to the popularity of PHP and Ruby on Rails, which are often combined with MySQL. PHP and MySQL are essential components for running popular content management systems such as Drupal, e107, Joomla!, WordPress and some BitTorrent trackers. Wikipedia runs on MediaWiki software, which is written in PHP and uses a MySQL database.
Wednesday, July 16, 2008
CSC AS I SEE IT NOW 007
Just like real world folders, folders on your hard drive store files. These files can be documents, programs, scripts, libraries, and any other kind of computer file you can think of. Folders can also store other folders, which may store more files or other folders, and so on.
Folders allow people to organize their files in a way that makes sense to them. For example, a college student might store all her photos in a folder named "Pictures," all her papers in a folder named "School Work," and all her financial information (including the tens of thousands of dollars in student loans) in a folder named "Finances." All these folders might reside within a folder called "My Documents."
The computer's operating system also uses folders to store data such as system files, library files, and user preferences. While
File
A text file is like a word processor file except there is no formatting in it.open windows notepad. Type some text and save it as file.txtthat is a text file.images, html, software etc are other types of text files. The 3 character extension on the end of the filename tells your computer what type of file it is and how to execute it or what other program to display it .While
Records
(1) In database management systems, a complete set of information. Records are composed of fields, each of which contains one item of information. A set of records constitutes a file. For example, a personnel file might contain records that have three fields: a name field, an address field, and a phone number field.
In relational database management systems, records are called tuples.
(2) Some programming languages allow you to define a special data structure called a record. Generally, a record is a combination of other data objects. For example, a record might contain three integers, a floating-point number, and a character string. While
Data Field
A data dictionary, as defined in the IBM Dictionary of Computing is a "centralized repository of information about data such as meaning, relationships to other data, origin, usage, and format."[1] The term may have one of several closely related meanings pertaining to databases and database management systems (DBMS):
a document describing a database or collection of databases
an integral component of a DBMS that is required to determine its structure
a piece of middleware that extends or supplants the native data dictionary of a DBMS
Sunday, July 13, 2008
CSC AS I SEE IT NOW 006
Hierarchical
This is a tree structured model for a database. It requires that the application knows about the physical relationships between entities. The structure is rigid. IMS is a hierarchical database.
Network
An extension of the tree into a lattice so that multiple relationships can be supported. The CODASYL standard defines features for network databases. This model is inflexible, requiring significant changes if relationships change. IDMS is a network database.
Relational
This model is based on relational algebra and encompasses the rules developed by Codd. Most of the databases in commercial use now are relational, e.g., Sybase, Oracle, Ingres. The model is flexible and extensible.
Object
Object databases address the need to store more complex data types than are supported by the relational model.
Basic Characteristics of Database Management Systems
Databases are fundamentally a place for storage of data or objects relevant to a business. Database management systems provide storage and facilities for backup and restore as well as query capabilities. Distributed databases pose additional challenges in design. Database management systems provide mechanisms to address the issues in distributing data, however, their implementation and use within a system must be designed.
In general, a database management system must provide the following facilities.
Storage
PERSISTENCE
The fundamental purpose of a database is to provide persistent storage for data or objects.
ODBMS Strategies
The challenge for ODBMS persistent storage is the handling of arbitrarily large objects defined in terms of arbitrary types. Issues of storage management and database sizing arise. Also, the DBMS must handle the issue of an object's identity since this provides an access path to the object.
Identity
One of the key concepts in object-orientation is that an object has an identity. The RDBMS strategy for identification is by the value of some of the attributes, that is, the primary key. An object can be identified by this strategy, but commonly there is an identity independent of the value of attributes. Taken to the most general case, the concept of identity outside of attribute value would mean that the integer, 5, (the instance "5" within the class Integer) would have an identifier in addition to its attribute value of 5. Typically, an ODBMS defines base classes, e.g., Integer, whose instances are identified by their values alone.
Outside of the base classes, objects can be identified by:
Indirection
Objects can be identified by indirection (pointers) through a memory resident table or through an index for objects in secondary storage.
The trade-off between addressing and indirection is that of ease of use and flexibility of object movement versus the overhead in accessing components of objects.
Making an Object Persistent
Since an object is part of a class hierarchy structure, there are different strategies for defining it as persistent.
· Persistent Class
Any instance defined as a member of a class that is defined as persistent, is persistent.
· Persistent Instances
An instance must be declared as persistent itself. The application can place persistent objects in classes.
· Persistent through Reachability
A fundamental class is declared as persistent and anything that can be addressed from that class is also persistent.
RDBMS Strategies
Data in an RDBMS is defined in terms of basic types, e.g., character, integer, long integer. These fields are combined into tables with access through indices, i.e., keys. There is some limited support for user defined types and many RDBMSs provide limited support for other data through BLOBs.
Monday, July 7, 2008
CSC AS I SEE IT NOW 005
1. File.Transfer JAVA File Upload\Download Client - AhsiaSoft LLC File.Transfer JAVA™ is the answer. With advanced features, such as Drag-n-Drop file Upload, file management of client files, file compression, file limits such as size, type, location, restart of interrupted downloads, multiple file downloads, directory uploads, download failure detection, and industry standard data compression, it's no wonder that companies like Associated Press , Xerox, Disney, and Pepsi chose Ahsiasoft tools to aid their development efforts.
Publisher's Website: http://www.ahsiasoft.com/
2. Java Performance Validator - Software Verification Ltd Java Performance Validator allows you to identify code hotspots and bottlenecks in your application. There are six instrumentation methods and a sampling profiler for high speed, low overhead sampling. Displays include a realtime callstack, call graph, call tree, statistics, relations, integrated source code display and line timing statistics. Java Performance Validator also provides data HTML and XML export..
Publisher's Website: www.softwareverify.com
3. NetAdvantage for JSF - Infragistics NetAdvantage for JSF is a set of rich, easily-styled AJAX Web UI components. The components include tree, grid, menu, tab, and numerous input controls. The core of our framework is AJAX-enabled and UI element-based for styling simplicity. We provide you with the ability to quickly and easily deliver that polished, professional look and feel your users expect from a world-class application.
Publisher's Website: www.infragistics.com
4. Document Converter Suite - Amyuni Technologies Inc Amyuni’s new Document Converter gives you more document conversion power in a more streamlined product. Our flagship PDF Converter technology has been applied to RTF, HTML, Excel and JPEG formats and integrated them in one global Amyuni printer driver. The Suite is completely customizable. PDF, RTF, HTML, Excel and JPEG formats are modules contained in one global printer driver. You can buy only the modules you need.
Publisher's Website: www.amyuni.com
5. Visual Java/SWING Components Library - Eltima Software GmbH Eltima Java Components will greatly extend the set of components available in standard visual library, bringing a whole lot of new ways to present your creativity to your customers and clients. Make your software look different! No routine coding – utilize your resources wisely! Based on standard components, this collection supports all Java Look and Feel such as Windows, Motif, Macintosh, etc, and adds new styles to your software, buttons, color dialogs, search fields, and more.
Publisher's Website: www.eltima.com
6. Java Memory Validator - Software Verification Ltd Java Memory Validator is a memory analysis and heap inspection tool for detecting memory leaks in Java applications. Java Memory Validator allows you to analyse the allocations by allocation location, object type, object generation, allocation hotspot view, heap dump, leaked memory and virtual memory view. The heap dump also allows you to query the path to root and paths from root for any object in the heap dump. Poweful HTML/XML export and watermarking functions are also provided.
Publisher's Website: www.softwareverify.com
7. 2D / 3D Line Graph - Sirius Computer Consultants Limited The 2D / 3D Line Graph provides both a client and server side solution for the incorporation of line graphs and charts into web pages. It provides versatile components so that web authors and Java developers can easily build and publish dynamic and interactive line charts.
Publisher's Website: www.jpowered.com
8. edtFTPj - Enterprise Distributed Technologies edtFTPj is the first choice of Java developers worldwide for incorporating FTP functionality into their applications. edtFTPj is Open Source, licensed under the LGPL, the GNU Lesser General Public License. This means you can freely embed edtFTPj into your commercial Java applications, subject to the normal LGPL restrictions. Unrestricted (non-GPL) source licenses can be also be purchased.
Publisher's Website: www.enterprisedt.com/index.html
9. JGraph - JGraph Ltd JGraph is the most powerful, lightweight, feature-rich, and thoroughly documented open-source graph component available for Java. It is accompanied by JGraphpad, the first free diagram editor for Java that offers XML, Drag and Drop and much more!
Publisher's Website: http://www.jgraph.com
10. Database Workbench Pro - Upscene Productions Database Workbench Pro is a multi-DBMS developer tool that includes many feature like Diagramming Tools, Test Data Generator, Two-Way Visual Query Builder, Stored Code Debugger, SQL Insight, Parameter Insight, Cross DBMS Migration Tool, Cross DBMS Compare Tool, Visual Object Editors, Metadata Printing and much more.
Publisher's Website: www.upscene.com
“HOW DBMS HANDLE OR ACCOMMODATE DATA INPUT”
ABSTRACT
The recent advances in database technology have enabled the development of a new
generation of spatial databases, where the DBMS is able to manage spatial and non-spatial
data types together. Most spatial databases can deal with vector geometries (e.g., polygons,
lines and points), but have limited facilities for handling image data. However, the widespread
availability of high-resolution remote sensing images has improved considerably the
application of images to environmental monitoring and urban management. Therefore, it is
increasingly important to build databases capable of dealing with images together with other
spatial and non-spatial data types. With this motivation, this paper describes a solution for
efficient handling of large image data sets in a standard object-relational database management
system. By means of adequate indexing, compression and retrieval techniques, satisfactory
performances can be achieved using a standard DBMS, even for very large satellite images.
This work is part of the development of the TerraLib library, which aims to provide a
comprehensive environment for the development of GIS applications.
1 Introduction
The recent technological advances in database
technology are providing the support for major
advances in non-conventional database
applications. In the area of geographical
information systems (GIS), database technology
has enabled the complete integration of spatial
data types in object-relational data base
management systems, creating a new generation
of spatial databases (Shekhar, Chawla et al.
1999). This integration is bound to change
completely the development of GIS technology,
enabling a transition from the monolithic
systems of today (that contain hundreds of
functions) to a generation of spatial information
appliances, small systems tailored to specific
user needs (Egenhofer 1999). Three major
challenges in spatial database construction are:
(a) the efficient handling of spatial data types,
which include both vector (i.e., polygons, lines
and points) and raster data structures; (b) the
availability of tools for query and manipulation
of spatial data; (c) the support for advanced
applications, such as mobile GIS, spatiotemporal
data models(Hornsby and Egenhofer
2000), geographical ontologies, (Fonseca,
Egenhofer et al. 2002)and dynamic modelling
and cellular automata (Couclelis 1997).
One area of special interest is the efficient
handling of raster data, especially satellite images.
Remotely sensed imagery is one of the most
pervasive sources of spatial data currently
available to researchers who are interested in
large-scale geographic phenomena. The variety of
spatial and spectral resolutions for remote sensing
images is large, ranging from IKONOS 1-meter
panchromatic images to the polarimetric radar
images soon to be part of the next generation of
RADARSAT and JERS satellites. Recent
advances in remote sensing technology, with the
deployment of a new generation of sensors, have
improved considerably such application areas as
environmental monitoring and urban
management.
The construction of spatial databases that
handle raster data types has been studied in the
database literature and the main approach taken
has been to develop specialized data servers, as in
the case of PARADISE (Patel, Yu et al. 1997)and
RASDAMAN. (Reiner, Hahn et al. 2002)The
chief advantage of this approach is the capacity of
performance improvements, especially in the case
of large image databases. The main drawback of
this approach is the need for a specialized, nonstandard
server, which would greatly increase the
management needs for most GIS applications.
Therefore, the approach taken by the authors was
to include raster data management into objectrelational
database management systems. We
consider that, by means of adequate indexing,
compression and retrieval techniques,
satisfactory performances can be achieved using
a standard DBMS, even for very large satellite
images. This work is part of the development of
the TerraLib library, which aims to provide a
comprehensive environment for the
development of GIS applications(Câmara,
Souza et al. 2000).
With this motivation, this work describes
the conception and implementation of the image
data handling facilities in TerraLib. These
facilities include: (a) efficient storage and
indexing; (b) decoders for the different image
data formats; (c) basic data manipulation
functions; (d) iterators to provide a convenient
way of accessing the image data and developing
image processing algorithms. These facilities
are supported in different DBMS, including
ORACLE, PostgreSQL, mySQL and Access,
therefore allowing easy interface with existing
user environments.
2 The Raster Data Type in TerraLib
Images in TerraLib are handled by a generic
raster data type and are usually associated to a
cartographical projection and may be multidimensional,
e.g., the different spectral bands of
a remote sensing image. Images are usually
associated to different file formats, such as TIFF
and JPEG, and may refer to different
representations: (a) a synthetic image that has
an associated look-up table, where the pixel
value is associated to an RGB triple; (b) a multiband
image; (c) an image which is associated to
a categorical coverage; (d) an image where each
pixel has an ID of a unique spatial object. We
have defined three basic classes in TerraLib:
· A generic raster data structure
(TeRaster).
· A class that stores the metadata about a
raster data set (TeRasterParams),
including: image type, number of lines,
columns, and dimensions, resolution,
bounding box, cartographical
projection, rotation and skew
parameters, and compression technique
used.
· A class that handles different data
formats, including storage in a DBMS
(TeDecoder).
The two basic functions available to the
TeRaster class
“THE OTHER THING CAN A DBMS SOFTWARE DO WITH DATA”
This book teaches you how to use Structured Query Language, or SQL, which is a computer language used to define and manipulate databases. A database is a set of computer files for storing information that's used by a business or other organization. A typical business might keep information about customers and their orders, suppliers of materials, and employees who work for the company. Storing this type of information in computer files enables easy retrieval and updating as well as flexible analysis of the raw data to produce management reports, such as sales trends or average employee-benefit costs.
Of course, how "easy" and "flexible" it is to work with the data is determined largely by how well the database has been set up and by the capabilities of the database management system (DBMS), which provides the software to store and update database contents. In this chapter, we look at the building blocks of DB2 Universal Database for AS/400, or UDB/400, the DBMS that runs on IBM AS/400 computer systems. In subsequent chapters, we'll explore how to use SQL to create and manipulate a UDB/400 database.
UDB/400 is an integrated part of OS/400, the AS/400's operating system1, which means that you don't have to buy UDB/400 as a separate software product and that any AS/400 application you write can take advantage of UDB/400 features. UDB/400 is also the only relational DBMS that runs on the AS/400.2
Figure 1.1 shows a simplified view of how UDB/400 fits into the AS/400 architecture.
As you can see, UDB/400 provides a DBMS layer that all high-level language (HLL) programs (i.e., RPG IV, Cobol, C/C++, and Java) use to access application data stored in UDB/400 files. You can also see that all utilities and remote applications — for example, a Java applet running in a Web browser and using Java Database Connectivity (JDBC) or a Windows application running on a PC and using Open Database Connectivity (ODBC) — must go through UDB/400 to access the AS/400 database. This integrated, uniform interface provides a high degree of consistency and control for AS/400 application developers.
If you're familiar with other operating systems and DBMS products, you'll find that UDB/400 has features of both conventional operating systems' file-management facilities and relational DBMS products. For example, like a conventional file-management facility, UDB/400 lets you use built-in HLL input/output (I/O) operations, such as Cobol's Read and Write verbs, to access data. Like other relational DBMS products, UDB/400 lets you access the same data using SQL. This "dual" nature of UDB/400 is even expressed in the nomenclature: UDB/400 documentation for conventional file access uses the terms "file," "record," and "field," while documentation for SQL access uses the comparable terms "table," "record," and "column," respectively.
In this chapter, we look briefly at both sides of UDB/400, considering it as a conventional file system and as an SQL-based relational DBMS. The remainder of the book concentrates on just the SQL perspective. At the end of this chapter, you'll find a list of additional resources you can use to learn more about other aspects of UDB/400.
The AS/400 Integrated File System (IFS)
The UDB/400 database is arguably the most important and widely used way to store data on an AS/400, but it's not the only way. Everything stored on an AS/400 is stored in the AS/400's integrated file system (IFS). The IFS is organized as a hierarchical directory structure that includes 11 distinct file systems, as depicted in Figure 1.2.
One of these file systems, QSYS.LIB, contains record-structured files managed by UDB/400, as well as other types of OS/400 objects. These record-structured files can contain text, numeric, and other forms of data and can be read and updated by HLL programs and SQL. As a shorthand, we use the term "QSys files" to mean those database files in file system QSYS.LIB. Creating and manipulating QSys files with SQL is the main focus of this book.
The "root" file system in the IFS provides a Windows-like directory structure for stream files — that is, files that contain a sequence (or stream) of bytes that aren't organized by the operating system into separate records, as the bytes in QSys files are. Like QSys files, stream files can contain text or numeric data, but stream files are not the main database files used by UDB/400.
Files in the root file system and some of the other non-QSYS.LIB file systems can be accessed by PCs and other computers connected to the AS/400; for the most part, these files have specialized purposes not directly related to UDB/400. As you'll see in Chapter 3, however, UDB/400 files can reference the contents of files in the non-QSYS.LIB file systems3, typically for image files and other types of data managed by non-AS/400 applications. You can learn more about the IFS and its file systems by consulting the resources listed at the end of this chapter.
OS/400 Objects, Libraries, and User Profiles
Because UDB/400 is an integral part of OS/400, it helps to have a general understanding of how OS/400 is organized and where UDB/400 fits in. Everything in the OS/400 operating system, including the database, is organized as objects. OS/400 identifies more than 80 types of objects that can be stored in the QSYS.LIB file system, including libraries, programs, database files, display and printer files, user profiles, message queues, SQL packages, and so forth.4 OS/400 also has a few object types for files outside the QSYS.LIB file system, but these object types aren't of central importance in developing typical AS/400 business applications. In the following discussion, we concentrate just on QSYS.LIB objects and, most important, on database files, which are what most AS/400 applications use.
Like other operating systems (e.g., Unix), OS/400 stores program instructions, application data, and other system components on disk, loading them into main memory as needed. But, unlike most other operating systems, OS/400 doesn't let you get at the bytes on disk or in memory directly. Instead, you must always use specific commands or other system interfaces that are valid for each type of object. For example, you can't execute a database file or perform a file-update operation on a program object.5 The system prevents any attempt to use an invalid operation on an object altogether rather than let it proceed and possibly cause damage or produce undesirable results. This protection is uniform across all AS/400 operations, including user commands, application code, and operating-system operations. Object encapsulation is so integral to the AS/400 that there are no "back doors" that a system programmer can use to subvert the integrity of an OS/400 object.6 As we progress through UDB/400's capabilities, you'll learn about various types of OS/400 objects and the way to use them.
Wednesday, July 2, 2008
CSC AS I SEE IT NOW 004
System
System is an approach to understanding the behaviour of complex systems over time. It deals with internal feedback loops and time delays that affect the behaviour of the entire system.[1] What makes using system dynamics different from other approaches to studying complex systems is the use of feedback loops and stocks and flows. These elements help describe how even seemingly simple systems display baffling nonlinearity. While
Management
Management in simple terms means the act of getting people together to accomplish desired goals. Management comprises planning, organizing, resourcing, leading or directing, and controlling an organization (a group of one or more people or entities) or effort for the purpose of accomplishing a goal. Resourcing encompasses the deployment and manipulation of human resources, financial resources, technological resources, and natural resources.
Management can also refer to the person or people who perform the act(s) of management
Data
.
Data (singular: datum) refer to a collection of natural phenomena descriptors including the results of experience, observation or experiment, or a set of premises. This may consist of numbers, words, or images, particularly as measurements or observations of a set of variables. While
Database
This article is principally about managing and structuring the collections of data held on computers. For a fuller discussion of DBMS software, see Database management system.
A database is a structured collection of records or data. A computer database relies upon software to organize the storage of data. The software models the database structure in what are known as database models. The model in most common use today is the relational model. Other models such as the hierarchical model and the network model use a more explicit representation of relationships (see below for explanation of the various database models).
Database management systems (DBMS) are the software used to organize and maintain the database. These are categorized according to the database model that they support.
The model tends to determine the query languages that are available to access the database. A great deal of the internal engineering of a DBMS, however, is independent of the data model, and is concerned with managing factors such as performance, concurrency, integrity, and recovery from hardware failures. In these areas there are large differences between products.
Saturday, June 28, 2008
CSC AS I SEE IT NOW 003
The word data is the plural of Latin datum, neuter past participle of dare, "to give", hence "something given". The past participle of "to give" has been used for millennia, in the sense of a statement accepted at face value; one of the works of Euclid, circa 300 BC, was the Dedomena (in Latin, Data).While
DATA TYPE
In computing, an abstract data type (ADT) is a specification of a set of data and the set of operations that can be performed on the data. Such a data type is abstract in the sense that it is independent of various concrete implementations. While
DATA STRUCTURE
In computer science, a data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure will allow the most efficient algorithm to be used.Unlike
DBMS”
As one of the oldest components associated with computers, the database management system, or DBMS, is a computer software program that is designed as the means of managing all databases that are currently installed on a system hard drive or network.