New DBMS under investigation

From: Sebastian <sebastian.gomez_at_upc.es>
Date: 2000/09/20
Message-ID: <39C8B9B9.CA064604_at_upc.es>#1/1


(Please excuse me for my poor english)

Title: SDB--> The DataBase Management System oriented to the Entity-  model.

The SDB-DBMS is proyected to minimize the process of translation form the
design made with a semantic model like EER-Chen or YMS to its implementation
in a DBMS.

>>> Here i only explain the main property: Role that relationships play <<<
>>> on this DBMS.<<<

Please, let me to go over some concepts to get same languaje (perhaps we don't
use same terms):

                                   / \
|------------| min:max            /   \          min:max |------------|
| Entity 'A' |-------------------/ Rel \-----------------| Entity 'B' |
|------------|                   \ 'R' /                 |------------|
                                  \   /


In the current models:
Conceptual Model (EER-Chen)| Relational Model (DBMS)


   Entity                  |  Table
   Relationship            |  Table

Something like:

   ...
   (Conversions to the relational model)    ...

   create table A...
   create table B...
   (create table R...)


In this model (SDB):
Conceptual Model (EER-Chen)| Physic Model (SDB)


   Entity                  |  Table
   Relationship            |  Relationship

Now will be
create table A...
create table B...
create relationship R (A,multiplicity of A, B, multiplicity of B, ...)

Now you can import directly your conceptual model to the physic model, no
changes are required.

The main question is how to build a class that implements the Relationships:
- This class should implements foreign keys and attributes - This class should manage automatically its registers and the integrity

   following four rules:

      · Entity Integrity 
         Primary keys would not be null nor duplicated.
      · Reference Integrity 
         Values of foreign keys only can be values of the primary key 
         referenced or null.
      · Domain Integrity 
         
      · Relationship Multiplicity Integrity 
         Given the multiplicities in a relationship there will not be
any 
         register that not keep this multiplicities.


The first three rules are common to relational DBMS's, but fourth isn't. Problems:

Example for explanations:

                                    /\
|------------| 0:N                /    \              1:1 |------------|
|  Employee  |------------------/ belong \----------------| Department |
|------------|                   \      /                 |------------|
                                   \  /


· Translation:
Employee --> 1:1 --> Department

   One employee belongs at least to 1 Department    One employee belongs no more than one Department Department --> 0:N --> Employee

   To one Department can belong from none to undefined number of employees.

The SDB system behaviour:
INSERTIONS
- When you insert one register into Department there will not be any problem.
- When you insert one register into Employee there will be problems because:

   this employee is forced to belong to one Department, but you can't insert

   this employee on the belong relationship because it doen't exists yet.

   This problem will be resolved throught transactions (only errors will be

   checked at commit time).
- When you insert one register into belong sure that this employee will

   belong to more than one department, so this will return a constraint error.

DELETIONS
- When you delete one register from Employee the only one problem is to delete

   the register in the belong relationship that references this employee.
- When you delete one register from Department it must be deleted from the

   belong relationship. Now the DB is unstable. To solve this problem, the

   belong relationship must delete all employess that are registered to this

   department (cascade).
- When you delete one register from belong this employee will not be assigned

   to none department, so this employee will be deleted (cascade).

I've solved all these problems in a preview model implemented in C++ and designed under UML model.

Now this DBMS is not fully operational because it is only a project to determine its advantages. Actually you will be able to create databases with users, tables, relationships, simple queries, and manage their data.

I've tested it and I haven't found any problem.

For doubts, advices or if you want more information or reprimands e-mail me:
bitrunner_at_terra.es Received on Wed Sep 20 2000 - 00:00:00 CEST

Original text of this message