Senin, 05 November 2018

VEHICLE PROGRAM (Object Oriented Programming) In Java

VEHICLE PROGRAM (Object Oriented Programming) In Java

1. Abstract Class Vehicle


2. Interface vehiclee


3. Class Car Inherit Vehicle interface vehiclee


4. Class Truck Inherit Car


5. Class SportCar Inherit Car


6. Class Bicycle Inherit Vehicle interface vehiclee



7. Class Bicycle Roda 3 Inherit Bicycle


8. Class Airplane Inherit Vehicle interface vehiclee


9. Class Airbus Inherit Airplane


10. Class Jet Inherit Airplane


11. Class Submarine Inherit Vehicle Interface vehiclee




12 Main Class











13. Run Result












Senin, 29 Oktober 2018

Entity Relationship Diagram and Table (DATABASE)

1. Picture of ERD

2. Create Database and Use Database
3. Create Table Student

4. Create Table LibMember
5. Create Table LibBook
6. Insert Into Table Student

7. Insert Into Table LibMember
8. Insert Into Table LibBook
9. Update LibBook To Enter MemberID
10. Update Book Title with BookNumber 1123 to "Kancil Cerdik"

11. Delete Book With BookNumber 1125
12. Show All The Book That Available

13. All Of The Command

Minggu, 28 Oktober 2018

SQL in localhost
















1. CREATE DATABASE->The create database statement is used to create a new SQL database and the syntax is CREATE DATABASE databasename;
2. use database -> the statement if the database is use in the command.
3. show databases -> show total of databases and name of database.
4. CREATE TABLE -> create table with the attribute/column what user want. The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.).














5. INSERT INTO-> to insert value in column. If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query. However, make sure the order of the values is in the same order as the columns in the table.
6. show tables-> show total of tables and name of tables.











7. SELECT * FROM ->show the table with the all content of table.













8. SELECT -> show one of column in table






















9. SELECT DISTINCT -> The SELECT DISTINCT statement is used to return only distinct (different) values. Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.






















10. SELECT COUNT -> count the total content of one of column.




















11. WHERE -> The WHERE clause is used to filter records. The WHERE clause is used to extract only those records that fulfill a specified condition.

















12. AND ->  The AND operator displays a record if all the conditions separated by AND is TRUE.
















13. OR ->  The OR operator displays a record if any of the conditions separated by OR is TRUE.



14. The NOT operator displays a record if the condition(s) is NOT TRUE.

















15. ORDER BY -> The ORDER BY keyword is used to sort the result-set in ascending or descending order.



















16. ORDER BY DESC -> The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.




















17. NULL ->  A field with a NULL value is a field with no value. If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value. A NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation! It is not possible to test for NULL values with comparison operators, such as =, <, or <>.















18. NOT NULL -> The IS NOT NULL operator is used to test for non-empty values (NOT NULL values).
















19. UPDATE -> The UPDATE statement is used to modify the existing records in a table.





















20. DELETE -> The DELETE statement is used to delete existing records in a table.





















21. DROP TABLE -> is used to drop an existing table in a database.


22. ALTER TABLE-ADD Column -> To add a column in a table





















23. NOT NULL -> The NOT NULL constraint enforces a column to NOT accept NULL values.This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field.















24. UNIQUE -> The UNIQUE constraint ensures that all values in a column are different.Both the UNIQUE and PRIMARY KEY constraints provide a guarantee for uniqueness for a column or set of columns. A PRIMARY KEY constraint automatically has a UNIQUE constraint.However, you can have many UNIQUE constraints per table, but only one PRIMARY KEY constraint per table.


















25. PRIMARY KEY -> The PRIMARY KEY constraint uniquely identifies each record in a table. Primary keys must contain UNIQUE values, and cannot contain NULL values. A table can have only one primary key, which may consist of single or multiple fields.


















26. FOREIGN KEY -> A FOREIGN KEY is a key used to link two tables together. A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table. The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.