Re: Parameterization of Object Models



Lock down Access to the system --

Standard file replication is a second way to provide access to different
processes, as well as for maintaining a distributed database where access
may be affected by scheduled update reports, and data updates affecting
foreign countries, or other isolated groups of records.

Microcomputer record-locking systems are less sophisticated than mainframe
DBMSs. The burden is placed moreso, on the programmer if complex
interactions involving pairs of records (possibly opened by altenate users)
will become involved. The types of microcomputer DBMS which is fairly
common offers the following features:

1. Programs can lock a whole table or an individual row within a table, but
only one or the other. As long as one pgogram has a row or table locked, no
other program may access that row or table.

2. Programs can release any or all of the locks they currently hold.

3. Programs can inquire whether a given row or table is locked.

Therefore, when writing programs follow the guidelines for writing programs
for a shared-update environment:

1. If more than one row in the same table must be locked during an update,
the whole table must be locked.

2. When a program attempts to read a row that is locked, it may wait a short
period of time and then try to read the row again. This process could
continue until the row becomes unlocked. It usually is preferable, however
to impose a limit upon the number of times a program may attempt to read the
row. In this case, reading is done from within a looop, which proceeds
until either a (the reald is successful, or (b) the maximum number of times
that the ptogram can repeat the operation is reached. Notify the user of
the problem, should the loop be executed without the record access being
gained. Another attempt to try the same update again can be requested by
the user at that point also. Or move on to something else.

3. Attempt to prevent deadlocks see The Concepts of Database Management, 2nd
Edition, pp170. What is proposed is this common approach. For every
program in the system attempts to lock all of the rows and/or tables that it
needs, before beginning an update. Assuming it is successful in this
attempt, then each program can perform the required updates. But, if any
row or table that the program needs already is locked, then this program
should immediately release all the locks that it currently holds, wait some
specified period of time, and then try the entire process again. In
effect, this precedureassures that any program that encounters a problem
wimmediately will get out of the way of all other programs, rather than
become involved in a possible deadlock situation.

4. It is important that no user keeps rows or tables locked any longer than
necessary. Especially for online update TPS programs. The trick used, for
this is to read all of the information that is needed, and then immediately
release all locks. After the user has entered all new data, the update
takes place as described above, that is - attempt to lock all required rows,
proceed with the update is successful, or release all locks if not
successful. But makek certain, before writing that no other user has
updated the data in your updated records, in the meantime. If the same
record was updated whicle you were also updating the same record, then a
notification has to sow the current status of the record, and it should not
be overwritten improperly. Use a flag to check the current update status of
each record, before overwriting it. see The Concepts of Database Management,
2nd Edition, pp. 171.


d) - a backup and recovery mechanism for recovering the database in the
event the database is damaged in any way, should be used.

A database can be damaged or destroyed in a number of ways. Users can enter
data which is incorrect; programs that are updating the data can terminate
abnormally during an update, a hardware problem can also occur. After these
occurrences, the database may contain invalid data, or it may have become
corrupted or destroyed. this can not go uncorrected, and the database must
be returned to a corect state. The processing for doing this is called
recovery; that is, you say that you recovered the database.

If indexes were the only part of the database damaged, not data itself, then
a DBMS will provide a feature you can use to repair the database
automatically to recover it.

The simple approach to recoveryt involves periodically making a copy of the
database (called a backup or a save). Under stress, the database can be
recovered by returning the database to the state which it was in when the
last backup was made.

A sophisticated database such as an Oracle 10g system will maintain thables
of the actions with took place and it can automatically return the database
to a prior condition, with only the command of the database administrator.
Logs of all of the updates to the database are maintained, in order to
prevent the database failure from interrupting the operation of the
business.

For a microcomputer DBMS, the solution os often only to make backup copies
by using the facilities of the DBMS which allow files to be copied to an
external media backup device. If this is not acceptable, ten features which
the DBMS does not provide must be written into the application programs.
Each of the programs that updates the database, for example, also could
write a record to a separate file, the log, indicating the update that had
taken place. A separate program cou;d be written, to look at the log file
and to recreate all of the updates indicated by the records in the update
file. This recovery process would then consist of (a) copying the backup
over the actual database and, (b) running this special program to perform
updates to the records which were modified between the time of the saved
copy, and the database failure. This is an approach which simplifies the
recovery process for the users of the system, but the programming can be a
little more complicated.

e) -

good night Harrison - That's the statue of Liberty - This is Earth Planet of
the Apes.. final scene


"Marco van de Voort" <marcov@xxxxxxxx> wrote in message
news:slrnh27b3i.2900.marcov@xxxxxxxxxxxxxxxxxx
On 2009-06-01, Tony <tony@xxxxxx> wrote:
Apparently, there is a nebulous area of computer language science that
is
Object Models. Or is there?

Object model implementation/paradigm can make or break a language (IMO,
as I
seek to abandon C++ with that reason as high on the list of reasons).

Well, any language feature has somebodies toes curling.

OO is now historically discoverable and assessable. What are the
"parameters of goodness", parameters in general, and such for computer
programming language object models?

There is no "in general", it depends on the application. Are you
programming
a realtime medical system, or scripting together Excel?

However to not make this an entirely negative one, here are some IMHO
points:

My starting points: must be reasonably statically compilable, at least as
an
option, and doesn't have to be guaranteed "safe", IOW may contain
pointers.

- There doesn't have to be only one. One can perfectly have a highlevel,
reference based classtype and another one one level above a struct for
lowlevel work.
- I prefer not to have to declare pointers manually for every class. IOW a
class is a reference
- I prefer my daily string type not to be an objects. A paradox; a less
orthogonal system being cleaner in practice. This is a general point,
not everything needs to be an object or boxable to it.
- I like interfaces, or at least some form of limited MI. I think I don't
need full MI, but while I have dabbled with C++ a bit, I know that in
some aspects I was programming Delphi in C++, so I might not have
gotten
the full experience of that (contrary to e.g. templates where I really
dove in)

--------------------------------

I've been thinking about introspection a lot lately, mostly due to rumours
that Delphi is going to increase it up in future versions. (without much
details yet)

The problem being a bit that while nice it leads to extremely big binaries
in the statically compiled case, and possibly some missed optimization
options.
There are also reverse engineering aspects (being able the get the real
identifier names when decompiling)

Currently I lean to having global (per module) directives to govern RTTI
visibility per visibility modifier (public,private etc) with directives
being able to make exceptions for specific identifiers. This because I
dislike making this a mandatory micromanagement operation, while I want to
keep some control when implementing the base classes in the runtime.




.



Relevant Pages

  • Re: How can I back up a log-shipped database?
    ... This means that a later log backup from the production database will not just be ... able to add the log records to the log-shipped database, because the transaction log has been ... It's clear I don't understand the whole RECOVERY business. ...
    (microsoft.public.sqlserver.server)
  • Re: Audacity and Gentoo
    ... > What's the UPS, btw? ... Still, a difference system would save a lot of space, unless database ... It would also be useful in case of data recovery as you'd at least be ... > Backup and Point-In-Time Recovery'). ...
    (uk.comp.os.linux)
  • Re: How can I back up a log-shipped database?
    ... When you bring a db out of standby mode, you get the recovery ... log backup onto this, as the log records in that log backup are totally out-of sync with the database you have ... Or MS would need to change SQL Server so it allow us to do a backup of a database in STANDBY mode. ...
    (microsoft.public.sqlserver.server)
  • Re: Shared databases and improving reliability
    ... For me that's one of the major tasks of a database! ... The mere job of data conversion is rather cumbersome for FMP itself ... After recovery the 700 000 records where available ... The backup solution ...
    (comp.databases.filemaker)
  • Re: Oracle: how to demonstrate successful restore?
    ... > We could always backup the database in tape, but we might NEVER get it ... That's called a black hole backup. ... tape could be bad after leaving there for a while. ... Are you sure that the tape is ripe enough for a recovery ...
    (comp.databases.oracle.server)