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

Lecture 2-CSC491 Database, Database Management

The document provides an overview of Management Information Systems, specifically focusing on databases and Database Management Systems (DBMS). It covers key concepts such as the definition of databases, types of database models (relational and object-oriented), SQL language, and the applications of databases in various fields. Additionally, it discusses the structure and management of relational databases, highlighting their importance in modern computing.
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)
6 views53 pages

Lecture 2-CSC491 Database, Database Management

The document provides an overview of Management Information Systems, specifically focusing on databases and Database Management Systems (DBMS). It covers key concepts such as the definition of databases, types of database models (relational and object-oriented), SQL language, and the applications of databases in various fields. Additionally, it discusses the structure and management of relational databases, highlighting their importance in modern computing.
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

Course Code: CSC-491

Course Title: Management Information


Systems

Faculty of Science and Technology


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Contents Topic: Database and Data base Management

1. What is Database, DBMS.

2. Basic Environment and Concepts of DBMS.

3. Definitions used in DBMS.

4. Types of Database.

5. Database Architecture

6. Database Languages

7. Database Components

8. Database Applications
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is Databases?
What is a Database? A database is a structured collection of data that is
stored electronically. It enables users to efficiently store, retrieve, and
manage data. Databases are integral to modern computing systems and
serve as the backbone of virtually every software application in use today.

• Often abbreviated DB.


• A database is a collection of related information.
• A database is a collection of information that is organized so that it can easily
be accessed, managed, and updated.

• For example, a phone book is a database of names, addresses and phone


numbers.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

The database
environment
• To be able to function, an organisation needs information,
e.g.

• list of books in a library,


• customer details in a retail business,
• specifications of cars and their components for a car
manufacturer
• Information may be defined as data represented in a
meaningful form.

• Same data shown in different ways will provide different


information to different viewers

Airlines have a difficult problem: they need to


track every seat and passenger on every flight.
Thousands of people might be trying
to book the same flight at the same time, but the
system can never sell the same seat to different
people
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

The database
•environment
A major requirement of any computer system is to store and retrieve
data in a way that is meaningful to the end user
Key Characteristics of a Database:

• Structured Storage: Data is organized into rows, columns,


tables, and indexes.
• Persistent: Data remains even after the system is shut down.
• Concurrent Access: Multiple users can access the data
simultaneously.
• Security Controls: Users can be given different access rights.
• Integrity Constraints: Rules that ensure accuracy and
consistency.
• Backup and Recovery: Mechanisms to restore data after
failures.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.
Applications of Databases:
• Business operations (HR, CRM, ERP)
• E-commerce platforms
• Social media applications
• Banking and financial services
• Scientific research
• Government databases
• Banking: all transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Online retailers: order tracking, customized recommendations
• Manufacturing: production, inventory, orders, supply chain

• Human resources: employee records, salaries, tax deductions


Database Models

A database model or database schema is the


structure or format of a database, described in a
formal language supported by the database
management system,
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.
1. Relational Database
What is a Relational Database?

A relational database is a type of database that stores data in a structured format using rows and columns. The
data is organized into tables (called "relations"), and each table consists of one or more columns (attributes) and
rows (records).

Basic Concepts of Relational Databases:

1. Tables (Relations): The primary structure for storing data. Each table represents an entity.
2. Rows (Tuples): Each row represents a unique record in a table.
3. Columns (Attributes): Each column represents a data field, with a specific datatype.
4. Primary Key: A unique identifier for each row in a table.
5. Foreign Key: A field that creates a relationship between two tables.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.
The advantages of the relational
model are:
1. Structural independence
2. Improved conceptual simplicity
3. Easier database design,
implementation, management &
use
4. Ad hoc querying (a query that is
not predefined) capability through
SQL
5. Powerful data management
system.
The disadvantages, on the other
hand, are:
1. Substantial hardware & system
software overhead
2. Possibility of poor design &
implementation
3. Potential “islands of
information” problem.
2. Object-Oriented Database
Model
The object-oriented paradigm has been
applied to database technology,
creating a new programming model
known as object databases. These
databases attempt to bring the
database world and the application
programming world closer together, in The Object-Oriented Database Model (OODB) is a data model that
integrates database capabilities with the features of object-oriented
particular by ensuring that the programming (OOP). It is designed to handle more complex data
database uses the same type system as structures than the traditional relational model and is especially
the application program. suited for applications involving multimedia, CAD/CAM, simulations,
and real-time systems.
Object databases have been used successfully in
many applications:
The combined storage of both data and the procedures that manipulate
usually specialized applications such as
them is referred to as encapsulation. Through encapsulation, an object can
engineering databases or molecular biology be “planted” in different data sets. The ability in object-oriented structures
databases to create a new object automatically by replicating all or some of the
characteristics of a previously developed object (called the parent object) is
called inheritance.
Example Scenario for Object Oriented
We are designing a database system for a university to
manage:
• Students
• Professors
• Courses
• Departments
This system will use an Object-Oriented Database (OODB).

Step 1: Define Classes and Objects


