
![[igCS] Database - Intro, Structure and Data types](https://cf.quizizz.com/img/presentation/default-img/presentation_title_img-1_default.jpg?w=200&h=200)
[igCS] Database - Intro, Structure and Data types
Presentation
•
Computers
•
9th - 10th Grade
•
Practice Problem
•
Medium
Andy tsui
Used 6+ times
FREE Resource
20 Slides • 15 Questions
1
[igCS] Database

2
Objectives
define a single-table database from given data storage requirements
choose and specify suitable data types
3
What is Database?
Collection of data that is stored and organized in a logical manner
It can be paper-based or electronic
4
Physical Database: Records stored in paper and folders in a clinic
5
Open Ended
Name some physical database you have encountered before.
6
Before Internet, companies registered their contact number on yellow page
7
Electronic (Computer) Database
Very common and appears in various scales
e.g. The phonebook (or contacts) is a database usually with about 100 contacts
The chat history of your instant messaging app may have 10000 records
8
Open Ended
Suggest one more database in your smartphone and give approx. how many total records in it.
9
In your smartphone
Probably there's tens or hundreds different database running in it...
10
Comparison of instant messaging users, in million. The scale of a database can be massive!
11
How companies support such a massive of database? - Data center
https://www.youtube.com/watch?v=80aK2_iwMOs
12
Basic Functions provided by a database
Storing and organization of data
Search and retrieve of data (Query)
13
Database table structure
14
Table
A table is a collection of same type of item
e.g. for a school database system, we may have a student table which is storing student info.
A database have multiple tables is called "relational database"
15
Database table (cont'd)
Record is one entry in the table (row) - e.g. a particular student in our student table
Field (column) one particular "property" of the record, e.g. First Name, Last Name, Gender are example of fields in student table
16
Multiple Choice
How many records in this table?
5
6
7
9
17
Multiple Choice
How many fields in this table?
5
6
7
9
18
Fill in the Blanks
Type answer...
19
Indexing
Make record searchable
For example, in a dictionary the keyword is indexed (sorted);
In yellow page numbers are grouped by type of business then by company name in alphabetical order
20
Open Ended
How is a typical supermarket index their products?
21
Open Ended
Library is not using ISBN but call number to index their books. Do some research, how does it work?
22
Fill in the Blanks
Type answer...
23
Indexing in db table
Index in a database is called key
Each table should have at least one key, which is called primary key
Primary key is a unique (across the same table) value which is used to represent/identify a record in a table
24
Open Ended
Assumed that we are creating a database table for students in our class. List 5 most important fields in that table.
25
Multiple Select
Which of the followings are eligible to be primary key in our CS class student table?
FirstName
LastName
StudentID
ClassNumber
26
More about primary key
Primary key must be unique to identify a record
Primary key is unique in one table only, it can be repeated in another table.
e.g. Student ID is Primary Key in Student table, but the same Value can be, for example, used in Report card table
Primary key is also primary index, to help database retrieve a certain record
27
Database data types
Each field in the database is assigned with a data type
Usually database structure is fixed in size, so in data definitions the size of field is also defined
28
29
Case study
Take out text book and study p.171, Case study.
30
Multiple Choice
What is the data type for Name?
short text
integer
decimal
yes/no
31
Multiple Choice
What is the data type for Gender?
short text
integer
decimal
yes/no
32
Multiple Choice
What is the data type for Date of Birth?
short text
integer
Date/Time
Currency
33
Multiple Choice
What is the most suitable data type for Telephone Number?
short text
integer
Date/Time
Currency
34
Open Ended
Is there any field that is suitable to be a primary key? Explain why [2].
35
In case if no suitable primary key...
In general each table must have a primary key
In case if nothing suitable for it, we need to make up one
One possible method is "Automatic ID", which either use computer algorithm to generate a code, or auto increment number
[igCS] Database

Show answer
Auto Play
Slide 1 / 35
SLIDE
Similar Resources on Wayground
30 questions
BAB 2 BERPIKIR KOMPUTASIONAL
Presentation
•
9th Grade
28 questions
Introduction To BTEC Award Digital IT L 1&2
Presentation
•
9th - 10th Grade
28 questions
ESSAY WRITING
Presentation
•
9th Grade
28 questions
Introduction Database and Database Management System
Presentation
•
8th - 9th Grade
29 questions
Phylogenies & Cladograms Notes
Presentation
•
9th - 10th Grade
27 questions
Delineating Argument and Claims Review
Presentation
•
9th - 10th Grade
26 questions
Writing equations in Standard Form
Presentation
•
9th - 10th Grade
26 questions
Genetics and Heredity
Presentation
•
9th - 10th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade
10 questions
Logos
Quiz
•
6th - 9th Grade
10 questions
Test Your Knowledge with 15 Fun Trivia Questions
Interactive video
•
6th - 10th Grade
15 questions
Memorial Day Trivia
Quiz
•
KG - 12th Grade
21 questions
Factoring Trinomials (a=1)
Quiz
•
9th Grade
12 questions
Name that Candy
Quiz
•
KG - 12th Grade
20 questions
Guess The App
Quiz
•
KG - Professional Dev...