Skip to content

Instantly share code, notes, and snippets.

View luciancj's full-sized avatar
🚽
I may be slow to respond.

Lucian Cojocaru luciancj

🚽
I may be slow to respond.
View GitHub Profile
@luciancj
luciancj / University Origin Creator.sql
Created October 11, 2025 13:22
Complete, named-constraint DDL for a small SIS schema used in DB modeling labs. Targets Oracle 12c+ (uses identity columns). No data is inserted—this script only defines tables, keys, and checks as required by the assignment.
/* ============================================================
Student Information System – Exercise 1.2
Complete SQL DDL with all constraints and concise comments
(Oracle SQL Developer compatible)
============================================================ */
---------- Table: student ----------
CREATE TABLE student (
id NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY, -- artificial numeric key (PK)
code VARCHAR2(64) NOT NULL, -- alphanumeric business key (unique)