473,772 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database design


We need to create a lookup structure that can contain a flexible amount of
attributes.

We have discussed different design solutions for lookup-functionality, and
come up with this suggestion:

The "lookup" structure will be defined by three tables. The "Element" table,
the "Attribute" table and the "Value" table.

I will specify with an example:
Lets say we want to define a lookup-element called vendor. First we insert a
row in the "Element" table. In the "Attribute" table we create one row for
every "informatio n-piece" we want to be able to define for a vendor, e.g.
Name, number, country.
The "Value" table will contain the actual attribute-values, one row for each
value(3 rows for each vendor)

This creates a very flexible structure that can store many different types
of lookup-elements with different demands when it comes to number of
attributes("col umns"). The structure supports an infinite number of
attributes.
On the downside this will potentially create a huge number of rows in the
"Value" table. Also the design concept is more abstract and where-statements
in query's might be more complex.

The alternative is the more usual structure with two tables. The "Element"
and the "Value" tables.
The "Value" table will then have one column for each attribute, and we would
specify as many columns as
we think we will ever need.
Any comments, thoughts and suggestions would be appreciated.
Jul 19 '05 #1
2 3721
"Anders" <an************ *@news.com> wrote in message news:<UJ******* ***********@new s2.e.nsc.no>...
We need to create a lookup structure that can contain a flexible amount of
attributes.

We have discussed different design solutions for lookup-functionality, and
come up with this suggestion:

The "lookup" structure will be defined by three tables. The "Element" table,
the "Attribute" table and the "Value" table.

I will specify with an example:
Lets say we want to define a lookup-element called vendor. First we insert a
row in the "Element" table. In the "Attribute" table we create one row for
every "informatio n-piece" we want to be able to define for a vendor, e.g.
Name, number, country.
The "Value" table will contain the actual attribute-values, one row for each
value(3 rows for each vendor)

This creates a very flexible structure that can store many different types
of lookup-elements with different demands when it comes to number of
attributes("col umns"). The structure supports an infinite number of
attributes.
On the downside this will potentially create a huge number of rows in the
"Value" table. Also the design concept is more abstract and where-statements
in query's might be more complex.

The alternative is the more usual structure with two tables. The "Element"
and the "Value" tables.
The "Value" table will then have one column for each attribute, and we would
specify as many columns as
we think we will ever need.
Any comments, thoughts and suggestions would be appreciated.


you seem to want to create a relational DB on top of ORACLE.

WHY would you want to do this when ORACLE already does it so much better?

So IMHO, it is a bad idea.

Hey, you asked.8^)

have a good day,
ed
Jul 19 '05 #2
I have seen situations where this kind of design was used to capture generic
data modelling requirements, such as how many and what type of items would
appear on an exam question, or how many steps were required for a
manufacturing process, and in what sequence.

However, by *entirely* genericizing your schema, you will lose all sorts of
Oracle functionality, not the least of which is the ability to optimize
semantically different queries in different ways. Furthermore, any query
that cannot efficiently use indexes will scan *all* your data to get
whatever results are required.

So while this may be an interesting idea to you in principle, it may be
painful to live with unless your database is very, very small.

--
Cheers,
Chris

_______________ _______________ _____

Chris Leonard, The Database Guy
http://www.databaseguy.com

Brainbench MVP for Oracle Admin
http://www.brainbench.com

MCSE, MCDBA, OCP, CIW
_______________ _______________ _____

"Anders" <an************ *@news.com> wrote in message
news:UJ******** **********@news 2.e.nsc.no...

We need to create a lookup structure that can contain a flexible amount of
attributes.

We have discussed different design solutions for lookup-functionality, and
come up with this suggestion:

The "lookup" structure will be defined by three tables. The "Element" table, the "Attribute" table and the "Value" table.

I will specify with an example:
Lets say we want to define a lookup-element called vendor. First we insert a row in the "Element" table. In the "Attribute" table we create one row for
every "informatio n-piece" we want to be able to define for a vendor, e.g.
Name, number, country.
The "Value" table will contain the actual attribute-values, one row for each value(3 rows for each vendor)

This creates a very flexible structure that can store many different types
of lookup-elements with different demands when it comes to number of
attributes("col umns"). The structure supports an infinite number of
attributes.
On the downside this will potentially create a huge number of rows in the
"Value" table. Also the design concept is more abstract and where-statements in query's might be more complex.

The alternative is the more usual structure with two tables. The "Element"
and the "Value" tables.
The "Value" table will then have one column for each attribute, and we would specify as many columns as
we think we will ever need.
Any comments, thoughts and suggestions would be appreciated.

Jul 19 '05 #3

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

Similar topics

3
4516
by: Rushikesh | last post by:
I am designing a WEB BASED Accounting Software with ASP and SQL Server. For this I need some help for the Database design. My design is as follows. I)User table: User_id, UserName..... Users (e.g. John Smith) Each User would contain a following Group of tables a)Customers
5
674
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of generic design patterns that can be used and shared amongst many sub-schemas. For example, the grouping of entities. I may have the following tables: employee, product and client. These tables have no direct relationship with each other. But...
1
3497
by: Lane Beneke | last post by:
All, New to the list and a relative newbie to PostgreSQL. Please forgive stupid questions. Designing an application server for a work order processing (et al) database. I have a good handle on sequences, referencial integrity, views, & the basics. What books/documentation would you recommend to learn more about...
5
9629
by: trynittee | last post by:
Hello, It's been a while since I've posted. I am an intermediate user of Access. I can read simple VB code, have done complex queries, comfortable with event procedures, designing forms and reports. I have not worked with a split database before. And now I am. The front-end database seems to be called .mdb not .mde. Does this
12
7018
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a foreign Key relationship or does this always indicate some sort of underlying design flaw. Something that requires a re evaluation of the problem domain? The reason I ask is because in our application, the user can perform x
3
2486
by: vicky | last post by:
Hi All, Can u please suggest me some books for relational database design or database modelling(Knowledgeable yet simple) i.e. from which we could learn database relationships(one to many,many to one etc.....),building ER diagrams,proper usage of ER diagrams in our database(Primary key foreign key relations),designing small modules,relating tables and everything that relates about database design....Coz I think database design is the...
0
2561
by: Laurynn | last post by:
# (ebook - pdf) - programming - mysql - php database applicati # (Ebook - Pdf)Learnkey How To Design A Database - Sql And Crystal Report # (ebook-pdf) E F Codd - Extending the Database Relational Model to Capture More Meaning (1979) # Addison Wesley - Database Design for Mere Mortals chm # Addison Wesley - Refactoring Databases Evolutionary Database Design (2006) # Apress Beginning Databases with PostgreSQL From Novice to Professional...
1
2342
by: abhijitbkulkarni | last post by:
Hello, I am designing a .NET database application that uses 3 tier architecture. Starting initially, this application will be desktop application but I will convert it into a website later but design that I am planning should support both version. Development Environment : VS2008, C# Currently Database supported are MS SQL Server 2005 and MYSQL 5 and design for database support is extensible. This application contains several high...
0
1916
by: sam | last post by:
Hi, Hope you are doing well !!!! One of our clients is looking to augment their team with “Database Architect – DB2" please find below the details and respond with
2
5621
by: programmerx101 | last post by:
Ok, I'm looking for expert advice on this one. I have a database which keeps going into read_only mode. Sometimes it goes into read_only / single user mode. Once it was taken offline completely. This seemingly happens randomly. Out of all of the database I have worked with, this has happened on 3 of them - several times randomly to each. All three of the databases that have exhibited this behaviour have been databases I have written for the...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9911
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
8934
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
7460
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...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
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.