Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
What is "db" in Prisma datasource block?

In Prisma For MongogDB quick start guide, they wrote something like the following

datasource db {
provider = "mongodb"
url      = env("DATABASE_URL")
}

My question is what is "db" right after "datasource" keyword?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The value db is tied to the name of the datasource in your schema file.

datasource db is a convention - however, you can give your data source any name - for example, datasource mysql or datasource data.

Here's a reference for datasource which should be helpful.

In your schema file when using native database types you need to refer to the datasource name which is defined. So if your datasource is defined as data you would refer the native type as @data.String instead of conventional @db.String

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!