0% found this document useful (0 votes)
7 views53 pages

Week 1

The document introduces databases and business intelligence, emphasizing the importance of SQL and relational database management systems (RDBMS). It covers key concepts such as data types, database structures, and the roles of primary and foreign keys in database relationships. Additionally, it highlights the advantages of using a database management system (DBMS) for data consistency, integrity, and security.

Uploaded by

Rizwan Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views53 pages

Week 1

The document introduces databases and business intelligence, emphasizing the importance of SQL and relational database management systems (RDBMS). It covers key concepts such as data types, database structures, and the roles of primary and foreign keys in database relationships. Additionally, it highlights the advantages of using a database management system (DBMS) for data consistency, integrity, and security.

Uploaded by

Rizwan Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Introduction to Databases and

Business Intelligence

Dr. Nnamdi Johnson Ogbuke


Email: [email protected]
Ground Rules
Total Commitment:

 Be present in the class


 No use of Phones
 Contributes
 Be civil and accommodate views
Icebreaker
https://www.menti.com/alp5iqkimxo4
Introduction to Databases - Analytics

• Understanding data and the language of


database

• What is SQL?

• How a relational database functions

• Database applications

• Types of relational database management


systems (RDMSs)
Evolution of Analytics : Visual Perspective
Skills, Applications & Tools
What is Data ?

Answers from Walter Shields (SQL QuickStart Guide Textbook)

• Data can be FACTS related to any OBJECT


in consideration

For example, Your Name, Age, Height,


Weight, DOB, etc are some data related
to you
Primary Sources of Data:

 Emanating from the Web, Social media, Mobile phones,


ERP system, Products recalls, Healthcare information,
and Cloud.

 They can be given in Text, Graphics, Audio, and Video


What is Data ?

Each minutes, there are:


• 98,000 tweets

• I60, million emails sent

• 600 videos uploaded to YouTube

• 160,000 social platforms and news sites

Source: Bernard Marr, 2021


Understanding language of data:
• SQL - Structured Query language; it is used to manage data stored in a relational
database.
• Database - a collection of data organized in some format so that the data can be
easily accessed, managed and updated. The predominate type of data is relational
database.
• Relational database - organized data in the form of tables; they contains queries,
views and other elements to help us interact with data.
• To manage our database, we need to use a software application known as
database management system - DBMS
What is Database - continuing

Answers from Walter Shields (SQL QuickStart Guide Textbook)

• A systematic collection of logically related data. They allow users to store and organise data. DB
are useful when dealing with large amounts of data.

Answers from Elmasri/Navathe (Fundamentals of Database Systems Textbook)

• A Database (DB) is collection of related data with the following properties:

• A DB is logically coherent and has some relevant meaning

• A DB is designed, built and populated with data for a specific


purpose
What is a Database - continuing

• We can also say that database is a MODEL of what the users perceive.

• Three main categories of models:

• Conceptual Models: How users perceive the world and /or the
business.

• Logical Models: Represent the logic of how a business operates.


For example, the relationship between different entities and the
flow of data through the organisation. Based on the User’s model.

• Physical Models: Represent how the database is actually implemented


Understanding Data and Database

From Spreadsheets to Databases

We are familiar with spreadsheet software like Microsoft Excel and Google
sheets.
• Data Analyst - anybody that works with data, needs to make the
transition from spreadsheets to database
Understanding Data and Database

From Spreadsheets to Databases


Understanding Data and Database

From Spreadsheets to Databases


Understanding Data and Database

From Spreadsheets to Databases


Class Discussion
A table or a database ?
A table
Database Management Systems (DBMS)
• Advantages of a DBMS

A DBMS can provide:


• Data Consistency and Integrity - by controlling access and minimizing data
duplication

• Application programme independency - by storing data in a uniform


fashion

• Data Sharing - by controlling access to data items, many users can access
data concurrently

• Backup and Recovery

• Security and Privacy


Database Example

An Example of Database
CustomerID Name Street City State Account_Number Balance

123 Mr. Smith 123 Lexington Smithville KY 9987 4000

123 Mr. Smith 123 Lexington Smithville KY 9980 2000

124 Mrs. Jones 12 Davis Ave. Smithville KY 8811 1000

125 Mr. Axe 443 Grinder Ln. Broadville GA 4422 6000

125 Mr. Axe 443 Grinder Ln. Broadville GA 4433 9000

127 Mr. & Mrs. Builder 661 Parker Rd. Streetville GA 3322 500

