Re: Database design question
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 07/30/04
- Next message: SKG: "Upgrade"
- Previous message: Mark Siffer: "delete datafile problem"
- In reply to: Anders: "Re: Database design question"
- Next in thread: Anith Sen: "Re: Database design question"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Jul 2004 09:24:53 -0500
I read (over) the article, and what he is talking about is a single code
lookup table (still a bad idea, but ) not a single table to hold all of the
attributes of some thing.
If you are only going to do what you were suggesting on "extended"
attributes, then it is a viable thing to do. I would just suggest that you
resist the temptation to make everything an extended attribute, and only use
them to allow clients to extend your base design. Having a property table
is (in my opinion) far better than having tables that have userdefined1,
userdefined2, userdefined3 etc, tacked on the end of every table to support
later needs.
-- ---------------------------------------------------------------------------- Louis Davidson (drsql@hotmail.com) Compass Technology Management Pro SQL Server 2000 Database Design http://www.apress.com/book/bookDisplay.html?bID=266 Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies will be ignored :) "Anders" <reply_to_group@news.com> wrote in message news:%23VFrjzidEHA.1184@TK2MSFTNGP11.phx.gbl... > Thank you for thourough answers. Below some mixed comments on replies. > > I agree with many of your comments, but the part we try to cover is where we > dont know the details of the lookup data. > > Yes we know that many/all customers will have things like vendors, accounts, > departments, projects, employees etc. etc. > So potentially we could define these tables in our database, keeping it > static. > > What do we then do with the more "unknown" user-defined lookup data. It will > be similar in a way(but not the same), they will probably have an > id(varchar) of some sort, and a value with x number of additional attributes > varying from type to type. > > > >> Imagine the join you would have to create with 20 lookup-tables.. << > > <Anith> > >>>>Very common scenario in reasonable enterprise level systems. What is the > >>>>concern here? For simplicity, opt to use a view, if and when required. > </Anith> > > The concern here is performance mainly on selects. > > >> The alternative with many columns would potentially need indexes on > all/most columns since each of the values could be a search criteria for our > users. << > > <Anith> > >>>>Perhaps, not in all/most columns. Once you learn the pattern of the > query > >>>>expressions, you can tune the schema without bloating the physical > >>>>structures with indexes everywhere > </Anith> > > Tuning per installation is indeed the best way, but we need to give a good > "default" tuning. And we supply search pages where users can search on all > values(they want to), so they will potentially need indexes on all columns. > I realise there is no such thing as a good default tune, but at least some > default settings for small/medium installations. > > > <Louis> > However, for things like vendors, and thing that you can specifically > define, this sort of construct is, from a SQL-based view, a very bad idea. > And if you are proposing to build a database where you define your database > in metadata and store the data in these not predefined buckets rather than > building a static, well structured, normalized database, you will get little > support here. Perhaps in an object oriented programming newsgroup you might > find more support. > </Louis> > > Perhaps this is where the real problem is :-) A bunch of OO programmers > trying to transfer OO into the DB :-D > > Anyways, thanks to everyone replying so far. The reason for posting was > ofcourse that we were unsure of the model, and it seems like we were right > in feeling that way when looking on the response ;-) > > Btw: Found this article with info on the alternative approach mentioned in > the original post. > For those that feel like reading: > http://www.sqlservercentral.com/columnists/lPeysakhovich/lookuptabledesign.asp > Think you need to register(free) to read the article. > > Anders > >
- Next message: SKG: "Upgrade"
- Previous message: Mark Siffer: "delete datafile problem"
- In reply to: Anders: "Re: Database design question"
- Next in thread: Anith Sen: "Re: Database design question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading