SQL - Sturctured Query Language
SQL - Sturctured Query Language
SEQUEL
SQL developed in the 1970 by IBM researchers Raymond Boyce and Donald Chamberlin.
DATA_in simple words data can be information or facts related to anything.
Your name, your age, height, etc, are some data related to you.
In the early days of computing, data consisted mainly of text and numbers.
However, in modern day computing, there are types of data, such as audio, images, graphics and
video.
Computers would be pretty useless without data.
Now you know what is data, but do you know what is database? Let me take you to the world of
databases!
Databases are everywhere but you never see them! They are hidden behind tools and services that
you use everyday.
Is it just a random collection of stuff all squeezed in together? No! Database is a systematic
collection of data.
It is structured and organized in a meaningful way.
Ever wondered where Twitter and Facebook put their data? Yeah! It’s all stored in a database.
Where are the contacts in your mobile phone stored? Yup, in your database.
Understanding attributes
An attribute pushes you deeper into the table’s properties.
If ‘Student’ is the entity, then the attributes could be Student ID, Student Name and so on.
Attributes are like further classification of a Table.
Creating of a table
Ever wondered where does a Table come from?
From an entity! The larger chunk! Let’s say the entity is ‘College’!
You gotta think what data a college would want to store! It’s super easy! Just break the larger chunk
into smaller ones.
So a college may want to store various groups of data such as Part Time Teachers, Full Time
Teachers, Applicants, Students, Courses etc.
Let’s now head tp the Naming Ceremony!
Naming Conventions
Here are the ground rules to name a table
First off, the rules remain the same for tables and attributes (column names). The name has to have
something to do with its superset.
So we are likely to use more than one word. High alert! No spaces between them!
Capitalization of the first word can be done to make it more readable.
For example ‘CollegeTeachers’ is fine.
But ‘College Teachers’ is NOT!!
Constituent of a table
A 7-Course meal?
Well, No No! in SQL there are only rows and columns.
But we’ve got nicknames for them!
We all fields or columns as attributes. We call rows as records and also call them Tuples.
Attributes
Let’s talk about attributes and what makes a good one.
Keep it descriptive and relevant.
No two Attributes in a table can have the same name.
Also, tables are called ‘Relations’ sometimes
Creating table
Now that we have the tools! Let’s talk business!
Creating database
By default the SQL server shows ‘Master’ as Database
To change this, we need to give out the right command!
The command is-
Create Database_____
Fill in the blank with the desired name
Then hit ‘Enter’ and we are halfway through
Changing Database
Your Database by default is set to “Master”
To change this default Database to your desired one, say ‘Employee’. You need a command
So type – use Employee – and voila! The default database is changed.
Creating a table
Just type in – Create Table TableName
Replace ‘TableName’ with the desired name of the table
Well, more about it later!
This is just to give you a clue of how to create tables.
INT
DECIMAL
VARCHAR
DATETIME
Correct
Apa tipe data yang cocok untuk menyimpan Salary?
INT
DECIMAL
VARCHAR
Correct
Apa tipe data yang cocok untuk menyimpan Stock?
INT
DECIMAL
VARCHAR
DATETIME
Correct
Yang mana merupakan query untuk memberikan referensi kolom kepada table lain?
REFERENCES/FOREIGN KEY
PRIMARY KEY
CONSTRAINT
CHECK
Correct
Yang mana merupakan query untuk memberikan syarat kepada suatu kolom?
ON UPDATE CASCADE
ON UPDATE SET NULL
ON UPDATE RESTRICT
ON UPDATE SET DEFAULT
Correct
Yang mana merupakan query untuk untuk mengubah nilai kolom yang terkait di tabel yang
memiliki kunci asing ke NULL saat nilai pada kolom yang diacu dihapus?
ON DELETE CASCADE
ON DELETE SET NULL
ON DELETE RESTRICT
ON DELETE SET DEFAULT
Correct
Yang mana merupakan query untuk untuk mencegah perubahan nilai pada kolom utama jika masih
ada baris pada tabel terkait yang memiliki referensi kunci asing.?
ON UPDATE CASCADE
ON UPDATE SET NULL
ON UPDATE RESTRICT
ON UPDATE SET DEFAULT
Correct
Yang mana merupakan query untuk mengambil data dari table?
SELECT
UPDATE
DELETE
INSERT
Correct
Yang mana merupakan query untuk memasukkan data ke table?
SELECT
UPDATE
DELETE
INSERT
Correct
Yang mana merupakan query untuk memperbarui data di table?
SELECT
UPDATE
DELETE
INSERT
Correct
Yang mana merupakan query untuk menghapus data di table?
SELECT
UPDATE
DELETE
INSERT
Correct
Disebut apa symbol ini “*”?
Asteriks
Obelisk
Semi-Colon
MySQL
Correct
Simbol apa yang digunakan untuk mengambil semua kolom dari table?
;
—
*
()
Correct
Simbol apa yang digunakan untuk memberikan catatan?
;
—
*
()
Correct
Simbol apa yang digunakan untuk mengakhiri suatu query?
;
—
Correct
Apa perintah SQL yang digunakan untuk menampilkan semua data dari tabel MsEmployee?
Sebuah fungsi yang dapat menghasilkan nilai berdasarkan input yang diberikan
Sebuah prosedur untuk mengubah struktur tabel
Sebuah prosedur yang dijalankan secara otomatis saat database diakses
Sebuah prosedur yang tersimpan di dalam database dan dapat dipanggil secara berulang
Correct
Apa yang dimaksud dengan view dalam MySQL?
Menguasai microsoft excel sangat penting karena dapat mempermudah pengelolaan data,
meningkatkan efisiensi kerja, menyediakan alat analisis data yang kuat, diperlukan dalam banyak
pekerjaan dan dapat meningkatkan kesempatan karir. Dengan excel, pengguna dapat mengurutkan,
memfilter, dan menghitung data dengan mudah, serta menggunakan rumus dan fungsi untuk
mengotomisasi tugas yang berulang. Excel juga menyediakan alat analisis data yang kuat seperti
grafik dan tabel pivot, yang membantu pengguna memahami dan mengambil keputusan
berdasarkan data. Oleh karena itu, kemampuan menggunakan excel diperlukan dalam banyak
bidang pekerjaan seperti keuangan, akuntansi, manajemen proyek, dan analisis data, dan dapat
meningkatkan kesempatan karir.
Microsoft excel adalah sebuah aplikasi pengolah angka yang sangat populer dan banyak digunakan
diseluruh dunia. Excel dapat digunakan untuk mengelola data, menganalisis data, membuat grafik
dan laporan, serta melakukan banyak tugas lainnya yang berhubungan dengan angka.