Thread: Materials Administration big problem


Permlink Replies: 31 - Pages: 3 [ 1 2 3 | Next ] - Last Post: Aug 8, 2008 7:11 AM Last Post By: Tomb4000
PedroB

Posts: 9
Registered: 11/08/07
Materials Administration big problem
Posted: Aug 5, 2008 10:12 AM
Click to report abuse...   Click to reply to this thread Reply
I'm developing a project to administrate materials from a laboratory.
The materials from the laboratory can be of various kinds, of which this is to set up a master table, and details tables on the type of material.
The material is inserted by the administrator of the application which means that the tablelas details are created as necessary, not knowing at the outset the number and name
of tables Details of the subjects that will exist, once it becomes impossible to create static pages referencing tables that in the beginning does not exist.
What is the best option to manipulate the data tables of laboratory materials of the application by the administrator, in other words add,change and remove.


Any suggestion was welcome,thanks.

Sorry for the bad English.

Pedro and Telmo.

ATD

Posts: 9,210
Registered: 04/17/06
Re: Materials Administration big problem
Posted: Aug 5, 2008 10:30 AM   in response to: PedroB in response to: PedroB
Click to report abuse...   Click to reply to this thread Reply
Hi Pedro and Telmo

What you need to do is create a Form/Report pair of pages on your details table. This can be set up using a Create Page wizard.

Click the Create Page button in your application and select the "Form" option. On the next page, select "Form on a Table with Report". Then select your workspace Schema then your details table and then follow the prompts - usually just accepting all the default values offered by the wizard.

When completed, you will have report page that allows you to Add new records or click an edit button next to an item on the report to edit or delete an existing record.

You can do the same thing with the master table.

Andy
PedroB

Posts: 9
Registered: 11/08/07
Re: Materials Administration big problem
Posted: Aug 5, 2008 11:55 AM   in response to: ATD in response to: ATD
Click to report abuse...   Click to reply to this thread Reply
Hi Andy, thanks for the reply.
I understand what you tell us to do, but the problem still exists, because that kind of form/report is so static that we cannot change it depending on the type of materials, and we'll have to had a page(form/report) for each kinds of materials that we don't know in the beginning what they are, and what columns they have etc.
I'll try to explain it in another way, lets suppose the administrator of the application decides to add another type of materials, for that the application will have to create another detail table from the master "material". The problem is when he do that we do not have a page to administrate that kind of material.

Hope this will make things more clear, and hope you can help us.

Thanks, Pedro and Telmo.
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Materials Administration big problem
Posted: Aug 5, 2008 12:47 PM   in response to: PedroB in response to: PedroB
Click to report abuse...   Click to reply to this thread Reply
Pedro,

is the relation between the tables (master - detail) described somewhere?

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1

bobrudolf

Posts: 271
Registered: 03/29/02
Re: Materials Administration big problem
Posted: Aug 5, 2008 1:41 PM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Hi Pedro,
Your problem is not unique, most of us have faced it at one time or another. In fact I seem to recall an 'Ask Tom' thread on a similar vein. See http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10678084117056 and http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1460004570029. There are several suggested solutions contained within these threads. It' s more a design issue than a data issue. You can name your columns anything as long as the user understands what you are trying to convey to him/her. Probably you don't want to use Parent/Child for the reasons you already outlined, but a serial process (fill in information one screen at a time) is a very usable solution. I used that very solution in a process for scientists concerned with water and plankton sampling in diverse environments.
Keep Smiling,
Bob R
PedroB

Posts: 9
Registered: 11/08/07
Re: Materials Administration big problem
Posted: Aug 5, 2008 1:49 PM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Denes,

CREATE TABLE "MATERIAL"(
cod_material NUMBER NOT NULL ENABLE,
cod_type NUMBER NOT NULL ENABLE,
CONSTRAINT "MATERIAL_PK" PRIMARY KEY("cod_material") ENABLE,
CONSTRAINT "TYPE_FK" FOREIGN KEY ("cod_type") REFERENCES "TYPE" ("cod_type")
)

CREATE TABLE "TYPE"(
cod_type NUMBER NOT NULL ENABLE,
name VARCHAR2(100) NOT NULL ENABLE,
CONSTRAINT "TYPE_PK" PRIMARY KEY("cod_type") ENABLE
)

CREATE TABLE "DETAIL1"(
cod_material NUMBER NOT NULL ENABLE,
description1 VARCHAR2(100) NOT NULL ENABLE,
description2 VARCHAR2(100) NOT NULL ENABLE,
CONSTRAINT "DETAIL_PK" PRIMARY KEY("cod_material") ENABLE,
CONSTRAINT "DETAIL_FK" FOREIGN KEY ("cod_material") REFERENCES "MATERIAL" ("cod_material")
)

These are our tables and the master-details relation its in the field cod_material like we can see.
This is our solution, but if there is another good one we are welcome.

This is an example. We can know how many details tables exist like DETAIL1 because it is referenced in the table TYPE and the details tables are added in "runtime".

