unique-key Questions
4
I have data in which the combination of two variables ("ManufactererId" and "ProductId") constitute unique keys / identifiers. The data looks like this:
my.data <- data.frame(ManufactererId = c...
Wilda asked 20/3, 2016 at 10:50
1
Solved
If I run a query that increments a counter, then selects from that counter is that atomic?
I am wanting to generate smaller (integer) numbers using Cassandra.
The usage will likely be generating ...
Stewart asked 5/3, 2015 at 23:1
3
Solved
I have two table students and studentsprofilepic
'username' from students is unique key of the table
it is referenced as foreign key for the 'studentsprofilepic' table
the DDL for the tables are
...
Suasion asked 15/2, 2015 at 15:22
1
Solved
2019 Update / TLDR; switch to Entity Framework Core (or whatever else)
While missing some "Features", EF Core properly honors Alternate Keys (aka Unique Constraints) in addition to Primary Keys an...
Singspiel asked 22/12, 2014 at 19:14
1
Solved
Using Schema First, I have a database structure, as so
ExternalDataItems
---
edataitem_id PK -- surrogate auto-increment - NOT for FK relation here
datahash UX -- Candidate Key / Unique Index (bin...
Seow asked 18/12, 2014 at 19:3
1
Solved
Im trying to learn Node.js without using any third party modules or frameworks. I'm getting to the point where I got to figure out how to give session ids to users who login...
So far I know I can...
Peridotite asked 14/10, 2014 at 1:27
3
I have an index named LocationIndex in solr with fields as follows:
<fields>
<field name="solr_id" type="string" stored="true" required="true" indexed="true"/>
<field name="solr_v...
Iglesias asked 23/7, 2013 at 9:49
5
Solved
An existing DB schema has unique, non-primary, keys, and some foreign keys that rely on them.
Is it possible to define unique keys, which are not primary keys, in Entity Framework v4? How?
Grossman asked 10/4, 2010 at 20:55
5
Solved
I have a following model in my project
public class Category
{
public Guid ID { get; set; }
[Required(ErrorMessage = "Title cannot be empty")]
public string Title { get; set; }
}
and I'm try...
Frazzled asked 18/4, 2011 at 10:33
2
Solved
Currently I have this table in my database:
CREATE TABLE `twMCUserDB` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mc_userName` text NOT NULL,
`mc_userPass` text NOT NULL,
`tw_userName` text NOT N...
Inconsiderable asked 25/11, 2012 at 22:22
2
In my Django model I have two fields, name (a regular CharField) and slug, a custom field that generates the slug based on a field name passed in the field definition, in this case I use name for t...
Mycorrhiza asked 16/7, 2012 at 13:34
3
Solved
I have a table with two int values that are IDs. On their own these IDs can show up any number of times in the table, but together they should only ever appear once.
Is there a way to make a pair ...
Pokey asked 6/10, 2012 at 20:46
3
Solved
I need to generate a unique ID in php based on current date and time to keep a log of when i am running code.
i.e. every time i run the code it should be able to generate a unique id based on curre...
Christiachristian asked 28/8, 2012 at 6:33
1
Solved
I have a unique index on a column named label, but for some strange reason why I try and do an update like:
UPDATE books SET label = 'foo bar', title = 'something new', modified = UTC_TIMESTAMP();...
Amontillado asked 8/7, 2012 at 5:58
3
Solved
Can anyone explain about the purpose of PRIMARY KEY, UNIQUE KEY and KEY, if it is put together in a single CREATE TABLE statement in MySQL?
CREATE TABLE IF NOT EXISTS `tmp` (
`id` int(11) NOT NUL...
Bayonne asked 6/6, 2012 at 5:22
1
Solved
For a project with offline storage, I created a database with a primary key for the id and also a unique field holding the date.
When I delete an entry, I can not create a new one with the same da...
Dora asked 1/6, 2012 at 17:37
1
I am trying to give a custom Unique Constraint Name as follows:
Map(x => x.Name).UniqueKey("MY_CONSTRAINT_NAME").Column("FUNCTION_NAME");
The Field is mapped with a unique constraint but the ...
Cleaves asked 31/5, 2011 at 15:3
3
Solved
Which one is more reliable and has better performance? Setting MySQL unique key and using INSERT IGNORE or first checking if data exists on database and act according to the result?
If the answer ...
Dinorahdinosaur asked 31/1, 2012 at 8:25
1
Solved
When I write:
CREATE TABLE accounts (
username varchar(64) PRIMARY KEY,
I get primary key named:
accounts_pkey
Is it possible to assign my own custom name, for instance "accounts_primary_k...
Cf asked 29/12, 2011 at 23:11
2
Solved
This is a question that arose from the consequences of another question here: Is it better to have two separate user tables or one?
Assuming I have two types of users, an Author and a Reader, each...
Browse asked 24/9, 2011 at 16:57
1
Solved
I had a custom primary key that need to be set up on a particular data in a model.
This was not enough, as an attempt to insert a duplicate number succeeded. So now when i replace primary_key=Tru...
Dentiform asked 18/5, 2011 at 3:5
4
Solved
I have a table in SQL Server 2005 with a foreign key, and I want that foreign key to be a unique value or null. I've set it up as a unique key, but it won't allow me to have multiple nulls in the s...
Walk asked 12/5, 2011 at 18:52
2
Solved
Regarding the first part of my question: I was recently asking myself what are the benefits and trade-offs of having a unique identifier for certain tables in a relational database. Just as an exam...
Bridgeboard asked 10/3, 2011 at 14:55
3
Is there a way to generate an unique Hardware dependent Identification key in Ruby...?
Tubule asked 17/3, 2011 at 12:57
2
Solved
I've got a MySQL table that stores urls as unique keys. I'm starting to get collisions on my keys because it seems the keys themselves are only the first 64 bytes (or characters if you prefer, its ...
Danford asked 7/3, 2011 at 19:11
© 2022 - 2024 — McMap. All rights reserved.