Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ER diagram and its relations

Featured Replies

  • Newbies

Hello,

this is the diagram of an online bookstore I made.

bookstoreEnglishPic.jpg

There are some simple business rules applied:

Customer can order many products(Items).

An Item is considered book, cd, dvd, e-book,...

Customer can have many addresses.

Item can have one author ( for now, i will maybe expand this to many authors, which is logical i think), one publisher and many translators.

Also, the item can be in many categories.

I think it's all in 3NF, maybe there could be problem in the Customer table with the email and username attribute.

The real problem is in the entities and their relations. I have two problems. I dont know if the ordering process is connected right, and the customer's payment methods (consider that there are not all attributes in the payment method table for now).

Any ideas or corrections? Advices?

Thanks, Matic

The real problem is in the entities and their relations. I have two problems. I dont know if the ordering process is connected right, and the customer's payment methods (consider that there are not all attributes in the payment method table for now).

Your ordering process looks ok, but the payment process isn't clear.

Which table holds the dollar amount a customer pays? Is it Customer Payment Method?

Usually payments are made against invoices, not an entire Customer balance, which it appears you're doing.

I don't understand why you have a join table btw Orders and Customers. Orders can have many Customers?

Conversely, can an Item have many Authors? Seems to me that they can.

Edited by Guest

I would personaly link a payment with an order, and not with a customer

  • Author
  • Newbies

Hello all, again.

Yes you are rigt, those many to many was the lapsus, i dont know why i made them. i corrected them.

Now i made some modifications.. here is the pic

kepr.JPG

IDbasket is, I think, the same table as was Orders before. I wanted to create a db to support the Basket Cart. I dont know if i need to name it Orders? My philosophy goes like this:

later, the application will get the data to show the customer (who is browsing the page and putting items into basket) from the table Basket_Item, and identify the customer through Basket table. I dont know how software development goes, is there any meaning in my thinking? or better, is it possible to do like that?

thanks for the possible reply. regards

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.