Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012
    Posts
    1

    some starter questions

    Hey there,
    right now i am trying to build a suitable database model for a study problem. If someone of you find some time to have quick overview and could offer some hints it would be amazing. I donīt want anybody to do my work, but right now i really stuck somewhere in the middle.

    First a question, which may sound really stupid, but when you donīt know it is really a big thing. From which site the relationships can be read? From table with filed circle to the table the line ends, or the other way round?
    I know how i want to build the dependencies but donīt know how i have to drag it in the designer tool.
    Next thing is that i am not sure which dependencie is identyfying and which isnīt. No matter how i try, i can see every link between the tables in both ways somehow.

    Next thing is much more specific about my problem.
    I want to have a table calculation where information come together. A calculation has one order which is made by one or more positions.
    My plan was to have an order_id (not as primary Key, because the order_id can belong to x records, each with an other positition_id)

    so i could create one record in calculation with one order_id which relates to many positions in this order.
    But for some reason the designer wants something like a primery key in each table.
    Similar problem in the stock table, which doesnīt need a primary key at all by my opinion...

    I solved both with stock_id and in table order table_id as primary Keys. But first i am not pleased with this solution and secondly i am pretty sure that there is a much smarter way to do it.

    Thank you for reading, maybe for responding, and sorry for this english style
    Attached Thumbnails Attached Thumbnails database_modell_28_07.JPG  

  2. #2
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    Quote Originally Posted by mysql321 View Post
    I want to have a table calculation where information come together. A calculation has one order which is made by one or more positions.
    My plan was to have an order_id (not as primary Key, because the order_id can belong to x records, each with an other positition_id)

    so i could create one record in calculation with one order_id which relates to many positions in this order.
    But for some reason the designer wants something like a primery key in each table.
    Similar problem in the stock table, which doesnīt need a primary key at all by my opinion...
    and what would make you think that the table shouldn't have a primary key?
    How do you propose finding a record in the table?
    Are the records uniquely identified?
    What are the fields in the table and the purpose?

    If the table doesn't support a primary key then you need to question the value of the table and redesign it

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •