This is a discussion on Am I on the right track? within the MySQL forums, part of the Database Server Software category; --> I'm quite new to MySQL and planning a site that requires content to be called from a database. Running ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm quite new to MySQL and planning a site that requires content to be called from a database. Running MySQL 4.1.22 on Apache 1.3.41 (Unix) The database consists of Projects (currently totalling 100). Each Project needs to display: Assignment (unique to project) Description (unique to project) Locations (1-5 from a list of 80) Agencies (1-5 from a list of 50) Calls for Projects will be based on their assigned Keywords. There are currently 40 Keywords and each Project is assigned between 1-15 Keywords. At present I have four tables with the following fields (ids are auto-incrementing INTs and are primary keys): Projects: pro_id, pro_assignment [VARCHAR], pro_description [TEXT] Locations: loc_id, loc_location [VARCHAR] Agencies: age_id, age_agency [VARCHAR] Keywords: key_id, key_keywords [VARCHAR] To join the data, I'm assuming I will need separate lookup tables for Locations, Agencies and Keywords each with two primary key fields: one for the Project id and one for the Locations, Agencies or Keywords id. Does this seem correct? I'm seeking an example of a query that would return Assignment, Description, Locations and Agencies based on, for instance, where pro_id matches for key_id 1,2 or 3? Also, I'll need to set up a data entry front end for the Projects that can write to all tables in one submission. Can anyone recommend useful resources/references for this? (I'm Googling this too, but there's a lot to trawl through!) Thanks for your time. Jonny (replace invalid with co dot uk) |