开发者

Object Oriented databases

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 ??


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.


i have made an answer here before, hope it will help

Relational db

  • SQL and standards
  • easy to model
  • can use only standard and vendor types
  • referential integrity (matematically solid relational set theory)
  • lot of tools and database implementations
  • data separate from program
  • storage management and high end infrastructure support
  • transaction and concurrency management done within
  • Relational Model is Value-Based ie rows are identified by primary keys

Cons

  • no custom type
  • no extensible data types
  • impedance mismatch
  • cannot express nested relationship
  • cannot use complex entities as a single unit
  • need to define keys and various types of relationships at the data model level
  • write procedures for versioning, transactions if needed

Object DB

  • High performance
  • Faster as no joins required
  • Inherent versioning mechanism
  • Navigational interface for operations (like graph traversal)
  • Object Query Language retrieve objects declaratively
  • complex data types
  • object identity ie. equals() in which object identity is independent of value and updates
  • facilitates object sharing
  • classes and hierarchies (inheritance and encapsulation)
  • support for relationships
  • integrated with a persistence language like ODL
  • support for atomicity
  • support for nested relationships
  • semantic modelling

Cons

  • No mathematical foundation as RDB (refer Codd)
  • cons of object orientation
  • persistence difficult for complex structures, some data must be transient

Object-Relational databases (You might have seen UDTs!)

  • support for complex data types like collection, multisets etc
  • object oriented data modelling
  • extended SQL and rich types
  • support for UDT inhertance
  • powerful query language

Different approaches (OO, Relational DB or OODB) may be necessary for different applications

References

The advantage of using relational databases for large corpora

Relational Database Relational Database

OODMS manifesto

ODMG

Benefits of a relational database

The Object-Oriented Database System Manifesto

Object Oriented Database Systems

Object Relational Databases in DBMS

Completeness Criteria for Object-Relational Database Systems

Comparisons

http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems

http://en.wikipedia.org/wiki/Comparison_of_object_database_management_systems

http://en.wikipedia.org/wiki/Comparison_of_object-relational_database_management_systems


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