Browsed by
Author: priya

How will you represent a hierarchical structure shown below in a relational database? or How will you store a tree data structure into DB tables?

How will you represent a hierarchical structure shown below in a relational database? or How will you store a tree data structure into DB tables?

The hierarchical  data is an example of the composite design pattern. The entity relationship diagrams (aka ERdiagram) are used to represent logical and physical relationships between the database tables. The diagram below shows how the table can be designed to store tree data by maintaining the adjacency information via superior_emp_id.   As you can see the “superior_emp_id” is a foreign key that points to the emp_id in the same table. So, Peter has null as he has no superiors. John and Amanda points to  Peter who is their…

Read More Read More

I have a table which has lot of inserts, is it a good database designto create indexes on that table

I have a table which has lot of inserts, is it a good database designto create indexes on that table

Insert’s are slower on tables which have indexes, justify it?or Why do page splitting happen? All indexing fundamentals in database use “B-tree” fundamental. Now whenever there is new data inserted or deleted the tree tries to become unbalance. Creates a new page to balance the tree.Shuffle and move the data to pages. So if your table is having heavy inserts that means it’s transactional, then you can visualize the amount of splits it will be doing. This will not only…

Read More Read More

What are indexes? What are B-Trees

What are indexes? What are B-Trees

Index makes your search faster. So defining indexes to your database will make your search faster.Most of the indexing fundamentals use “B-Tree” or “Balanced-Tree” principle. It’s not a principle that is something is created by SQL Server or ORACLE but is a mathematical derived fundamental.In order that “B-tree” fundamental work properly both of the sides should be balanced.

What is Data Mining

What is Data Mining

Data mining is a concept by which we can analyze the current data from different perspectives and summarize the information in more useful manner. It’s mostly used either to derive some valuable information from the existing data or to predict sales to increase customer market. There are two basic aims of Data mining:- Prediction: – From the given data we can focus on how the customer or market will perform. For instance we are having a sale of 40000 $…

Read More Read More

What is ETL process in Data warehousing? What are the different stages in “Data warehousing

What is ETL process in Data warehousing? What are the different stages in “Data warehousing

ETL (Extraction, Transformation and Loading) are different stages in Data warehousing. Like when we do software development we follow different stages like requirement gathering, designing, coding and testing. In the similar fashion we have for data warehousing. Extraction:- In this process we extract data from the source. In actual scenarios data source can be in many forms EXCEL, ACCESS, Delimited text, CSV (Comma Separated Files) etc. So extraction process handle’s the complexity of understanding the data source and loading it…

Read More Read More

What is Snow Flake Schema design in database? What’s the difference between Star and Snow flake schema

What is Snow Flake Schema design in database? What’s the difference between Star and Snow flake schema

Star schema is good when you do not have big tables in data warehousing. But when tables start becoming really huge it is better to denormalize. When you denormalize star schema it is nothing but snow flake design. For instance below customeraddress table is been normalized and is a child table of Customer table. Same holds true for Salesperson table.

What are Fact tables and Dimension Tables ? What is Dimensional Modeling and Star Schema Design

What are Fact tables and Dimension Tables ? What is Dimensional Modeling and Star Schema Design

When we design transactional database we always think in terms of normalizing design to its least form. But when it comes to designing for Data warehouse we think more in terms of denormalizing the database. Data warehousing databases are designed using Dimensional Modeling. Dimensional Modeling uses the existing relational database structure and builds on that. There are two basic tables in dimensional modeling:- Fact Tables. Dimension Tables. Fact tables are central tables in data warehousing. Fact tables have the actual…

Read More Read More

What are Data Marts

What are Data Marts

Data Marts are smaller section of Data Warehouses. They help data warehouses collect data. For example your company has lot of branches which are spanned across the globe. Head-office of the company decides to collect data from all these branches for anticipating market. So to achieve this IT department can setup data mart in all branch offices and a central data warehouse where all data will finally reside.

What is Data Warehousing

What is Data Warehousing

Data Warehousing is a process in which the data is stored and accessed from central location and is meant to support some strategic decisions. Data Warehousing is not a requirement for Data mining. But just makes your Data mining process more efficient. Data warehouse is a collection of integrated, subject-oriented databases designed to support the decision-support functions (DSF), where each unit of data is relevant to some moment in time.

What is SQLinjection

What is SQLinjection

It is a Form of attack on a database-driven Web site in which the attacker executes unauthorized SQL commands by taking advantage of insecure code on a system connected to the Internet, bypassing the firewall. SQL injection attacks are used to steal information from a database from which the data would normally not be available and/or to gain access to an organization’s host computers through the computer that is hosting the database. SQL injection attacks typically are easy to avoid…

Read More Read More