127 Mr. & Mrs. Builder 661 Parker Rd. Streetville GA 1122 800
The following typical questions arise when dealing with shared collection of data such as the table above:
• What happens when a customer moves to a new house?
• Who should have access to what data in this database?
• What happens if Mr. and Mrs. Builder both try and withdraw $500 from the account 3322?
• What happens if the system crashes just as Mr. Axe is depositing his latest paycheck?
• What data is the customer concerned with?
• What data is a bank manager concerned with?
• How would you send a mail to all customers with checking accounts having greater than $2000 balance?
• How would you let all GA customers know of a new branch location?
What is Relational Database Management Systems (RDBMS)?

The data in RDBMS is stored in database objects called TABLES.

A Database is relational when it has relationships between all the tables in a


database
• These relationships are created using Primary and Foreign Keys
Database Management Systems (DBMS)
• Defining a database involves specifying the data types, structures, and
constraints of the data to be stored in the database. The database
definition or descriptive information is also stored by the DBMS in
form of a database catalog or dictionary; it is called meta-data.

• Constructing the database is the process of storing the data on


some storage medium that is controlled by the DBMS.

• Manipulating a database includes functions such as querying the


database to retrieve specific data, updating the database to reflect
changes in the miniworld, and generating reports from the data.

• Sharing a database allows multiple users and programs to access the


database simultaneously
Database Management System (DBMS)
Database Management Systems (DBMS)
• Database Management System (DBMS) is a collection of programs which enables its users to
ACCESS DATABASE, MANIPULATION DATA, and help in REPRESENTATION of data

• Database Management System (DBMS) - A Software system that enables users to define,
create, store, retrieve, reports, queries, access and administer control and security, and
maintenance to the database.
Examples of Relational Database Management Systems (RDBMS)
Use Cases of DBMS
Use Cases of DBMS
Use Cases of DBMS
Tech Giants - Drivers of Data Information

39
SQL in demand

Specific skills for Data-driven Jobs


Why SQL?

 SQL in demand
Companies Using SQL
Thank You
Appendix
Concepts of Primary and Foreign Keys

Primary Key: Primary key uniquely identify a records in the table.


Primary keys must contain unique values. A primary key segment cannot
have NULL qualities

Foreign Key: Foreign key is a field in a table that is a primary key in


another table. It acts as a bridge between one table and another table in
the database
Concepts of Primary and Foreign Keys

‘’Persons’’ table:

‘’Orders’’ table:

• The ‘’PersonID’’ column in the ‘’Persons’’ table is the PRIMARY KEY in the ‘’Persons’’ table.
• The ‘’PersonID’’ column in the ‘’Orders’’ table is the FOREIGN KEY in the ‘’Orders’’ tables.
• The FOREIGN KEY constraints is used to prevent actions that would destroy links between tables.
Database Example

Customer Table Accounts Table


CustomerID Name Address City State CusstomerID Account_Number Balance

123 Mr. Smith 123 Lexington Smithville KY


123 9987 4000
124 Mrs. Jones 12 Davis Ave Smithville KY
123 9980 2000
125 Mr. Axe 443 Grinder Ln Broadville GA

127 Mr. & Mrs. Builder 661 Parker Rd. Broadville GA 124 8811 1000

125 4422 6000

•The customer table has 4 records and 5 columns. The Accounts table 125 4433 9000
has 7 records and 3 columns.
127 3322 500
•Note relationship between the two tables – CustomerID column.
127 1122 800
•How should we split data into the tables? What are the relationships
between the tables?
These are questions that are answered by Database Modeling and Database
Design.
Case 1: The concept of Primary and Foreign Keys
• Give this table a name
• Identify the primary Key
• Identify the Foreign Key

Distributor_ID DistributorName Age Location Product_ID

AO1 John 40 Hatfield PRD_01


The concept of Primary and Foreign Keys
• Give this table a name: Distributor
• Identify the primary Key
• Identify the Foreign Key

Distributor_ID DistributorName Age Location Product_ID

AO1 John 40 Hatfield PRD_01


The concept of Primary and Foreign Keys
• Give this table a name: Distributor
• Identify the primary Key: Distributor _ID
• Identify the Foreign Key

Distributor_ID DistributorName Age Location Product_ID

AO1 John 40 Hatfield PRD_01


The concept of Primary and Foreign Keys
• Give this table a name: Distributor
• Identify the primary Key: Distributor _ID
• Identify the Foreign Key: Product_ID

Distributor_ID DistributorName Age Location Product_ID

AO1 John 40 Hatfield PRD_01


Example of Primary and Foreign Keys

You might also like