title: Can a unique key ( not a primary key) be a foreign key to other table?
body: <p>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</p>
  
  <p>the DDL for the tables are</p>
  
  <pre><code>CREATE TABLE students (
    id             NUMBER,
    username       VARCHAR2(30),
    password       VARCHAR2(30),
    firstname      VARCHAR2(30),
    lastname       VARCHAR2(40),
    email          VARCHAR2(300),
    dob            VARCHAR2(20),
    alt_email      VARCHAR2(300),
    street_address VARCHAR2(50),
    address_2      VARCHAR2(50),
    city           VARCHAR2(30),
    state          VARCHAR2(30),
    zip            VARCHAR2(10),
    country        VARCHAR2(60),
    telephone      VARCHAR2(10),
    CONSTRAINT student_id_pk PRIMARY KEY (id),
    CONSTRAINT student_username_uk UNIQUE (username)
  );
  
  CREATE TABLE studentsprofilepic (
    id       NUMBER,
    photo_id NUMBER,
    photo    BLOB,
  
    PRIMARY KEY (photo_id),
    FOREIGN KEY (username) REFERENCES students (username)
  );
  </code></pre>