views:

81

answers:

2

Hello,

This is the first time i am working with the object oriented databases.I was associated with the RDBMS for past few years. But now.. coming to this world of object oriented databaseS, I am kind of concerned about the aftermaths of the creation or design of the db. My concern is the population or Migration of this object oriented databases from the RDMS database. That is going to be one of my tasks.

I am wondering what kind of challenges should i be prepared for the migration piece , while we are designing these databases.

Any inputs ??

A: 

I am a upcoming DBA, i am not writing any java code, but.. there are is so much inheritance going on, tight coupling between tables, and also i can give an example, like

 CREATE TABLE [dbo].[A](
[application] [varchar](50) NULL,
[category] [varchar](50) NULL,
[corporateCode] [varchar](50) NULL,
[critical] [bit] NULL,
[initialCondition] [varchar](50) NULL,
[initialLossOfLife] [decimal](3, 2) NULL,
[installationDate] [date] NULL,
[lotNumber] [varchar](50) NULL,
    [BID] [int] NOT NULL,

  CONSTRAINT [PK_A] PRIMARY KEY CLUSTERED 
 (
[AID] ASC
  )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =              OFF,           ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
 ) ON [PRIMARY]

GO

SET ANSI_PADDING OFF GO

  ALTER TABLE [dbo].[A]  WITH CHECK ADD  CONSTRAINT [FK_BID] FOREIGN KEY([B])

REFERENCES [dbo].[B] ([BID]) GO

     CREATE TABLE [dbo].[B](
[BID] [int] NOT NULL,
    CONSTRAINT [PK_B] PRIMARY KEY CLUSTERED 
   (
[BID] ASC
   )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF,          ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
  ) ON [PRIMARY]

 GO

  ALTER TABLE [dbo].[B]  WITH CHECK ADD  CONSTRAINT [FK_B_A] FOREIGN KEY([BID])
  REFERENCES [dbo].[A] ([AID])
  GO

  ALTER TABLE [dbo].[B] CHECK CONSTRAINT [FK_B_A]
  GO

How would be an insert possible in this kind of design even from the Presentation layer?

pkat
+1  A: 

So this is really a SQL database? I don't think the question has anything to do with what most people will understand as a "Object Oriented" database.

It looks like your database is unusable in the form you posted it. You cannot insert rows unless you remove or disable one of the foreign key constraints - at least temporarily. One way to do that is to use a "deferable" constraint. However, it looks as if you may be using Microsoft SQL Server, which does not support deferable constraints.

dportas