Are you on a limited budget but looking for free ways to extract data from files without using expensive online tools or companies that you will have to pay? Join us here for an overview of some tools and techniques that you most likely have access to already.
When working with databases in your data analytics projects, most likely you will deal with more than one table. As a result in certain scenarios there will be a link between the tables
This will ensure that you can use data from the two or more tables that can be joined together. But how would you do that?
In order to join two tables, you will need columns in both tables that have values that are unique and of similar values.
In other words you need to create what is called aprimary key, its characteristics are as follows:
Its values are unique.
They cannot be null.
So where does a foreign key come in? Say we have two tables Table A and Table B.
Table “Customer Table” will have a column that has a primary key call Customer_No
Table “Sales Table” also has a column with a primary key called Sales_No.
Now we cant join the two tables, because the primary keys are different, and will have different values
But in the Sales Table, we will have an additional column called Customer_No, and it will hold some of the unique values that are held in the Customer Table, Customer_No column.
This Customer_No in the Sales Table is called the foreign key. It is unique, has null values and can be connected to a primary key column Customer_No on the Customer Table.
In this way tables can be connected where values in columns are not always the primary key of a table.
So let’s look at tables in SQLite and see how this works in practice.
Below you have a Customer Table and the Sales Table
In both tables, we have a primary key, though they are not the same primary key. As a result, you would not be able to join the tables as the primary keys contained in them do not have the same values, and this is how you would normally join.
In saying that, the two tables can be joined as the foreign key of Sales is related to the primary key of Customer. If invoice_no was not on Sales , then you could make the customer_no in sales the primary key.
So lets look at the tables below with data in them.
Normally when you try to join two tables, it is on the primary key. On the below invoice_no is the primary key of the table Sales, and customer_no is the primary key of the customer table.
While their values in each column are unique, they are not the same , so a join would fail as per the below:
But if you change on the join b.invoice_no TO b.customer_no, it will now bring back all the values asked for. The reason?
The primary key on one is linked to the foreign key on the other, with similar unique values.
As a result, you can still have a primary key column, not in another table and join to that table as long as there is a foreign key column with the same values.
This helps to maintain the table structure, without having to remove primary keys.
(C) Technology improvements have meant that storage and big data processing make the process of delivering services easier.
(D) Career opportunities for professionals with good skills have increased.
(E) A wide range of open source and paid tools are now easily available that help to process and report on the data.
(F) Entry requirements are easy, and this coupled with an ability to quickly acquire knowledge and skills helps entry whether you want to be full time or part-time.
(G)Knowledge and skills have improved as access to online learning has improved significantly.
As a result of all this:
(A) Large data volumes need to be analysed.
(B) Consumers’ habits about how they use a service or the information they look for now has a digital footprint.
(C) Now once a consumer has used a service ( whether purchased or not), the ability to understand their habits can be captured to deliver as follows:
The services they want.
The products they want.
Quicker turnaround time.
How can this help with all the data that is captured and stored?
So in this article, we have already outlined what the background is as to how the industry has evolved to where data analytics is now.
As outlined, all information traditionally would not have been stored in a format that was easily accessible.
Step 1 – Data Capture
To understand what you want to analyse, and help draw conclusions accurately, a data analyst will work with their technical colleagues to ensure that the correct data is captured.
Data capture of raw data, can happen in a number of ways:
Interaction with a website or application.
Consuming a service.
Requesting a service be completed.
Social media interaction.
In a lot of cases now this happening in real time.
Once the completeness and accuracy are fulfilled, your data quality will become less of an issue.
Step 2 – Analysing
(A) You create visual charts of it; this allows the viewer of the information to get an initial view of the information without looking at the underlying data. Sometimes this will show patterns in data or clusters or the types of data you capture.
(B) Using data science statistics to see if they can explain the data. This could show information such as how data is correlated or otherwise. Also, probabilities could be calculated to show what outcomes might happen in the future.
Here in how to create an instance of a class, as described herein, how to create a class in Python, we will further explore the instance of class and how this can be used within a program to assign values to an object. This allows that object to inherit those values contained within the class, making it easier to have consistency regards functionality and data.
This video covers off
(a) creating an instance of a class
(B) Using the __init__ within the class
(C) define the constructor method __init__
(D) Creating an object that calls a class and uses the class to process some piece of data.
What are the benefits of this?
You only need to create one class that holds all the attributes required.
That class can be called from anywhere within a program, once an instance of it is created.
You can update the class, and once completed, those new values will become available to an instance of that class.
Makes for better management of objects and their properties, not multiple different versions contained within a program
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.