-- code SQL 5.11 
-- Documente les relations entre les tables 
SELECT TOP (50) [RelationshipId]
      ,[FromObjectName] as 'De la table'
      ,[ToObjectName] as ' à la table'
      ,[TypeOfRelationship] as 'TypeDeRelation'
      ,[SecurityFilteringBehavior] 'ComportementFiltrageSecurité'
      ,[IsActive] as 'estactive'
      ,[RelyOnReferentialIntegrity] as 'Intégrité référentielle'
      ,[CrossFilteringBehavior] as 'ComportementRelationCroisée'
      ,[CreatedAt] as 'dateCréation'
      ,[UpdatedAt] as'DateMAJ'
      ,[DatamartObjectId] 
  FROM [metadata].[relationships]