3

I see that PostgreSQL has an array data type. What is it used for? When is the best situation to use it?

1

1 Answer 1

2

Defining a column as an array usually means that you have a denormalized model because the content of that array could also be stored as a 1:n relationship.

But the sometimes it makes sense to do so especially if you always treat the "list" as "one thing". It's hard to give concrete examples though. If you can't think of anything, you probably don't need it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.