Hi, I want to change my RDBMS to HBASE schema, to be used with Hadoop platform.
I have changed two RDBMS tables into HBASE tables. I have ignored constraints, indexes and foreign key relationship. Because I dont know how to convert these relationships in Hbase schema. Please confirm if the change I have made is correct? Relational Schema of tables are: ========================== TABLE : ASSTES ------------------------------------------------------------------ CREATE TABLE [dbo].[Assets]( [AssetId] [int] NOT NULL, [AssetName] [varchar](50) NOT NULL, CONSTRAINT [PK_Assets] PRIMARY KEY CLUSTERED ( [AssetId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] ------------------------------------------------------------------------------------------------------------------------------- -------------------------------- TABLE: Instruments ---------------------------------- CREATE TABLE [dbo].[Instruments]( [InstrumentId] [int] IDENTITY(1,1) NOT NULL, [AssetId] [int] NOT NULL, [Symbol] [varchar](50) NOT NULL, [Name] [varchar](250) NOT NULL, [Created] [datetime] NOT NULL, [Modified] [datetime] NULL, [Comments] [varchar](250) NULL, CONSTRAINT [PK_Instruments_InstrumentId] PRIMARY KEY CLUSTERED ( [InstrumentId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], CONSTRAINT [PK_Instruments_InstrumentIdAssetId] UNIQUE NONCLUSTERED ( [InstrumentId] ASC, [AssetId] 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 ON GO ALTER TABLE [dbo].[Instruments] WITH CHECK ADD CONSTRAINT [FK_Instruments_Assets] FOREIGN KEY([AssetId]) REFERENCES [dbo].[Assets] ([AssetId]) ON UPDATE CASCADE GO ALTER TABLE [dbo].[Instruments] CHECK CONSTRAINT [FK_Instruments_Assets] GO ALTER TABLE [dbo].[Instruments] ADD CONSTRAINT [DF_Instruments_Created_1] DEFAULT (getdate()) FOR [Created] GO ==================================== HBASE CONVERSION OF ASSTES AND INSTRUMENTS tables: ==================================================================== Assets table =============== RowKey -- AssetID ColumnFamilies (AssetName ) ---- ColumnName - (Name) Instruments table ============== RowKey - InstrumentID ColumnFamilies - (Content) --- Columns: Symbol, Name, Created, Modified, Comments (Assets) --- Columns: AssetID Please confirm if given conversion is proper? Also, how do i convert constraints and indexes and foreign key relationship? Thanks in advance Regards, rashmi -- View this message in context: http://old.nabble.com/RDBMS-to-HBASE-schema-migration-tp34087951p34087951.html Sent from the HBase User mailing list archive at Nabble.com.