Thanks, Telmo and Pedro

Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Materials Administration big problem
Posted: Aug 5, 2008 1:59 PM   in response to: PedroB in response to: PedroB
Click to report abuse...   Click to reply to this thread Reply
So, if I understand it right, you use the same logic for each new material? You create all
three tables for each material or only detail table? By the way, who is Telmo? ;)

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1

Tomb4000

Posts: 29
Registered: 11/07/07
Re: Materials Administration big problem
Posted: Aug 5, 2008 2:30 PM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Hello!!!
I'm Telmo

The administrator will have a form of creating new types of material.
In this form entering the fields that will have this new type of material. In time of execution will be called the instruction SQL CREATE TABLE to the information included in that form. The point is to develop a Laboratory management application when in the beginning we do not know what kind of material we will manage, and where after the application installed the administrator can create different of material without directly input SQL code. After the administrator add the tables relating to the equipment in the laboratory, can begin to add / manipulate information in these tables.


The problem is to manage all this information in operations such as add material, which would have to be generated a page with the fields that will contain the table to be able to add or change the lines of these tables.

In short, each table of new material does not depend on no other existing tables may
it has more or less fields, with different names. We only want to add a new details tables, and inserted a new line in the table TYPE, with the name of the table created.

Thanks... Telmo & Pedro

Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Materials Administration big problem
Posted: Aug 5, 2008 3:19 PM   in response to: Tomb4000 in response to: Tomb4000
Click to report abuse...   Click to reply to this thread Reply
Hello Telmo,

I am not sure if I fully understand your requirement, but wouldn't the dynamic SQL be a
solution for your reports? See this small example:

http://apex.oracle.com/pls/otn/f?p=31517:181

Creating forms would be possible if you use collections. It is a quite a lot of work but doable.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1

Tomb4000

Posts: 29
Registered: 11/07/07
Re: Materials Administration big problem
Posted: Aug 5, 2008 4:56 PM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
bobrudolf:

I see that you understand our problem, but it was not the favorite solution, since it is also a final project from university and we want a solution that is implemented and it works in the best possible way. However we appreciate much the idea, as is the way that we are thinking of doing is not working we will get in your idea and build our solution with it.

Denes Kubicek:

Hello again.

Yes dynamic SQL seems a good solution to solve the problem, However dynamic SQL can only withdraw the data from a table where it can be chosen in a select list as in your example. For details consult the problem was solved, however need that only one page of the application can edit all the tables that will be entered by the administrator in the future.

So besides the instruction SQL dynamics we also need to generate a dynamic form
from the diferent fiels in the details tables, this is the part that we do not know how to get started, or even if it is possible.

do you see our problem? I regret we fail to express the best way because we dont dominate english very well.

Thank's for the help.

bob we still smiling =)

Pedro & Telmo

Message was edited by:
Tomb4000

Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Materials Administration big problem
Posted: Aug 6, 2008 1:05 AM   in response to: Tomb4000 in response to: Tomb4000
Click to report abuse...   Click to reply to this thread Reply
Telmo,

I understand your problem because I read the threads from the Ask Tom website posted
by Bob. However, I still do not understand the background of your question. You are looking
for a solution and I would be interested to help you find one. I would suggest you apply for
an account at apex.oracle.com. After that you create an small example, give me access to
it an I will have a look.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1

Tomb4000

Posts: 29
Registered: 11/07/07
Re: Materials Administration big problem
Posted: Aug 6, 2008 6:25 AM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
We appreciate your help very, very much!

Even before creating this post, you already had indirectly helped with your comments and with your excellent page of examples :)

We will still try to have a example ready to show today our problem. Thank you very much.

Tomb4000

Posts: 29
Registered: 11/07/07
Re: Materials Administration big problem
Posted: Aug 6, 2008 3:19 PM   in response to: Tomb4000 in response to: Tomb4000
Click to report abuse...   Click to reply to this thread Reply
Denes,

We have created an example application, like you asked us to do, trying to show you our problem.

Workspace: PROJECTO_LABSIM
Username: TOMB@PORTUGALMAIL.COM
Password: labsim

Direct link to the aplication - http://apex.oracle.com/pls/otn/f?p=21999:2:8217151593587090:::::

Hope you can help us, Thanks.
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Materials Administration big problem
Posted: Aug 6, 2008 3:51 PM   in response to: Tomb4000 in response to: Tomb4000
Click to report abuse...   Click to reply to this thread Reply
O.K.

It is quite late over here in Europe and I will have a look at it tomorrow. I think it is doable.

1. using a tabular form to add or update records - this is much easier

2. using a form to add or update records - this is more complex

Which solution do you prefer?

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1

Tomb4000

Posts: 29
Registered: 11/07/07
Re: Materials Administration big problem
Posted: Aug 6, 2008 4:01 PM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Hello!

:) yes we know. we are Portuguese!

option 1:
is it possible to do with a to tabulate form?
If yes, this is our choice!

option 2:
we would like a lot of knowing to do this way! =)

we want find out a solution for our problem, however we want plenty to learn more!

thanks :D

Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums