Our database has some primary and foreign keys, but occasionally people want to name them. That way, we can refer to a constraint specifically by a user friendly name.
The trick is to simply add CONSTRAINT xx_ConstraintName before the constraint.
Typically, the constraint name will follow the pattern of 2 letters to represent what type of constraint, followed by an Underscore, followed by the name.
Here is an example:
CREATE TABLE Interests(
AnimalID INT NOT NULL,
SpeciesID INT NOT NULL,
CONSTRAINT PK_Interests PRIMARY KEY (AnimalID, SpeciesID)
Now what do you name the constraint? Ultimately, that is a decision that is up to you. There are some conventions. The convention I used in this example is known as Hungarian notation. Hungarian notation is when we include what the thing is inside of the name. By prefixing the name with PK_ we automatically know that this is a primary key constraint. Some people prefer to put the PK at the end, and some people don’t…
Information about the second edition release of Build Your Own Web Site the Right Way Using HTML & CSS. Just me and a camera and some inserts/overlays to explain what’s new in the book, what’s unchanged and who it’s aimed at. More info at
Week 2, Lecture 11 for the online course “Big Data, Genes, and Medicine”, taught by Isabelle Bichindaritz. All rights belong to Coursera and The State University of New York. For educational purposes only. Happy learning!
Every new programming language like Apple’s Swift brings new solutions and new problems for both front-end and back-end developers. In this video, developer Joe Cavagna talks about the future of Swift as a back-end development solution, PHP’s prevalence across the internet, and how to think about programming languages as tools to solve development issues.
Located in Winter Park, Florida, Full Sail University offers associate’s, bachelor’s, and master’s degrees designed for the world of entertainment, media, arts, and technology. Full Sail’s creative approach to education provides an immersive, fast-paced, and relevant learning experience that mirrors the workflow and collaboration found throughout today’s rapidly evolving industries.
Full Sail’s areas of study include music and recording, games, art and design, film and television, technology, media and communications, business, and sports marketing. Full Sail graduate credits include work on OSCAR®, Emmy®, GRAMMY®,…