How is my normalization? (1 Viewer)

Bloodlvst

Registered User.
Local time
Today, 08:34
Joined
Nov 27, 2018
Messages
32
Just wondering if I can make this more efficient. I feel like overall I've designed this well and left room for scalability, but I figured it can't hurt to have a few experts check it out!

Where are some spots I could improve this, or is it pretty solid already?
 

Attachments

  • table_structure.png
    table_structure.png
    37.8 KB · Views: 104

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:34
Joined
Feb 28, 2001
Messages
27,172
Without knowing specific business rules, I can only give you a once-over, but that looks normalized to me.

As to efficient, that's a different question that the Relationships diagram won't reveal. There, the issue is that depending on those fields that are most likely to be searched by name, do you have indexes on those fields? (Doesn't have to be unique if not the PK index.)

Then, the issue of queries will be important. If the queries perform JOINs through the PK and FK fields, they will be most efficient.

But from what you showed, I'd say you have a good start.
 

Bloodlvst

Registered User.
Local time
Today, 08:34
Joined
Nov 27, 2018
Messages
32
Yes, any fields I expect to be used in searches or filters I have indexed, and I also have a composite index in the OrderDetails table comprised of Order ID and SKU (to prevent things from getting needlessly messy).

Query efficiency was my main concern, and it's good to know that I've set myself up to not have too much trouble later on.

Cheers! :)
 

isladogs

MVP / VIP
Local time
Today, 12:34
Joined
Jan 14, 2017
Messages
18,216
In the Payments table, what's the difference between PaymentType and PaymentMethod?
 

Bloodlvst

Registered User.
Local time
Today, 08:34
Joined
Nov 27, 2018
Messages
32
In the Payments table, what's the difference between PaymentType and PaymentMethod?

PaymentType is to differentiate whether the payment is for a deposit, or a "normal" payment

PaymentMethod is for card/cash/paypal/etc.
 

Users who are viewing this thread

Top Bottom