Improved Java Environment

for Multimedia Databases

 

Dan L. Lacrămă, Assoc. Prof., Ph. D. Eng.,

Tiberiu M. Karnyanszky, Assoc. Prof., Ph. D. Eng.,

Faculty of Computers and Applied Computer Science

“Tibiscus” University of Timisoara, Romania

 


Abstract

This paper is focused on the use of a Java application in order to access data from a MySQL Multimedia Database. The problem of implementing a management system for a multimedia database is not trivial because the environment must be able to deal with the complex data formats for sounds and images. The program is elaborated not only as an example, but also as a versatile tool able to be adapted to various practical situations in a quick and simple way. The authors also present the advantages of employing this Java Interface solution both for the programmers and for the multimedia database users.

 

Keywords Multimedia Databases, Java

 

I. MULTIMEDIA DATABASES

The use of Multimedia Databases is one of the most dynamic fields of research and activity in the programmers’ world nowadays. This intense activity is caused by two main reasons:

·        Multimedia databases is a useful solution employed in order to solve a very large range of practical applications from electronic commerce to modern teaching;

·        There is no standard solution for dealing with the large amount of text, audio and video data involved in most of the multimedia applications.

A Multimedia Database contains a complex collection of data consisting of fields with texts, still pictures, slide shows, audio files, video files and various combinations of these items. Each record inside the database could have some or all this kind of data and whenever accessed by a client all this fields must be available quick and secure.

Working with multimedia records is usually much more complex than with the classic records (e.g. character, number, date). It is necessary to establish an integrated environment able to display in separate windows on the screen: large amounts of text, still pictures, various video clips and of course audio clips have also to be played.

The problems become even more complex in cases when the database must be accessible from the Internet and consequently huge data blocks have to be transferred from the server to the clients through the multiple shared communication channels in a reasonable short time. In such cases it is also very important to provide for all clients integrated environments, as the one described above, suitable different platforms.

This compatibility problem can be solved in two separate ways:

·        Creation of separate applications functioning similarly, but adapted for each computer platform (Windows PC, Sun Solaris, Unix, IBM main frames a.s.o.);

·        Creation of a platform independently integrated environment in Java able to solve both the function of acquiring data and “play” it on various clients’ computers.

Designing and implementing individual programs for each platform is usually the best way to ensure the achievement of the best performances both in quality and in speed, but it is an extensive money and time consuming solution. This can be done by large software producers when they implement standard applications with an estimated large market audience but it is inaccessible for small software firms or individual programmers working to put into operation a small business on the Internet or an entertainment/educative application for a small budget beneficiary.

This second situation which is the most often in practice must be dealt with the Java programming solution which is also an independent platform able to solve both accessing the database and “play” the resulted response in one or more windows on screen.

 

II. THE JAVA INTEGRATED ENVIRONMENT

One important asset of the Java solution is the fact that it enables the programmer to implement both the connection module and the multimedia players in the same programming language and consequently a robust integrated environment results. Of course, it appears easier to use .bat files to start standard display programs for showing texts, pictures and video clips, but the main application has no direct control over them and this could lead to troubles.

The authors propose an integrated Java environment containing a set of interacting modules able to interact as shown in Figure 2.1. in order to ensure all needed facilities for the Multimedia Database client.

 

                  

 

 

 

 

 

 

Figure 2.1. Java integrated environment’s modules

 

The most important program blocks are:

·        The Command module is the supervisor of all actions and data transfers inside the application including the transactions with the database. It receives through the GUI the operator’s commands, verifies their correctness and distributes punctual tasks to all the other modules in order to execute them.

·        The Connection module is the one in charge of executing the transactions with the Database. In most Multimedia applications only Select sentences are involved, but in some cases Updates are also available for special users (e.g. members of the staff). The j2sdk 1.4.1.2 and other standard kits do not include any packages for accessing a MySQL database, but there is a plug-in called “mysql-connector-java” available on the Internet at www.mysql.com/Downloads/Conector_J. It provides all the classes needed to execute the connection to a MySQL database and the SELECT or UPDATE sentences. Their use for implementing a standard client’s application is reasonable simple.

·        The Graphical User Interfaces consist of a set of windows implemented to carry out the bidirectional communication with the human operator. First on the screen is the “Select” dialog frame where the client choose the database records he is interested in. His choice is translated into SQL by the Command module and sent to the database through the Connection module. If any mistake is detected an Error message is displayed in an error dialog frame. After the database answer the specialized “players” display the multimedia dates:

