473,670 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

acceptable way to program

Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle blob
column.

finally when they want to retrieve it they de-serialize the object., work on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked in
situ
3. it cannot be searched , without de-serialization.
I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve

Jul 19 '05 #1
29 3930
steve wrote:
Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle blob
column.

finally when they want to retrieve it they de-serialize the object., work on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked in
situ
3. it cannot be searched , without de-serialization.
I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve


Store relationally and create an API from package procedures to handle
the transactions between the database and the front-end application.

A good rule of thumb is that if you can't use Crystal Reports to query
the database structure with ease ... you have created a nightmare. What
you describe, above, is a nightmare.
--
Daniel A. Morgan
University of Washington
da******@x.wash ington.edu
(replace 'x' with 'u' to respond)
Jul 19 '05 #2
steve wrote:
[..]
I'm looking to implement a java front end, (oracle back end),
system ,that
allows a product , to be inspected by an inspection team , and
comments/photographic record kept.
so you've decided on a relational database? yes, Cobb's (?) rules,
first normal form, second... etc apply in that case. as DA Morgan
(surely not the mathematician, de morgan?) said, the practice you
described is the worst of both worlds: a total mis-use of a relational
database which, as you state, should be normalized as much as is
practical/possible.

if a (relational) database isn't normalized, to whatever extent, it's
open to corruption. In the situation you described maintenace is
probably a PITA..?
using an "object approach" would make it very simple, but the
size of the resulting object could be very large.


instead of a relational database there're a multitude of options:

POJO (plain old java object)
xml
JDO
....i dunno the rest, but there's gotta be tons!

if you've already decided on a relational database (oracle) then your
question as to how to implement that effectively answers itself in many
regards.

you're real question, i infer: "what are the alternatives to a
relational database?" and trying to find the best one for your needs.
however, you seem to have already decided on oracle, so it's more
hypothetical than practical.

--Thufir

Jul 19 '05 #3
steve wrote:
Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle blob
column.

finally when they want to retrieve it they de-serialize the object., work on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked in
situ
3. it cannot be searched , without de-serialization.
I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.


As you said above. If you have a proper data model, it should be a piece
of cake. :)

--
-------------
- ByteCoder - ...I see stupid people
-------------
Curiosity *Skilled* the cat
Jul 19 '05 #4
<http://directory.googl e.com/Top/Computers/Programming/Languages/Java/Databases_and_P ersistence/Database_Manage ment_Systems_-_DBMS/Object-Relational/>

<http://objectstyle.org/cayenne/>

<http://www-306.ibm.com/software/data/cloudscape/>

<http://www.hibernate.o rg/>

in no particular order :)

note that the term "object-relational mapping" is what you're after,
probably.

--Thufir

Jul 19 '05 #5
Yes, I would agree with the relational database. ORDB are mainly hype and
usually promoted by coders that have never had to write a report or mine
data effectively.

The next question would be where to store the images. BLOB or files. Both
approaches have their downfalls.

BLOBS are good because you have a centralized location for all your data
(Oracle DB) but that problem is your exports will quickly get huge and will
become a DBA nightmare (having to export a table at a time).

Keeping your files on the filesystem requires two storage mechanisms, the DB
and the filesystem. It's additional overhead to backup the files every
night, but overall, this is the approach with the least hastle overall.

"thufir" <th**********@m ail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
<http://directory.googl e.com/Top/Computers/Programming/Languages/Java/Databases_and_P ersistence/Database_Manage ment_Systems_-_DBMS/Object-Relational/>

<http://objectstyle.org/cayenne/>

<http://www-306.ibm.com/software/data/cloudscape/>

<http://www.hibernate.o rg/>

in no particular order :)

note that the term "object-relational mapping" is what you're after,
probably.

--Thufir

Jul 19 '05 #6
On Fri, 31 Dec 2004 16:32:39 +0800, DA Morgan wrote
(in article <41**********@1 27.0.0.1>):
steve wrote:
Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle
blob
column.

finally when they want to retrieve it they de-serialize the object., work
on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked
in
situ
3. it cannot be searched , without de-serialization.
I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve


Store relationally and create an API from package procedures to handle
the transactions between the database and the front-end application.

A good rule of thumb is that if you can't use Crystal Reports to query
the database structure with ease ... you have created a nightmare. What
you describe, above, is a nightmare.


thanks guys!!

I thought perhaps , I was out of date.

Anyway as we have a brand spanking new 10g , oracle and a rational layout
it is.

Jul 19 '05 #7
Ann

"steve" <me@me.com> wrote in message
news:00******** *************** ******@news.new sguy.com...
Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle blob column.

finally when they want to retrieve it they de-serialize the object., work on it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked in situ
3. it cannot be searched , without de-serialization.
How do you sort on a field that contains just picures (not pictures in
objects.)


I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve

Jul 19 '05 #8
On Sat, 1 Jan 2005 12:23:38 +0800, Ann wrote
(in article <eBpBd.311721$H A.34608@attbi_s 01>):

"steve" <me@me.com> wrote in message
news:00******** *************** ******@news.new sguy.com...
Hi,

Recently I have been looking at the various ways people are implementing,
interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the
data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle

blob
column.

finally when they want to retrieve it they de-serialize the object., work

on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or checked

in
situ
3. it cannot be searched , without de-serialization.


How do you sort on a field that contains just picures (not pictures in
objects.)


I'm looking to implement a java front end, (oracle back end), system ,that
allows a product , to be inspected by an inspection team , and comments/
photographic record kept.

