2 Replies - 483 Views - Last Post: 02 August 2017 - 05:08 AM Rate Topic: -----

#1 sibuns  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 17

Advice with ER diagram

Posted 02 August 2017 - 04:22 AM

I had a quick course of database few years ago and I forgot a lot from there. So you can say I'm starting from zero. I will try to explain to you on what I want to do and a picture with what I did so far.

We have a small business at home to change tires on a car (winter tires, summer tires). When I customer comes and changes tires they usually left them in our shop and we store them on a shelfs in the basement. For easier explanation let's say we have only 5 shelfs labeled from A1 - A5.

The guy comes to change from winter to summer tires. A receptor takes his name, address, car model, tires specification (of winter tires). Summer tires comes on the car, and the winter tires goes into the basement and on the shelf (let's say they go on location A1). After they are placed on the location we update the database with the location of the tire. When he comes next year we do a SQL query to see where he has his winter tires and we change them.

After receptor makes a paper with his information (name, tires, etc.) she prints this list with QR code on it with his client it. The paper goes with tires to basement and when a worker puts the on a shelf, he scans QR code on the list and QR code of location (a1 shelf) and update the database with location information of where tires are being stored.

I hope you see what I'm trying to make.

Here is the link of the ERD I made so far:

http://imgur.com/a/hXFwn

http://imgur.com/a/hXFwn

Can you please take a look and maybe suggest if anything needs to be changed.

Is This A Good Question/Topic? 0
  • +

Replies To: Advice with ER diagram

#2 andrewsw  Icon User is offline

  • the case is sol-ved
  • member icon

Reputation: 6383
  • View blog
  • Posts: 25,781
  • Joined: 12-December 12

Re: Advice with ER diagram

Posted 02 August 2017 - 04:54 AM

I will pose a couple of questions. I'm not suggesting there is anything wrong, just that these are questions I would ask myself.

Why is the client id repeated in the Tires table? Aren't tires specific to a particular car, and the car associated with a specific client?

Do you need a separate table for the location? Isn't the location specific to particular tire(s)? So could be in the Tires table?
Was This Post Helpful? 0
  • +
  • -

#3 sibuns  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 17

Re: Advice with ER diagram

Posted 02 August 2017 - 05:08 AM

View Postandrewsw, on 02 August 2017 - 04:54 AM, said:

I will pose a couple of questions. I'm not suggesting there is anything wrong, just that these are questions I would ask myself.

Why is the client id repeated in the Tires table? Aren't tires specific to a particular car, and the car associated with a specific client?

Do you need a separate table for the location? Isn't the location specific to particular tire(s)? So could be in the Tires table?


for the first question. I thought that it is better to have a direct relation with tires and client because, what if the guy changes car during the year and he comes to change tires with a new car.. than you cant do a search with car anymore(if he cant remember what he had before - not likely to happen but it is an option). Its just what im thinking. Do you think that i me thinking in a wrong way?

And for the second question. If i use the location it tires table, than i cant see how many free space i have in storage right? Or im a thinking in a wrong way again =)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1