Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are views right for me (or what am i doing wrong)
Message
 
À
08/01/2004 08:55:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00865024
Message ID:
00865028
Vues:
19
Could you give more details?
1. What should the view do? How would the result look like?
2. Should it will be updateable or just for browsing only?
3. What is exactly the SQL statement for the view?


>Can anyone help.
>First my background is C++/engineering, almost no database work. I've been asked to build a small app to track parts & associated data. The client is a small company happily using Visual Foxpro 6 & no desire (or finances) to upgrade. I work for a small company whose idea of training is to give you a job to do & occassionally access to the manuals (I've got the VFP6 manuals) - I'm pretty sure I've got some wrong ideas, but nobody to turn to for help.
>
>Initially the data required to be held per part is :
>
>PartNumber : alphanumeric
>Description : text description
>CurrentUse : logical
>PartType : Miniature, Single, Multi (need to be able to add further part types)
>DataCD : this is a alphanumeric reference to a manuacturers CD in their library
>Location : storage warehouse
>
>I thought to split this into 4 tables -
>Table 1 - parts - 1 record per part
>Table 2 - part types - 1 record per type (currently 3 records, but may expand)
>Table 3 - data cds - 1 record per CD (currently 21 records, but may expand)
>Table 4 - locations - 1 record per location (currently 10 records, but may expand)
>tables 2,3 & 4 would have numeric keys with matching fields in the main table, so each record in table 1 would be linked via the keys to a record in the other 3 tables.
>
>So far so good - I built the database & tables. The problems occur when I try to create a view linking all 4 tables - if I use the view wizard & try to link the tables, I get error messages saying tables can't be parents/children to multiple children/parents. If I create a new view, I can join the tables, but the query doesn't give the expected results - the join to the first linked table seems OK, but the other tables seem stuck to the first found record. I think I understand the differences between inner/outer joins, but just can't see where I'm going wrong. Have I created the right set of tables ? Should I even be using views ?
>
>I'm not expecting a detailed solution, but if anyone can give me some hints as to where I'm going wrong or pointers to other web sites where I might find the info, it would be appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform