Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Data modeling question

Data modeling question

2005-05-11       - By Mercadante, Thomas F (LABOR)

Reply:     1     2     3     4     5     6     7     8     9     10  

Jeff,

Have you thought of something as simple as an additional column with a
check constraint of values 1 thru 6?  And then make this a part of the
primary key of the child table:

Table B
PK DB_NAME
PK SCHEMA_NAME
PK RECORD_NUMBER   <=3D=3D=3D values of 1 thru 6 only.
  USR_ID          -- user (authority)
  AUTH_INDICATOR  -- change authority
  USR_INDICATOR   -- user authority

Simple but effective.

Hope this helps.

Tom


-- --Original Message-- --
From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] On Behalf Of Thomas Jeff
Sent: Wednesday, May 11, 2005 8:38 AM
To: oracle-l@(protected)
Subject: Data modeling question

I was wondering if there was an elegant way to model (or implement the
business rule)=3D20
for those situations where the requirement in a parent-child
relationship is such=3D20
that there a quantity restriction on the child table.  =3D20

Consider the following two tables:

Table A            Table B
DB_NAME            DB_NAME
SCHEMA_NAME        SCHEMA_NAME
                  USR_ID          -- user (authority)
                  AUTH_INDICATOR  -- change authority
                  USR_INDICATOR   -- user authority

In a nutshell, the rule is that there can be no more than 3 change or
user
authorities for the given database/schema.   A given user can be either
or both a change=3D20
and user authority for a specific database/schema, and can be an
authority for multiple
database/schemas.   So, given the model/business rule, there could be
anywhere from 3=3D20
to 6 child records for a given database/schema.

When first presented with this model, my initial thought was to add a
shadow table to Table B,=3D20
using before triggers to implement the business rules, and after
triggers to maintain the=3D20
shadow table.=3D20

I'm sure this problem has cropped up before and would appreciate knowing
how you implemented
such a requirement.

Thanks.

-- ---- ---- ---- ---- ---- ---- ---- ------
Jeffery D Thomas
DBA
Thomson Information Services
Thomson, Inc.

Email: jeff.thomas@(protected)

Indy DBA Master Documentation available at:
http://gkmqp.tce.com/tis_dba
-- ---- ---- ---- ---- ---- ---- ---- ------


--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l