I want to create a database for my program. Most likely I will use SQLite, although others are an option.
I will have columns
a is unique and will be my primary key.
d are allowed to contain duplicate value.
However, I don’t want combinations of
d to repeat. For instance, sample valid db:
a b c d 0 18 n kiwi 1 12 v kiwi 2 15 t orange 3 12 j kiwi 4 12 t banana 5 31 f apple 6 10 h kiwi 7 15 y orange 8 20 b apple 9 1 m grapefruit 10 7 s apple 11 4 h banana 12 31 t egg
Sample invalid db (rows
a b c d 0 18 n kiwi 1 12 v kiwi 2 15 y orange 3 12 j kiwi 4 12 t banana 5 31 f apple 6 10 h kiwi 7 15 y orange 8 20 b apple 9 1 m grapefruit 10 7 s apple 11 4 h banana 12 31 t egg
Is there standard database rule or concept that applies to this?
I can of course simply do validation in my code, by manually querying the db. I believe I could also construct a fifth
bcd column, which concatenates the other three, and is required to be unique. But both of these seem hacky. Is it possible to somehow “declare the columns unique in combination only” in a more direct and obvious way?
For instance, I could declare
(b, c, d) as my composite primary key (not sure if SQLite supports this but I think SQL does). That should accomplish my goal. However, I don’t want these columns to actually be my PK.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!