January 9th, 2004, 04:23 AM
Joining Normalized Tables in Recordsets
I'm trying to normalize my database, and I believe that I've done a decent job at it. My only problem is that I can't join them together in Dreamweaver. This is my very simple SQL statement:
SELECT Title.Title, artist.ArtistID
FROM Title, artist
Now I know basically nothing about CF, but shouldn't this make it so that the FK in my Title table (ArtistID) shows up as the PK in my Artist Table? I just have a simple table that basically has two columns, ArtistID and Artist, showing that ArtistID is an artist name, for example, 1=Aerosmith, 2=Sublime, etc... And in my Title Table, I just want to show that with a certain title, this # is the artist. It seems simple, but whenever I try it, I get a huge error with about 100 lines of error messages, the top one being "Type Mismatch in Expression." Am I going about this all wrong? I'm really new so be simple in your explanations, please.
Thanks a million
January 12th, 2004, 08:54 AM
From the error, a type mismatch, I'd look first at the data types of the columns in your tables, particularly the data types of your primary and foreign keys. They must be exactly the same.
January 12th, 2004, 02:34 PM
What are the data types they could be? I thought they were all just text? All it is is a text DB.
January 12th, 2004, 06:34 PM
hmmm, I'd say you might want to pick up a book on database design or do some reading on the topic on the web. There are numerous data types that a column can have in a database. Some RDBMS's support different types, but common ones are number, integer, fixed length character, variable length character (varchar), boolean, BLOB, etc.
The data types of primary and foreign keys must be identical, and are often unique integers.
January 12th, 2004, 06:47 PM
Yeah, I just got a book. I'm on about page 2. Thanks for your help