Friday 29 September 2017

Meta Data of Greenplum Database



 When I learn any of the Databases, after knowing the basic architecture I always try to dig in Meta- Data of that database. Knowing meta- data always help me to handle that database smartly. Generally Meta-Data is for DBA but still it’s much helpful for the Database developer.
 What is Meta- Data?  Meta –Data is data about data. Every Database having a set of system table that stores the information about the data. For example when you create a table and specify the column and their data type, constraints etc. these all information store in to Database system tables that is called Meta data for that table. When we perform any of DML on that table database engine will check that Meta data if operation is not violating the constraints then it success else fail with the error.
How Meta- Data helps? 
  • Suppose I want to know how many of my table is having column data type as BIT?
select * from information_schema.columns where data_type='bit'
  • How many tables belong to a particular schema?
    select * from information_schema.tables where table_schema='schemaname'
  • What all Aggregate function Greenplum database provides?
            select * from pg_aggregate order by 1
There is so many useful information we can query from the Database Meta-Data, I will keep writing J




1 comment:

Data Mesh

  Data Mesh is a relatively new approach to managing and organizing data within organizations, especially large enterprises. It advocates fo...