You are on page 1of 47

Lecture 7: Application Layer

IT064IU - Introduction to Computing


SUMMER 2021

Instructor: Le Duy Tan, PhD


Email: ldtan@hcmiu.edu.vn
Contents
1. Information systems
2. Artificial intelligence
3. Simulation, graphics, gaming and other applications
Information systems
Managing Information
vInformation system: Software that helps the user organize and analyze data.
vThree most popular applications of information systems:
q Electronic spreadsheets
q Database management systems
q E-commerce
Spreadsheets
vSpreadsheet: A program that allows the user to organize and analyze data using a
grid of cells, e.g.: Microsoft® Excel, Google Sheets, LibreOffice Calc
vCell: An element of a spreadsheet that can contain data or a formula
Spreadsheet Formulas
A computation provided by the spreadsheet software that can be incorporated
into formulas
Spreadsheet Analysis
v Track sales
v Analyze sport statistics
v Maintain student grades
v Keep a car maintenance
log
v Record and summarize
travel expenses
v Track project activities
and schedules
v Plan stock purchases
Database Design
v Entity-relationship (ER) modeling: A popular technique for designing
relational databases
v ER diagram: A graphical representation of an ER model

An ER diagram for the movie rental database (A customer rents the movies)
Database Management Systems
vDatabase: A structured set of data
vDatabase management system
(DBMS): A combination
of software and data made up of
qphysical database: collection of files
that contain
the data
qdatabase engine: a software that
supports access
to and modification of the database
contents
qdatabase schema: a specification of
the logical structure of the data stored
in the database
Relational-Model DBMS
vRelational model: A database
model in which data and the
relationships among them are Field
organized into tables
vTable: A collection of database
records
Record
vRecord (or object, or entity):
A collection of related fields that
make up a single database entry
(rows)
vField (or attribute): A single
value in a database record
(columns)
vEach movie record has: a
MovieId, a Title, a Genre, and
a Rating
vKey field: One or more fields
of a database record that
uniquely identifies it among all
other records in the table, e.g.,
MovieId.
vSchema: Movie
(MovieId:key, Title, Genre,
Rating)

Movie table
Customers table