Each real-world entity is represented as a class, and
each individual record is an object of that class.
Relational SQL
Structured Query Language, popularly known as SQL is the language that is used in most
relational database systems. It is called structured query language because it follows a rigorous
set of rules and procedures in answering queries. SQL is also termed as 4GL to distinguish it
from other 3GL programming languages like, PASCAL, COBOL or C.
SQL is a simple and powerful query language that is capable of answering simple to most
complex queries. Any query on a single table can be performed by using only two basic operators,
namely SELECT and PROJECT.
What is SQL (Structured Query Language)?
SQL stands for ‘Structured Query Language’

When a user wants to get some information from a database file, he can issue a query.

A query is a user–request to retrieve data or information with a certain condition.

SQL is a query language that allows user to specify the conditions.

SQL is domain-specific language, NOT a general programming language

SQL is specialized to handle ‘structured data’ that follows relational model – data that incorporates relations among entities and
variables.

Used to interact with databases to manage data: create, populate, modify, or destroy data.

"Domain-specific" refers to something that is designed or specialized for a particular area of knowledge, industry, or
problem set—known as a domain.

SQL (Structured Query Language) is a domain-specific language because it is designed specifically for working with databases
to query, update, insert, or delete data in databases.
Examples of domain specific languages are SQL and HTML
Examples of General Purpose Languages are C++, Java, Python
SQL as a Language
Nevertheless, SQL is a ‘language’. It has its language specification – a set of language elements, rules and syntax
According to ANSI (American National Standards Institute), SQL is the standard language for all database
management systems.
It is a high level language which is user friendly and easy to learn

SQL Syntax Rules


•SQL keywords are not case-sensitive (e.g., SELECT is the same as
select).
•Statements end with a semicolon “ ; ”
•Text strings are enclosed in single quotes ( ’ )
•The integer values are not enclosed in single or double quotes
History of SQL
First developed in 1970s by two scientists at IBM following a theory of ‘relational
algebra’ by Edgar F. Codd, who was also an IBM scientist.

First commercial implementation was Oracle’s V2.

First adopted by ANSI in 1986, and ISO in 1987 as standard.

The latest version of the SQL standard is SQL Server 2022 Version Number
16.0.1000.6

There have been very many versions in between.


Example: Suppose we have a database as given below:

Task#1: List the names and house code of 1A students.


SQL Query:
SELECT name, hcode, class FROM student WHERE class="1A“;

Result
Task#2 List the names, id of 1A students with no fee
remission.
SELECT name, id, class FROM student WHERE class="1A" AND NOT remission;

Result

Task#3 List the students who were not born in January, March, June, September.

SELECT name, class, dob FROM student WHERE MONTH(dob) NOT IN (1,3,6,9);

Result
SQL Queries
1. SELECT Statement Used to fetch data from a database.
SELECT Name, Department FROM Employees;

2. WHERE Clause Used to filter records.


SELECT Age FROM Employees WHERE Age > 25 AND Department = 'HR';

3. AND, OR, NOT Operators


SELECT Age, Department FROM Employees WHERE Age > 25 AND Department = 'HR';

4. ORDER BY Clause Sort results.


SELECT Age FROM Employees ORDER BY Age DESC;

5. GROUP BY Clause Group rows with the same values.


SELECT Department, COUNT(*) FROM Employees GROUP BY Department;

6. HAVING Clause Filter groups.


SELECT Department, COUNT(*) FROM Employees GROUP BY Department HAVING COUNT(*) > 2;
SQL Controls

• NOT NULL: Prevents null values.

• UNIQUE: Ensures all values in a column are different.

• PRIMARY KEY: Uniquely identifies each record.

• FOREIGN KEY: Links two tables.

• CHECK: Ensures values meet a condition.

• DEFAULT: Assigns a default value.


SQL Categories (Contd..)
1. Data Definition Language (DDL) 2. Data Manipulation Language (DML)
• CREATE: Create new tables, databases. • SELECT: Retrieve data.
• ALTER: Modify existing database objects. • INSERT: Add new data.
• DROP: Delete tables, databases. • UPDATE: Modify existing data.
• TRUNCATE: Remove all records from a table without logging. • DELETE: Remove data.
Example:
Example:

3. Data Control Language (DCL) 4. Transaction Control Language (TCL)


• GRANT: Give user access privileges. • COMMIT: Save changes.
• REVOKE: Remove user access privileges. • ROLLBACK: Undo changes.
Example: • SAVEPOINT: Set a save point within a transaction.
Example:
SQL Data Types
• INTEGER: Whole numbers.
• VARCHAR(n): Variable-length string with a max length.
• CHAR(n): Fixed-length string.
• DATE: Date values.
• FLOAT: Decimal numbers.
• BOOLEAN: TRUE or FALSE values.