-Texts are shown in a window with a vertical glider in order to give the up-down mobility to the reader.

-Still pictures are displayed in a rescalable window. If one record contains more pictures a slide show is build up with them.

-Video and audio clips are played with a Java media player one at a time in the order of their ID in the database.

If any of those above is missing from a record its correspondent displayer is not opened.

More sophisticated Graphical User Interfaces can be employed for large applications, but the programmers must always keep in mind to avoid useless complications in order to avoid clients’ manipulation errors. In our opinion, based on our past experience, it is better to give to the unaccustomed users a list of straightforward options than providing them a highly elaborated Dialog frame with lots of text fields, check boxes and buttons.

The Multimedia Database is made up of four tables:

·        ITEMS table contains the ID_item (primary key) and the main defining properties of each record. For example in a car database these properties are: name, price and model launching date;

·        TEXT table include the ID_text (primary key), the name of the text file and the ID_item as the foreign key which links this table to the Items one. A single item can have, none, one or more description texts which are all displayed in a text pad window;

·        PICTURE table consists of the ID_picture (primary key), the name of the still picture file (jpg) and the ID_item as link to the Items table. In our demo there are usually a set of 3 to 5 pictures for every car model and consequently in the display window a slide show is made up with them.

·        AUDIO table contains the ID_audio (primary key), the name of the audio clip file and the ID_item as link to the Items table. We included in our demo some audio files which were played along with the slide show when no video clip was available.

·        VIDEO table holds the ID_video (primary key), the name of the video clip file and the ID_item as link to the Items table. The item corresponding video file is played in loop mode whenever the selected record includes such a file.

The relational database map is shown in the Figure 2.2:

 

 

ID_item

Name

Price

Launch_date

 

 

 

ID_text

Name_text

ID_item

 

ID_pict

Name_pict

ID_item

 

 

ID_audio

Name_audio

ID_item

 

 

 

ID_video

Name_video

ID_item

ID_audio = Primary key

ID_item = Foreign key

Figure 2.2. The Multimedia Database

 

We have implemented this searching mechanism for a database that contains information on the popular culture in Făget area, Timiş district. The reason of such a practical application is that the popular culture, as a socio-economic phenomenon, has always undergone a continuous transformation, which today could more than ever wipe off the features that are characteristic to our people. There is likely that the material and spiritual values might be lost. Yet, they represent the valuable proof of the unitary fundament and the continuity of the Romanian nation, of its unitary, complex evolution in the Carpathian-Danubian-Pontic area.

The local ethnographical research has emphasized important aspects of the material and spiritual culture in the investigated area, aspects that may or may not belong to other domains and that can give an answer to many problems concerning the ethno-genesis, the permanence and development of the spiritual culture.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Figure 2.3. The application set of display windows


The knowledge in this domain will efficiently contribute to the aesthetic education of the young generation, to their bound to their own country, to its history and art, as a fundamental principle of any national culture. Using the Internet increases the possibility to make known the information on the geographical, multicultural and spiritual beauty for one of the oldest part of Romania where so many traditions have been preserved. This is an invitation for the people who are fond of art, culture and folklore to search for more information on our popular culture by using the friendly audio-visual media.

The application displays all the above data (if available in the selected record) in a set of different windows as shown in Figure 2.3.

 

III. CONCLUSIONS

The Java integrated environment is a suitable solution for a large range of applications involving the use of complex multimedia databases. It assures both the execution of the SQL transactions and the display of multimedia data in separate windows on the screen according to their specific format.

If the multimedia database is big and a lot of text, picture, audio and video files are involved, a separate mechanism for their name coding becomes necessary. This additional program must give standard names to the multimedia files in order to ensure a certain correlation among the different fields of the same record. A certain solution will make easier for the database administrator to include new items or to augment the content of the existing ones.

 

REFERENCES

[1] M.-C. Chan, W.-S. Griffith, F.-A. Iasi, 1001 de secrete Java, Ed. Teora, Bucureşti, 2000

[2] L.-D. Lacrămă, Programarea orientată pe obiecte, Ed. Helicon, Timişoara, 1999

[3] L. Lemay, R. Cadenhead, Java 2 fără profesor, Ed. Teora, Bucureşti, 2001

[4] S. Lalani, K. Jamsa, Java – Biblioteca programatorului, Ed. All, Timişoara, 1997

[5] P. Norton, W. Stanek, Limbajul Java, Ed. Teora, Bucureşti, 1997