To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.db.brictionaryOpen lugnet.db.brictionary in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Database / Brictionary / 106
105  |  107
Subject: 
Re: Online LEGO Inventory Database
Newsgroups: 
lugnet.db.brictionary
Date: 
Thu, 10 Feb 2000 20:19:45 GMT
Viewed: 
3129 times
  
Steve Bliss wrote in message ...
Yep.  A better approach may be modeling a set of properties.  So a plate • with
holes in it could have both the Technic and Plate properties.  This would • avoid
requiring a hierarchical classification (is that redundant?) system.

Yeah, I agree. One of the other threads had come to the same conclusion • and
are curently trying to decide exactly which properties would be necessary.

Having a good list of properties at the start is a good idea, but don't
hard-code specific properties into the schema.  It's just a many-to-many
relation between parts and properties.  Assuming a relational approach.

Here is the current scema.  I have decided to concentrate on the parts
section,
and themn move onto creating a set inventory section (which I think will be
the easy part)...

Total of 6 tables:

lego_part_item
lego_part_descriptions
lego_part_groups
lego_part_lookup_color
lego_part_lookup_group
lego_part_lookup_source

laid out as such:

*** lego_part_item
part_id        integer    (auto-increment)
color_id       integer    references lego_part_lookup_color(color_id)

*** lego_part_descriptions
part_description_id      integer        (auto-increment)
part_id                  integer        references lego_part_item(part_id)
description              varchar(128)
source_id                int            references
lego_part_lookup_source(source_id)

*** lego_part_groups
part_id                  integer        references lego_part_item(part_id)
group_id                 integer        references
lego_part_lookup_group(group_id)

*** lego_part_lookup_color
color_id                 integer        (auto-increment)
description              varchar(32)

*** lego_part_lookup_group
group_id                 integer        (auto-increment)
description              varchar(96)

*** lego_part_lookup_source
source_id                integer        (auto-increment)
description              varchar(16)


I have an actual SQL script to create these tables, but I
thought this would be easier to look at.

Alright guys - hack it up.

--Eric



Message is in Reply To:
  Re: Online LEGO Inventory Database
 
(...) Having a good list of properties at the start is a good idea, but don't hard-code specific properties into the schema. It's just a many-to-many relation between parts and properties. Assuming a relational approach. Steve (24 years ago, 10-Feb-00, to lugnet.db.brictionary)

9 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR