Index Unique

70 views
Skip to first unread message

jimp...@yondu.com

unread,
Jan 9, 2018, 12:45:06 AM1/9/18
to Quick Database Diagrams
How do you set an index for example
UNIQUE INDEX (`country`, `country_code`)

Thanks! 

Trevor Jobling (QuickDBD)

unread,
Jan 10, 2018, 4:29:29 AM1/10/18
to Quick Database Diagrams
Hi Jonas,

I just realised that we swapped emails about this that didn't go into this thread. I'm going to copy our comments here in case they are useful to others or produce other suggestions. Thanks for your suggestions!

[From Trevor Jobling]

Hi Jonas,

Thanks for using QuickDBD.

I'm sorry, QuickDBD doesn't support indexes yet. 

My best suggestion for now is to add it as a comment to the field e.g.

Customer
--
ID pk int
Name varchar
Email varchar  # unique

At least you'll have a record of it, but it will not be shown in the diagram.

While you're here, I'd be interested in your opinion on these two questions:
  1. If we add a new keyword e.g. UNIQUE, how should this be represented in the diagram?
  2. How could we handle compound indexes i.e. those with more than one field?
Thanks!
 
[From Jonas Imperial]

Thanks for the quick response.

Your Questions:
1. If we add a new keyword e.g. UNIQUE, how should this be represented in the diagram?
  - How about an icon that looks like letter U in font style bold?
2. How could we handle compound indexes i.e. those with more than one field?
 - How about placing a bracket on the indexes and setting the font style to bold or italic, see image below for reference.

Inline image 1

Anyways this are only suggestions.

Many Thanks!
Reply all
Reply to author
Forward
0 new messages