2 votes

Fortnightly Programming Q&A Thread

General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

Don't forget to format your code using the triple backticks or tildes:

Here is my schema:

```sql
CREATE TABLE article_to_warehouse (
  article_id   INTEGER
, warehouse_id INTEGER
)
;
```

How do I add a `UNIQUE` constraint?

3 comments

  1. [2]
    EgoEimi
    Link
    May anyone recommend an excellent text on object modeling? I wish to become more eloquent and articulate.

    May anyone recommend an excellent text on object modeling? I wish to become more eloquent and articulate.

    2 votes
    1. mainmeister
      Link Parent
      "Object Modeling for Designers: An Introduction" by Heidi Adkisson on Medium: This article provides an introduction to object modeling, explaining how it is a visual representation of a system's...
      1. "Object Modeling for Designers: An Introduction" by Heidi Adkisson on Medium: This article provides an introduction to object modeling, explaining how it is a visual representation of a system's objects, actions, and associated attributes. It also discusses how object models can be used in conjunction with design systems to create a consistent user experience (https://hpadkisson.medium.com/object-modeling-for-designers-an-introduction-7871bdcf8baf).

      2. "The Basics of the Object Model" on the Engineering Education (EngEd) Program - Section.io: This resource provides a comprehensive understanding of the object model, viewing an information system as a set of objects and classes. It covers the fundamentals of the object model and its significance in software development (https://www.section.io/engineering-education/basics-of-the-object-model/).

      3. "Object model" on Wikipedia: This Wikipedia article explains the concept of object modeling as a collection of objects or classes that a program can examine and manipulate to represent specific parts of its world. It provides an overview of the object-oriented approach and its application in software engineering (https://en.wikipedia.org/wiki/Object_model).

      You can explore these sources to gain a better understanding of object modeling and its various aspects.

      1 vote
  2. mainmeister
    Link
    CREATE TABLE article_to_warehouse ( article_id INTEGER unique not null , warehouse_id INTEGER ) ;
    CREATE TABLE article_to_warehouse (
      article_id   INTEGER unique not null
    , warehouse_id INTEGER
    )
    ;