To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.databaseOpen lugnet.admin.database in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / Database / 61
60  |  62
Subject: 
Re: A database question
Newsgroups: 
lugnet.admin.database
Date: 
Wed, 25 Nov 1998 14:30:54 GMT
Viewed: 
530 times
  
Once upon a time, "Jim Hughes" <hughesj@one.net> wrote:

I am currently in the early stages of completely redoing my Lego
Technics site and decided it would be cool to put all of my information
about technic sets and elements into an Access database (this may
not be the best choice but is was free!). At very least I could
then generate my HTML automatically and possibly end up with
dynamic ASP (or CGI) pages.

If you go with Access, take the time to write a VBA function to export
the data to CSV format.  That way, you can share with everyone, and
you won't have a export-headache each time you update the database.

Since I know absolutely nothing about databases and alot of you
guys know alot about them here is my question:

What is the best way to handle the fact that a given set number
can refer to different sets and a given set can have multiple
set numbers?

The classic relational database answer to a non-unique main ID is to
not use the set number as the table key.  Instead, create a seperate
unique key column, and use artificially-created values in it.  In
Access, make the key column an AutoNumber type.

I thought that I could have a simple table of all possible (Technic) set
numbers with each number pointing the real set record.


Yes, that's pretty much right.  To handle the situation where one set
has different numbers, create multiple records in the set-number
table, all pointing to the same real-set record.  To handle the
situation where the number is used for different sets, again create
multiple records in the set-number table, but point them at different
records in the real-set table. Be sure the set-number table has other
columns to identify the differences between different records.

Is there a better way?

I've always liked the idea of letting Todd do it. <gdr>

Steve



Message has 2 Replies:
  Re: A database question
 
Steve Bliss wrote: < DBA 101, topic: non unique "keys" which really aren't keys.> Yup. AutoNum means no manual thinking about which postfix to attach to the set (and attendent opportunity for error) but also means a number that has no human meaning, (...) (26 years ago, 25-Nov-98, to lugnet.admin.database)
  Re: A database question
 
Steve Bliss wrote in message <365c1013.5669348@lu...et.com>... (...) Access provides this facility built-in so there's no overhead in keeping it in Access, then creating a query to export the table(s)/fields exactly as required. Huw (26 years ago, 26-Nov-98, to lugnet.admin.database)

Message is in Reply To:
  A database question
 
Hi: I am currently in the early stages of completely redoing my Lego Technics site and decided it would be cool to put all of my information about technic sets and elements into an Access database (this may not be the best choice but is was free!). (...) (26 years ago, 25-Nov-98, to lugnet.admin.database)

8 Messages in This Thread:




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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Database

 
LUGNET Guide updates (Sun 10 Nov 2024)
11 hours ago
Custom Search

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