using an "object approach" would make it very simple, but the size of the
resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve



by giving the picture a key index, that ties back to a master object.

If for example i have a factory record, and 50 ( Health & safety) pictures
attached to that factory record, via a key,
If i follow some peoples current advice ( Serialize, Serialize!!! ), i would
have to de-serialize an object of about 6MB, either to disk or into memory.

currently , i bring the master factory record over, then bring the pictures
over on the fly. ( actually i bring 3k thumb nails over first), then pictures
if requested by the user.
my main point , was that Whilst i have no formal background in data
management, or oracle databases, or system management ,etc .
I am the "main man" by default, because i am technical ! ( you gotta love
some companies)

Therefore because i don't know I ask.

steve




Jul 19 '05 #9
Ann

"steve" <me@me.com> wrote in message
news:00******** *************** ******@news.new sguy.com...
On Sat, 1 Jan 2005 12:23:38 +0800, Ann wrote
(in article <eBpBd.311721$H A.34608@attbi_s 01>):

"steve" <me@me.com> wrote in message
news:00******** *************** ******@news.new sguy.com...
Hi,

Recently I have been looking at the various ways people are implementing, interaction between java & oracle databases.

I was always instructed on the purity of the data model, "normalize the data" etc.

I have seen people Serializing java objects , such as purchase orders
orders, customer records etc , then sticking the "object" into am oracle
blob
column.

finally when they want to retrieve it they de-serialize the object.,
work on
it then re-serialize and stuff it back into the oracle blob.

to me this causes the following problems:

1. the object can become very big, and can only be recovered in it's
entirety, and if it contains pictures ,etc, it can become huge.
2. the object becomes "closed", in that it cannot be modified or
checked in
situ
3. it cannot be searched , without de-serialization.
How do you sort on a field that contains just picures (not pictures in
objects.)


I'm looking to implement a java front end, (oracle back end), system

,that allows a product , to be inspected by an inspection team , and comments/ photographic record kept.

using an "object approach" would make it very simple, but the size of the resulting object could be very large.

does anyone have any thoughts how to accomplish this task.
steve



by giving the picture a key index, that ties back to a master object.


So then you can sort on the blobs by giving them a key index!

If for example i have a factory record, and 50 ( Health & safety) pictures
attached to that factory record, via a key,
If i follow some peoples current advice ( Serialize, Serialize!!! ), i would have to de-serialize an object of about 6MB, either to disk or into memory.
currently , i bring the master factory record over, then bring the pictures over on the fly. ( actually i bring 3k thumb nails over first), then pictures if requested by the user.
my main point , was that Whilst i have no formal background in data
management, or oracle databases, or system management ,etc .
I am the "main man" by default, because i am technical ! ( you gotta love some companies)

Therefore because i don't know I ask.

steve



Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14160
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip Smarty-2.6.7.tar.gz on a system running WindowsXP SP2. Apache and PHP tested out fine. After adding Smarty, I ran the following http://localhost/testphp.php
16
4094
by: Lindon | last post by:
I've been bouncing back between my studies in C/C++ and have found that I like parts of both languages... I find that pointer arithmetics and arrays in C come extremely naturally to me, yet I can't get passed the fact that C structures don't even compare to C++ classes (no constructors, no member functions, of course no inheritance), there's no function overloading, and the good GUI tools (and other library) seem to be all for C++. But I...
50
2984
by: strutsng | last post by:
I want if "a C program is a standard C++ program, but not vice versa" is a correct statement? In a C++ program, we can use standard C libraries. However, we cannot use C++ libraries inside C program. Please advise. thanks!!
55
16671
by: Dev | last post by:
Hello Folks, I had faced this objective in one of my aptitude exams, that "What could be the smallest "C" program? And, as we know, smallest program means, it should execute single statement, I wrote ";" (Semicolon), so, program output will display blank screen. But Friends, I am not sure, Does anyone has perfect solution?
6
2735
by: Protoman | last post by:
I'm writing a program to calc truth tables of arguments to prove that they are logically valid. Currently, I have to tell the program to print a truth table, and check it by hand to prove it's valid. I'm tired of doing this. I need to write a fn that, given three functions/one function and two variables or anyother combo, run through all four rows, and determine if it's valid. An argument is invalid iff any row has true premises and a...
2
2241
nabh4u
by: nabh4u | last post by:
hi, i need some help with progamming..i have a program which has to implement gale shapley's algorithm. i have 2 preference lists one is for companies and the other is for persons. i have to match the companies with the persons according to the gale shapley algorithm. /----match.h--------------------------------------------------------------/ #include <iostream> #include<vector> using namespace std; /*------Declarations------*/
29
23178
by: aarthi28 | last post by:
Hi, I have written this code, and at the end, I am trying to write a vector of strings into a text file. However, my program is nor compiling, and it gives me the following error when I try to write to the file: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) I don't know what I am doing wrong. I have posted my entire program
4
10503
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it doesn't seem to write to the screen in the way I would expect. The output is:
20
3067
by: mike3 | last post by:
Hi. (Xposted to both comp.lang.c++ and comp.programming since I've got questions related to both C++ language and general programming) I've got the following C++ code. The first routine runs in like 65% of the time of the second routine. Yet both do the same thing. However, the second one seems better in terms of the way the code is written since it helps encapsulate the transformation in the inner loop better making it easier to read,...
0
8466
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8813
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7412
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6212
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1791
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.