Rents table
Structured Query Language (SQL)
vA comprehensive relational database language for data management and
queries
vQueries: select attribute-list from table-list where condition
vE.g.:
qselect Title from Movie where Rating = ‘PG’
qselect Name, Address from Customer
qselect * from Movie where Genre like ‘%action%’
SQL Commands (1/4)
SQL Commands (2/4)
vCREATE: used to create a new database object. It can be used to create a new
table, view, function, stored procedure, etc. in the database.
CREATE TABLE Table_Name ( CREATE TABLE Employee (
Column_Name1 Data_Type (Size), Id INT PRIMARY KEY,
Column_Name2 Data_Type (Size), Name VARCHAR(50),
Column_NameN Data_Type (Size) Salary DECIMAL(18, 2)
); );
vINSERT: used to add a new record in the table.
INSERT INTO Table_Name INSERT INTO Employee
(Column_Name1, Column_Name2, ( Id, Name, Salary)
ColumnN) VALUES (102, 'Nguyen Van
VALUES (Value1, Value2, ValueN); A', 1000000);
SQL Commands (3/4)
vSELECT: used to fetch the records from the database. It can be used to access
the data from the database based on the condition using the ‘where’ clause.
-- To show all the records
SELECT expressions FROM
Table_Name vSELECT * FROM Employee;
WHERE conditions; -- To show the records based
on condition
vSELECT * FROM Employee
WHERE ID=101;

vUPDATE: used to change or modify the existing records in a table.


UPDATE Table_Name UPDATE Employee
SET Column_Name1 = Value1, SET Salary = 80000
Column_Name2 = Value2, WHERE Id = 101;
ColumnN = ValueN
WHERE condition;
SQL Commands (4/4)
vDROP: remove an object from the database.
If we use the drop command on a table, the table including all the records and
constraints will be removed from the database.
DROP TABLE Table_Name DROP TABLE Emloyee

vDELETE: delete one or more existing records from a table.


-- To delete specic records
DELETE FROM Table_Name DELETE FROM Employee
WHERE condition; WHERE Id = 101 ;
-- OR -- OR
-- To delete all the DELETE FROM Employee
records
DELETE FROM Table_Name ;
Examples
1. Create Customer table and Movie table
2. Insert data to Customer table Movie table
3. Define an SQL query that returns all attributes of all records in the Customer
table.
4. Define an SQL query that returns the MovieId number and title of all movies
that have an R rating.
5. Define an SQL query that returns the address of every customer in the
Customer table who lives on Lois Lane.
6. Define an SQL statement that inserts the movie Armageddon into the Movie
table.
7. Define an SQL statement that changes the address of Amy Stevens in the
Customer table.
E-Commerce
vElectronic commerce: The process of buying and selling products and services
using the World Wide Web. E.g., Amazon.com, eBay, Shopee, Lazada, Tiki,…
vKey aspects: web-based technologies, Electronic shopping carts,
recommendation system, security for financial transactions,…
Other information systems
vBlackboard, Edusoft
vERP (Enterprise resource planning), SAP (Systems Applications
and Products)
Artificial Intelligence
vThinking Machines
vArtificial intelligence (AI): The study of computer systems that model and apply
the intelligence of the human mind
vChatbot: A program designed to carry on a conversation with a human user
The Turing Test
vA behavioral approach to determining
whether a computer system is intelligent
vA human interrogator sits in a room and
uses a computer terminal to communicate
with two respondents, A and B. One is
human and the other is a computer. The
interrogator doesn’t know which is
which.
vIf the computer pass the Turing test, then
it could be considered intelligent.
Aspects of AI
v Knowledge representation: the techniques used to represent knowledge so that
a computer system can apply it to intelligent problem solving
v Expert systems: computer systems that embody the knowledge of human
experts
v Natural language processing: the challenge of processing languages that
humans use to communicate
v Robotics: the study of robots
Knowledge Representation
• Semantic Networks: A knowledge
representation technique that
represents the relationships among
objects.
• The example semantic network can
answer the questions:
• Is Mary a student?
• What is the gender of John?
• Does Mary live in a dorm or an
apartment?
• What is Mary’s student ID number?
• How many students are female and
how many are male?
• Who lives in Dougherty Hall?
Search tree
A structure that represents
alternatives in adversarial
situations, such as game
playing
Regression
Clustering
Classification
Classification
Neural network
vArtificial neural network
vTraining: The process of adjusting the weights and threshold values in a neural
net to get a desired outcome
Virtual characters mimic human actions

Hand pose

Application:
- use hand to signal capturing images,
- sign language recognition
- computer games,
- control computer
32
Expert Systems
vKnowledge-based system: Software that uses a specific set of information
vExpert system: A software system based on the knowledge of human experts.
E.g., software that helps doctors diagnose some diseases.
Natural Language Processing (NLP)
vVoice recognition Using a computer to recognize the words spoken by a human
vNatural language comprehension: Using a computer to apply a meaningful
interpretation to human communication
vVoice synthesis: Using a computer to create the sound of human speech
Eliza

https://www.youtube.com/watch?v=RMK9AphfLco
Quiz
vCompare and contrast between supervised learning, unsupervised learning and
reinforcement learning? Please give an example for each type of learning.
Reinforcement learning
vCartpole: https://www.youtube.com/watch?v=5Q14EjnOJZc
vAtari game: https://www.youtube.com/watch?v=V1eYniJ0Rnk
Cart-pole balancing

vhttps://www.youtube.com/watch?v=5Q14EjnOJZc
Simulation, Graphics, Gaming,
and Other Applications
Simulation
vSimulation Developing a model of a complex system and
experimenting with the model to observe the results
vModel: An abstraction of a real system; a representation of objects
within a system and the rules that govern the behavior of the objects
qContinuous Simulation: continuous time, differential equations represents
interactions between features and changes of features, e.g., weather models
such as Weather Forecasting, Hurricane Tracking
qDiscrete-Event Simulation: discrete events. E.g., NS-3, OPNET, OMNET
Computer Graphics
v Create pictures and films using computers
v Some apps: Graphical user interfase, 3D modelling, vector graphic
v Huge impacts on animation, movies, advertising, video games, and graphic
design.
Computer Graphics

Computer-aided design Graphical user interface Word processors


(CAD) (GUI)
Modeling Complex Objects
Modeling Complex Objects
Gaming
vGame engine: A software system within which computer games are created
qA rendering engine for graphics
qA physics engine to provide a collision detection system and dynamics simulation to solve
the problems related to forces affecting the simulated objects
qA sound-generating component
qA scripting language apart from the code driving the game
qAnimation
qArtificial intelligence algorithms (e.g., path-finding algorithms)
qA scene graph, which is a general data structure to hold the spatial representation in a
graphical scene

https://en.wikipedia.org/wiki/Game_engine
Game Design and Development

vGame Programming
qJava is typically used for Android games
qObjective C for IOS mobile game
qC# JavaScript, and Lua
qSome pecific language of particular engine: Epic Game’s Unreal Script for the
Unreal engine and Unity 3D

You might also like