Author Topic: Database or schema  (Read 1210 times)

tortue

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Database or schema
« on: November 28, 2014, 01:41:01 am »
Hello,

I am currently working with EA and multiple repositories in DBMS mode.

In the EA documentation, it's written that i should use a new database for each repository. Instead of that, I created a schema per repo and a new user using this new schema as default (SQLServer). EA seems to work fine like that.
In this way, I have multiples repos in just one database.

Can you confirm this approach is correct ?

Will schema model instead of database model be supported by further EA realeases ? Or sould I definietly use a new database per repo instead of schema ?

Thanks.
« Last Edit: November 28, 2014, 01:43:12 am by tortue »

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Database or schema
« Reply #1 on: November 28, 2014, 02:12:40 am »
One scheme holds one repository. But a repository can have multiple roots (each standing for a single project). You can use either or both depending on what your requirements are.

q.

tortue

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Database or schema
« Reply #2 on: November 28, 2014, 02:19:20 am »
Thanks for your answer, qwerty.

I understand well the 1DB (or 1 schema ) / 1 repo and multiple roots in each repo (I use multiple repos to forbid read access between each (critical) projects set), but should I choose 1 database per repo or 1 schema per repo ?

- In the EA documentation, it is told 1DB / 1repo, the schema solution does not appears.
- It seems there is no way in EA configuration to specify some schema to work with when connected to some database. According to the tests I did, the schema shall be set as the default schema to DBMS EA's user to get EA working.

So the question is:
Is working with a schema a best practice ? Will it still work in further EA releases ?

Thanks.

PS: My current solution is :

1 Database having N schema.

For each Schema,
       I have a user.
       This user has the current schema as it's default Schema.

When starting EA, I choose one of the users to connect to the DBMS.
EA then fetchs data from the default user schema and displays my repo in it's UI.
« Last Edit: November 28, 2014, 02:30:15 am by tortue »

qwerty

  • EA Guru
  • *****
  • Posts: 9822
  • Karma: +190/-154
  • I'm no guru at all
    • View Profile
Re: Database or schema
« Reply #3 on: November 28, 2014, 10:57:25 am »
Maybe there's some misunderstanding. Your config is fine and will work also in future. A schema is part of a database. You can have multiple schemes in a single database. So your database can also host multiple EA repositories.

q.

tortue

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Database or schema
« Reply #4 on: November 28, 2014, 07:10:27 pm »
Thank you qwerty, this is the answer I expected.