I do not want to have to add columns to tables once on Oracle. Is there a way around?

I  have tables on Oracle and do not want to have to ask the DBA to add columns.  Is there a way around this with elements where I add rows instead of columns?  If so , can you explain.
Thanks in advance.
leezacAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
I'm not understanding what you are wanting to do with 'elements'.

You are wanting to store row information in rows and not columns?  probably not possible but I need to understand the issue before I can say for sure.
0
Christoffer SwanströmPartnerCommented:
You could make a generic table that has the following structure:

id NUMBER
attribute VARCHAR2(...)
value VARCHAR2(...)
value_type VARCHAR2(...)

Using this you can store for any given primary key (identified by id) any number of attribute/value pairs that you would normally store in table columns (the column defining the attribute and the value being stored for each row in the column).

Example:

You want to store information about car models. A traditional data model would look something like this:

model_id NUMBER
make VARCHAR2
model_name VARCHAR2
engine_displacement NUMBER

A row could look like:

1 / Ford / Explorer / 2.0

In the generic data structure you would store the corresponding data as follows

1 / make / Ford
1 / model name / Explorer
1 / engine displacement / 2.0
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Christoffer SwanströmPartnerCommented:
Sorry, forgot to explain the value type. That can be used to define whether the value is a number, string, date or some other datatype. Depending on the value_type the value can then be decoded/converted.

Of course such a data model would present problems in terms of performance and ease of understanding. But on the other hand it lets you store arbitrary information without having to change the data model itself.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

slightwv (䄆 Netminder) Commented:
Before I would do that I would create an XMLTYPE table and store xml docs that contain anything you want.
0
DavidSenior Oracle Database AdministratorCommented:
Slight, this reads to me that the individual does not have DDL privileges.
0
slightwv (䄆 Netminder) Commented:
I agree.  I was just pointing out that if the solution by tosse was an option (create a table), there is an alternative.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.