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

Variabel

Uploaded by

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

Variabel

Uploaded by

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

Variabel: wadah utk menyimpan nilai data,

Objek adalah unit dasar Pemrograman Berorientasi Objek dan mewakili entitas
kehidupan nyata.
Array: menyimpan beberapa nilai dalam satu variabel, alih- alih mendeklarasikan
variabel terpisah untuk setiap nilai.

Database: any collection of related information like shopping list, phonebook, etc
Database can be stored in different ways like paper, computer, etc
Database Management System (DBMS): special software program that helps
user to create & maintain a database.
CRUD: 4 main operation on database
2 type of database
1. Relational db (SQL): organize data into one or more table
a. Each table has columns & rows
b. A unique key identifies each rows
2. No Relational (NOSQL): organize data is anything but a traditional table.
a. Key-value stores
b. Documents (JSON, XML, etc)
c. Graphs
d. Flexible Table
SQL: Structured Query Language
1. Standardized language for interacting with RDBMS (Relational Database
Management System)
2. Used to perform CRUD operation as well as another administrative take.
3. Used to define tables & structure
4. SQL code used on one RDBMS isn’t always portable to another without
modification.
NoSQL: stores data in anything but a static table (mongodb, Cassandra, firebase,
dynamoDb, etc). implementation specific:
1. Any relational database falls under this category so there isn’t set
language standard
2. Most NRDBMS will implement their own language for performing CRUD
operations.
Database Queries: a request made to the DBMS for specific information.
Ex: Google Search is query

Tables & Keys


 Tables always has columns & Rows.
o Columns would define a single attribute
o Rows is an individual entry
 Primary key is basically an attribute which uniquely defines the row in the
database. Primary key can be string text or number or anything what
matters is primary key has to be unique.
o A surrogate key is a primary key that has no mapping to the real
world (Any random number
o A natural key is mapping to the real world like SSN(Social Security
Number, ID KTP)
o Foreign key is attribute that we can store in db table that will link
us to another db table.

SQL basic
SQL is a language used for interacting with RDBMS to do:
1. CRUD data
2. Create & manage db
3. Design & Create db table
4. Perform administration tasks (Security, user management, import/export,
etc).
SQL implementation vary between system:
1. Not all RDBMS follow the SQL standard to a ‘T’
2. The concept are the same but the implementation may vary
SQL is actually a hybrid language, that has 4 types of language:
1. Data Query Language (DQL)
a. Used to query the db for information
b. Get information that Is already stored
2. Data Definition Language (DDL)
a. Used for defining db schemas
3. Data Control Language (DCL)
a. Used for controlling access to the data in db
b. User & permission management
4. Data Manipulation Language (DML)
a. CRUD data from database.
Queries: is a set of instructions given to the RDBMS (written is SQL) that tell
RDBMS what information you want to retrieve.
 TONS of data in db
 Often hidden in a complex schema
 Goal is to only get data you need.
Example:
SELECT employee.name
FROM employee.table
WHERE employee.salary > 300000
SQL Datatypes:
1. INT = Whole Numbers
2. Decimal (M, N) = Decimal numbers – exact value
3. Varchar (1) = string of text length 1
4. BLOB = Binary Large Object, to stores large data
5. Date = ‘YYYY-MM-DD’
6. Timestamp = ‘‘YYYY-MM-DD HH:MM:SS’ used for recording

You might also like