Solved

standalone java database programme from cd..

Posted on 2001-06-15
11
172 Views
Last Modified: 2010-03-31
hi experts out there ^_^,

I am new in java, i would like to know whether it is possible to write a db program that involves ms access database, this application has to be burn in to a cd...
(this is an e-catalog cd)... no installation is to be done on the user computer. the cd are suppose to be autorun when inserted. data have to be display in a datagrid form and a search module can be implemeted as well. hope u guys can help. remember, i can't set the odbc, because it is a cd from distribution. ^_^  

no data are suppose to be stored in the user computer..

if possible please explain

regards
kahwoo

0
Comment
Question by:kahwoo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 9

Accepted Solution

by:
Ovi earned 25 total points
ID: 6194981
Is possible but you must do the following :

1. burn on your cd a JRE too
2. use instead of Access an portable database system which doesn't use odbc, but an java driver (search at www.google.com for InstantDB for example).
3. create your ini file

0
 
LVL 6

Assisted Solution

by:dorothy2
dorothy2 earned 25 total points
ID: 6195116
This is certainly possible as Ovi indicates, however I think this will be a challenge for someone "new to Java". There are a lot of parts of Java you will need to understand - Swing, JDBC, Java deployment, etc. If your requirements force you to use Access, then you're not really worried about platform portability. Why Java then?

How many products are in the catalog? If small, have you thought about using XML?

What happens when the catalog gets new products? Are you going to burn and ship new CDs?

I'm not trying to give you a hard time, but there are some design decisions you might be able to make which would simplify your coding and cut your development time.

Good luck,

Dorothy
0
 
LVL 2

Author Comment

by:kahwoo
ID: 6202177
thank guys

ok the data are like this

vehicle type
-------------
car
lorry

if car is the one...

car
---------------
honda
toyota

if toyota is selected

toyota
---------------
part a | serialnoA | price A    
part b | serialnoB | price B
part c | serialnoC | price C

this is how the data should be organized

so if possible could u experts suggest me what database should i use for this matter and how do i get it...

Ovi, i am not quite sure how to use the instantdb but i'll keep trying, any referece and help that i could get?

dorothy2, what is the advantage of using xml???

notes: this application is meant to be run in windows paltform only

regards
kah woo
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 6

Expert Comment

by:dorothy2
ID: 6202214
Use XML as an alternative to using a database if your product list is small (< 150 products). As a developer, you can leverage the code examples in Apache Xerces or another parser. Your catalog could be maintained by someone with clerical skills rather than database skills, and you could use a data type definition (DTD) to ensure that the revisions to the catalog contained the correct types of data (vehicle type, car brand, part description, part serial number, price).
0
 
LVL 2

Author Comment

by:kahwoo
ID: 6202253
dorothy,
wow! that was fast ^_^
ok! back to the question, there are more than 5000
(5 thousand) of items (parts) is that ok??

ovi, i don't think the instantDB is free, is there any alternative that i can look into???

regards
kahwoo
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6202456
Sorry, I did not heard from any other. What you can do in other hand is to create import text files which will follow your structure, parse this files, create your own internal structure objects and make a simple serialization. After that put the application on the CD and when you start'it you simply deserialize your data and use'it.

To be more clear I explain again in greater detail :

1. Split your application in two distinctive parts, one called "Administrative" and the other "Commercial";
2. The Administrative application should be capable of parsing txt files following your data description and to create the coresponding serialized files.
3. The Commercial application should be capable to load serialized files and work with them.

Of course on your CD you write only the Commercial part and the serialized files. Why this ? Because if you write directly the txt files (or XML files) you have no sequrity in your data, this can be viewed by all people. The serialized files are Java coded files (unreadable).


More :

public class Car {
  private String type;
  private String name;
  private CarComponents[] parts;

  public Car(String t, String n, CarComponents[] p) {
    type = t;
    name = n;
    parts = p;
  }
  ......  get/set Methods ......
}

public class CarComponents {
  private String partName;
  private String serialNo;
  private int price;

  public Car(String pn, String sn, int p) {
    partName = pn;
    sn = serialNo;
    price = p;
  }
  ......  get/set Methods ......
}


Now you build an Vector of Car objects which must be serializable&deserializable and that's all.

I must leave now, but if you want more details about that we can continue tomorrow.

About .mdb driver I didn't found any on the web. So this is the most resonable solution in my opinion.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6202462
Sorry, I did not heard from any other. What you can do in other hand is to create import text files which will follow your structure, parse this files, create your own internal structure objects and make a simple serialization. After that put the application on the CD and when you start'it you simply deserialize your data and use'it.

To be more clear I explain again in greater detail :

1. Split your application in two distinctive parts, one called "Administrative" and the other "Commercial";
2. The Administrative application should be capable of parsing txt files following your data description and to create the coresponding serialized files.
3. The Commercial application should be capable to load serialized files and work with them.

Of course on your CD you write only the Commercial part and the serialized files. Why this ? Because if you write directly the txt files (or XML files) you have no sequrity in your data, this can be viewed by all people. The serialized files are Java coded files (unreadable).


More :

public class Car {
  private String type;
  private String name;
  private CarComponents[] parts;

  public Car(String t, String n, CarComponents[] p) {
    type = t;
    name = n;
    parts = p;
  }
  ......  get/set Methods ......
}

public class CarComponents {
  private String partName;
  private String serialNo;
  private int price;

  public Car(String pn, String sn, int p) {
    partName = pn;
    sn = serialNo;
    price = p;
  }
  ......  get/set Methods ......
}


Now you build an Vector of Car objects which must be serializable&deserializable and that's all.

I must leave now, but if you want more details about that we can continue tomorrow.

About .mdb driver I didn't found any on the web. So this is the most resonable solution in my opinion.
0
 
LVL 2

Author Comment

by:kahwoo
ID: 6213359
looks like i need to read more on serailized and deserialized file till then...
reagards kahwoo
0
 

Expert Comment

by:CleanupPing
ID: 9062039
kahwoo:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9253850
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[split points between dorthy2 and Ovi]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question