INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Schemas, Databasebanks, Databases?!

Schemas, Databasebanks, Databases?!

(OP)
Hi all,

I'm trying to get to know Mimer. I kinda like it - it's quite capable, but still very small.

I come from a background of Oracle (a long time ago) and recently InterBase and Firebird ( I know them both very well :).

I'm sending this post to make sure if I understand the Mimer terminology... (yes, I've been doing some reading). If you have comments on these items, please don't hestitate to let me know!!

It seems that a Database is a running instance of the Mimer server, right?

If so, Databanks seems to be the actual files that Mimer uses to store your stuff.

Next, a Databank can hold multiple Schemata, and you only backup a Databank, never a single Schema, still right?

In order to connect, you need to locally register a database (server) instance and you can optionally create an ODBC datasource for it... Once connected, you have access to different schemata, depending on the username you used to connect.

Each ident (server/database user) by default get's a schema - unless you specify the NO SCHEMA attribute.

In each schema, you can have multiple database objects like tables, domains, foreign keys etc...

Another question:
If you create an application, do you use multiple schemas or do you tend to use a single schema per application and create additional user-logins without schemas that use your app/schema?


Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

RE: Schemas, Databasebanks, Databases?!

FYI as I understand it (warning I am new to Mimer too)

A Database (handler) is an instance of Mimer running somewhere.

Databanks are the files where stuff goes.

Schema are a logical grouping of objects owned by the schema owner. Can have the same object name in different schema, ie schemaA.table1 and schemaB.table1 is OK.

Objects each belong to a schema are created in a databank as specified in the Create ... statement. Therefor schema can be spread across several databanks.

In order to connect, you need to locally register a database (server) instance and you can optionally create an ODBC datasource for it... Once connected, you have access to different schemata, depending on the username you used to connect. - Agree.

Idents get schemas unless 'No Schema', Schemas have multiple objects.

With an application, I would create a single schema for each distinct app - perhaps with modular design seperate schemas would be good on big systems.

Doesn't Oracle also use a 'schema' type of qualifier for objects - ie, sello.table1?

RE: Schemas, Databasebanks, Databases?!

(OP)
I believe Oracle (it's been some time) uses the same construct with Schemas per user (ident).

What differs though is that Database is just a collection of objects (tables etc) and it's data. I really got confused about this with Mimer :)

So if you're developing, you tend to connect to a single schema - right?

Do you use synonyms?

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

RE: Schemas, Databasebanks, Databases?!

Typically you will have several types of users of an application that are allowed to do different things in the database.

To ease the administration you create a GROUP (create ident as group) for each type of user (for example app1admin, app1normal, app1readonly (with better names)). Then, when you add a new user to the system, you can give him/her all the needed access rights by: GRANT MEMBER ON GROUP app1normal TO user1.

Another useful feature is to use program idents (create ident pgm1 as program identified by 'passw'). You then let the program ident own all the database tables. The application first connects as usual to the database and then the application performs ENTER 'PGM1' USING 'passw'. If the user (or he is a member of a group that) has been given EXECUTE on PGM1 the enter statement succeeds.

The point of this is that the user is allowed to modify the database only if he/she is running the application designed to change the database. If he/she loggs in via an interactive SQL utility he/she does not have any privileges to do anything to the data.

RE: Schemas, Databasebanks, Databases?!

(OP)
And how do you use schemas?

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

RE: Schemas, Databasebanks, Databases?!

The program ident has the schema (with the tables and views), and after performing enter the application has the entered program as its default schema. So the program does not have to qualify table names. This gives one schema per application (i.e. I agree with sello2 on this).

Sometimes "end users" are allowed to do reporting on views of the data. In this case he/she uses some reporting tool, and most tools lets the user pick a qualified (ident.table) table name from a list, so synonyms are typically not needed.

RE: Schemas, Databasebanks, Databases?!

(OP)
ok - thanks for the info...

btw, what do you currently use for developing with Mimer?

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

RE: Schemas, Databasebanks, Databases?!

I use Visual Studio and ODBC as database interface.

RE: Schemas, Databasebanks, Databases?!

I use JSP, Java, JDBC and Mimer.

I get confused about schemas. I never use this term. Every table or view has an owner, so the full name for a column would be

owner.table.column

In my application we use one admin user, which is the owner of the table and the user that is performing all operations throw the web interface. Then we have a readonly user and we do synonyms for convienience.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close