SQL Categories
1. Data Query Language (DQL) - used to query data
2. Data Manipulation Language (DML) – used to create/modify/destroy data
3. Data Definition Language (DDL) – used to define database schema
4. Data Control Language (DCL) – used for security and access control
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Database Management
•System (DBMS)
To access information from a database, you need a database management
system (DBMS).
• This is a collection of programs that enables you to enter, organize, and select
data in a database. OR
• A Database Management System (DBMS) is a software tool that facilitates
creating, maintaining, and manipulating an information database.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Database Management
System (DBMS)
• DMBS is a collection of programs that enables you to store, modify, and
extract information from a database.

• There are many different types of DBMSs, ranging from small systems that
run on personal computers to huge systems that run on mainframes.

• The following are examples of database applications:

• computerized library systems


• automated teller machines
• flight reservation systems
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Database Management
System

(DBMS)
Requests for information from a database are made in the form of a
query.

• In fact, most of today's database systems are referred to as a


Relational Database Management System (RDBMS), because of their
ability to store related data across multiple tables.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Relational Database
Management System (RDBMS)
• A relational database management system (RDBMS) is a database
management system (DBMS) that is based on the relational model
as introduced by E. F. Codd.

• Most popular databases currently in use are based on the relational


database model.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Relational Database
Management System (RDBMS)
• A short definition of an RDBMS is:

• a DBMS in which data is stored in tables and the relationships among the data
are also stored in tables.

• The data can be accessed or reassembled in many different ways without


having to change the table forms.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Relational Database
Management System (RDBMS)
• A relational database management system (RDBMS) is a program that
lets you create, update, and administer a relational database.

• Relational Database Management System a type of database


management system (DBMS) that stores data in the form of related
tables.

• An important feature of relational systems is that a single database


can be spread across several tables.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

• Some of the more popular relational database management systems


include:
• Microsoft Access

• Filemaker

• Microsoft SQL Server

• MySQL

• Oracle
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is
Record?
•In the context of a relational database, a row—also called a record or
tuple—represents a single, structured data item in a table.

• In simple terms, a database table can be thought of as consisting of


rows and columns or fields.

• Each row in a table represents a set of related data, and every row in
the table has the same structure.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Recor
d
EMPNO FIRSTNME LASTNAME WORKDEPT JOB

000010 Christine Haas A00 President

000020 Michael Thompson B01 Manager

000120 Sean O'Connell A00 Clerk


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is Entity?
• The first step in developing a database design is to identify the types
of data to be stored in database tables.

• A database includes information about the entities in an organization


or business, and their relationships to each other.

• In a relational database, entities are represented as tables.


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is Entity?
• An entity is a person, object, or concept about which you want to
store information.

• Some of the entities described in the sample tables are employees,


departments, and projects.
EMPNO FIRSTNME LASTNAME WORKDEPT JOB
000010 Christine Haas A00 President
000020 Michael Thompson B01 Manager
000120 Sean O'Connell A00 Clerk
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is Field/Column?
• Within a relational table, each row of data in the table is a collection
of related data values.

• There are characteristics to each piece of data in each row.

• Columns are used to identify and classify each piece of data.

• Each column in a table must have a name that is unique for that
table.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

What is Field/Column?
• The data type and length specify the type of data and the maximum
length that are valid for the column.

• Data types may be chosen from those provided by the database


manager or you may choose to create your own user-defined
types.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Data Manipulation Language


(DML)
• Language for accessing and manipulating the data.

• DML also known as query language.

• Structured Query Language (SQL) is the most widely used query language.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Relational Model
Attributes
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

A Sample Relational Database


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Architecture for a Database


System
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

• The DBMS Manages the Interaction Between the End User and
the Database.
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

The Database System


Components
• Hardware
• Computer

• Peripherals

• Software
• Operating systems software

• DBMS software

• Applications programs and utilities software


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

The Database System


Components
• People

• Systems administrators

• Database administrators (DBAs)

• Database designers

• Systems analysts and programmers

• End users
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

The Database System


Components
• Procedures

• Instructions and rules that govern the design and use of the database system

• Data

• Collection of facts stored in the database


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Types of Database Systems


• Number of Users

• Single-user

• Desktop database

• Multiuser

• Workgroup database

• Enterprise database
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

• Location
• Centralized

• Distributed

• Use
• Transactional (Production)

• Decision support

• Data warehouse
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Management Requirements for Database Systems

 Data Administration

• Develop information policy


• Define information requirements
• Plan for data
• Oversee logical database design and database dictionary development
• Monitor use of information
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Management Requirements for Database Systems

 Database Technology, Management, and Users

• Databases require DBMS software and staff


• Database design group defines and organizes structure and content of database
• Database administration: establish physical database, logical relations, access rules
Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

Web Access to Database


 Advantages to Web Access to Databases

• Browser software easy to use; little training

• Web interface requires no changes to internal database

• Costs less than custom interfaces


Ref: Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.
Reference No. Topic: Database and Content Management

1. What is DBMS.

2. Basic Environment and Concepts of DBMS.

3. Definitions used in DBMS.

4. Types of Database.

5. Database Architecture

6. Database Languages

7. Database Components

8. Database Applications
References / Resources

• Experiencing MIS, 4th edition by D. M. Kroenke, A. Gemino and P. Tingling.

You might also like