Thursday, February 28, 2013

Start to learning "JAVA"

World of programming  ​​have so many programs languages in it, in my blog has given some language tutorial and this time I will discuss about JAVA, we will learn from the beginning to the final stage.



History of Java
Java pioneered by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan of Sun Microsystems, Inc. in 1991. They need about 18 months to make the first version. This language was initially called "Oak" but was changed to "Java" in 1995 as the name of Oak have made copyright and used as other programming languages. Between making of Oak in fall 1992 to be announced to the public in the spring of 1995, many people involved in the design and evolution of language. Bill Joy, Arthur van Hoff, Jonathan Payne, Frank Yellin, and Tim Lindholm is a key contributor to finalize the original prototype.
Modern Java
Java has been used in many ways and have proven its existence in the 21st century. Today, Java is used various types of applications such as embedded applications, financial applications, desktops, airplane simulation, image processing, games, distributed enterprise applications called J2EE and much more.
Java Virtual Machine (JVM)
Java Virtual Machine is a simple application written in C language for mengeksi programs written in the Java language. At the time of compilation (a change from a high-level language into a lower language), the program was changed to CODE BYTE. Then at the time of execution, the JVM byte code reading tersebu and turn it into machine language understood by the operating system where the program is run.
Because the JVM is very dependent on the platform (machine language is a low level language only understood by a particular machine, such as Intel, but it can not be understood by other machines, such as the Macintosh), byte code can be made to be free from the confines of a particular platform. Byte code generated in the process of compiling the Java language will always be the same for each operating system or the type of engine, but it will change the JVM bytecode into machine language goals.
Just In Time Compiler (JIT)
Although Java was designed to be interpreted, technically nothing prevents Java is compiled into machine language like other programming languages. Sun provides a compiler Just In Time Compiler (JIT) compile to byte code into machine language at the same time with the execution. However, the JIT approach produces more capabilities than the usual interpretation.


 Excess of Java

Other programming languages ​​that existed before Java birth is a good language and easy dipelajasi by professional programmers. However, the programmer is wanting something new that has a lot to solve their problems. Primarily the security of their code. This gave rise to a revolutionary mind to find another programming language called Java. Not only the safety but also some things that are often referred to as a Java-buzzwords. These words explain the additional features and some of the things that makes Java so successful and accepted by the software world. Here is the description and advantages of these words.
Simple and Object Oriented
As described earlier, Java was born of a deep thinking will programming language that existed at the time, such as C and C + +. This will facilitate the professional programmer to understand more clearly about Java, functionality, and so if he has a basic knowledge of C + + and object-oriented programming concepts. The goal is that the basic concepts of Java technology can be understood easily, and the programmer can quickly produce something as early as possible. Not only this, the inventor of Java ensures that the Java programming language also stems from the existing base at the time. Then they throw a variety of complex and confusing features.
The Java programming language was designed from the outset to be an object-oriented language. After about 30 years, object technology finally become a reality and is accepted by most of the programming community. The concept of object-oriented software allows the creation of complex, network-based, so it can be concluded that the Java technology platform making software produces a good and efficient as well as object-oriented.
The advantage that you get from Java
Start quickly: Java is an object-oriented programming language, easy to learn, especially for programmers who are already familiar C or C + +


 Write fewer programs: Number of classes, number of methods, etc., show that a program written in the Java programming language has a number of 4-fold smaller than the same program written in C + +

    
Write a program better: the Java programming language advocating the practice of making a good program, and automatic garbage collection helps you avoid memory leaks. Object orientation, component architecture JavaBeans, and reach broad Yanga, an easily extensible API, allowing you to use your existing code.

    
Making programs more quickly: The Java programming language is easier than C + +, programming will be 2 times faster, with far fewer lines.

    
Avoid dependence on a specific platform: You can run your program on multiple platforms by using a library written NOT specific to a particular platform.

    
Write once, run anywhere: Because applications written in the Java language is compiled into byte code is platform independent, written application can be run consistently on any platform.

    
Distribute your software easily: With Java Web Start, the user program will be able to use your applications with ease. Automatic version checking system when the program starts the user ensures you are always running the latest version. If a new version is available, Java Web Start will install automatically.
 



source : java.lyracc 

Saturday, February 23, 2013

Google Searches for Style (google glasses)






People wearing Google’s glasses are transported to a strange new world in which the Internet is always in their line of sight. But for people looking at the people wearing those glasses, the view is even stranger — someone wearing a computer processor, a battery and a tiny screen on her face.

As Google and other companies begin to build wearable technology like glasses and watches, an industry not known for its fashion sense is facing a new challenge — how to be stylish. Design has always been important to technology, with products like Apple’s becoming fashion statements, but designing hardware that people will wear like jewelry is an entirely different task. 

In a sign of how acute the challenge is for Google, the company is negotiating with Warby Parker, an e-commerce start-up company that sells trendy eyeglasses, to help it design more fashionable frames, according to two people briefed on the negotiations who were not authorized to speak publicly because the partnership has not been made official.
Google and Warby Parker declined to comment.They join other companies that are grappling with these design challenges, including big companies like Apple, Nike and Jawbone and smaller ones like Pebble, MetaWatch and Misfit Wearables.
Jawbone’s health-tracking wristband, Up, for instance, was designed by Yves Behar, the company’s chief creative officer and a well-known designer who has worked with fashion and furniture companies. Apple, which is said to be making a smart watch, has assigned some of its top designers to make curved glass that is comfortable and aesthetically appealing. 

On Wednesday, Google began accepting applications to choose a small group of people to buy an early version of the glasses, called Google Glass. It hopes to sell Glass to the broader public this year, according to two people briefed on the plans.
The frames do not have lenses, though Google is experimenting with adding sunglass or prescription lenses in some versions. They have a tiny screen that appears much bigger from the wearer’s perspective than it does on the frame. Glass wearers can take pictures or record video without using their hands, send the images to friends or post them online, see walking directions, search the Web by voice command and view language translations. 

The glasses reach the Internet through Wi-Fi or Bluetooth, which connects to the wireless service on a user’s cellphone. The glasses respond when a user speaks, touches the frame or moves the head.
For Google, the glasses are a major step toward its dream of what is known as ubiquitous computing — the idea that computers and the Internet will be accessible anywhere and we can ask them to do things without lifting a finger.
The glasses will eventually incorporate several Google products, which could become more useful when they are in front of a user’s eyes rather than on a phone or a computer screen.
For instance, the latest version of the glasses can provide walking and hiking directions from Google Maps, alerts from Google Now about a coming meeting or a traffic jam, and video chats from Google Hangouts. 

In a video released on Wednesday, Google offered ideas about what to do with the glasses. A ballerina could record and stream live video behind the scenes and onstage; a tourist in Thailand could ask Google to translate the word “delicious” while eating noodles on a boat; or a family could video chat over a long distance with a relative on her birthday. 

Other seemingly far-fetched uses are not far off. The glasses could be used to play an augmented reality game in which the real world was annotated with virtual information. Google has such a smartphone app, called Ingress. Users could photograph an object or building and the glasses could identify it, something that is already possible using Google on phones and computers.
Though Google warns of technical bumps as people use the glasses, it has already solved many of the technical challenges. The biggest obstacle now is getting people to use them. 

Though Google employees have been spotted wearing them in the San Francisco Bay Area, they receive strange looks, for example, from a bartender who made fun of his Glass-wearing patrons.
Privacy advocates worry about a day when people wearing glasses could use facial recognition to identify strangers on the street or surreptitiously record and broadcast conversations. On a more mundane level, rude behavior like checking e-mail during conversations would become much easier to hide. 

google glasses

The America of the Arab Street






Why? What happened to the liberal youth of the Arab world in whom we invested our hopes and support? Why are Muslims so sensitive, so easily offended; why do some so readily resort to violence?
The liberal protesters who demanded freedom and democracy last year were able to unite and overthrow dictators in Tunisia and Egypt. But their failure to explain what their liberalism stands for has opened the way for a new, Islamist-oriented power elite that capitalizes on old lies and half-truths to twist religion and history to manipulate the masses. 

The leaders of nascent democracy-oriented political parties in the Arab world’s most politically vibrant country, Egypt, are hobbled by egotistical rivalries, a lack of centralized leadership, urban elitism and an inability to connect with rural majorities. Secular luminaries like Mohamed ElBaradei, former director of the International Atomic Energy Agency, or Naguib Sawiris, a prominent businessman and politician, are not at ease in the new Egypt. As their political parties struggle to articulate a message, Islamist leaders with strong religious credentials have been able to mobilize a broad popular base. 

Arab societies remain deeply religious. In liberal Morocco, 89 percent of the people say that religion is “very important” in their lives, according to a recent Pew poll. Mosques are packed every Friday; religious events promote widespread charity, and believers are encouraged to support candidates who are perceived to be more godly. But there is a deeper problem that goes well beyond the popular appeal of Islamist parties: A cancerous narrative has taken hold of many Arab minds. 

In Egypt, 75 percent of Muslims do not believe that Arabs carried out the 9/11 attacks, according to a 2011 Pew poll. Many believe that it was either Israel, the U.S. government, or both. The West is viewed through a hodgepodge of conspiracy theories, half-truths and a selective reading of history.
When I met Muhammad Mahdi Akef, the influential former leader of the Muslim Brotherhood, in April 2011, he insisted that Al Qaeda was a figment of the Western imagination. The idea that it doesn’t exist, that the United States attacked itself, is buttressed by preachers in mosques, on satellite television channels and in glossy Arabic books. 

The United States and the West are widely seen as waging a war on Muslims. Al Qaeda videos promote this vision as a continuation of the Crusades. Many Muslims recall incidents of perceived hostility in their own lifetime — the wars in Iraq and Afghanistan; the abuses at Abu Ghraib prison and Guantánamo Bay; the banning of minarets in Switzerland; the outlawing of face veils in France; NATO troops burning copies of the Koran in Afghanistan. In this vein, the recent anti-Islam film confirms the belief that the West is out to destroy Islam. 

In most Arab countries, citizens require government permission to produce films. For many Arabs, it is inconceivable that U.S. citizens are not under the same controls. The attacks on U.S. embassies after the release of the offensive video “Innocence of Muslims” on YouTube must be seen in this context.
When I watch Al Jazeera Arabic I am stunned by unchallenged references in talk show interviews to the “American Zionist plan” or “the American enemy” or the “ally of the Zionist entity.” Attacking the United States has become part of the political culture in much of the Middle East. To challenge it is to be a labeled a “sellout,” a “traitor” or a “Zionist agent” and to court social isolation.
And yet on the streets of Arab capitals, McDonald’s, Starbucks and other American brands remain hugely popular — as are American clothes, technology and television shows and films. The same U.S. embassies that were attacked were surrounded almost daily by long lines of people applying for visas to enter the United States. There are almost 50,000 Saudi students in American universities. Tens of thousands more from across the region are vying to do the same. 

On the day that the protests broke out in Egypt and Libya, I was in the Library of Congress in Washington. Founded in 1800, its main reading room has a magnificent dome with dedications to world civilizations — Islamic civilization prominent among them — to which the United States is indebted. A two-volume English translation of the Koran, donated by Thomas Jefferson, is preserved in the library. In 1805, President Jefferson invited the Muslim ambassador from Tunisia to the White House for an iftar meal to break the Ramadan fast.
Today, America’s Muslims are freer and more prosperous than Muslims in any other part of the world. Their daily lives show that the narrative about a U.S.-Islam war is a myth.
The Arab world is at an important crossroads. It is time to abandon this false narrative. Not enough has been done to educate Arab and Muslim religious leaders in the Middle East about the reality of religious freedom in America. Their misunderstanding of liberty leads to their silence — or worse, incitement.
A U.S. invitation to Ali Gomaa, Egypt’s grand mufti, Sheik Ahmed al-Tayyib, grand imam of Al-Azhar, or Saudi Arabia’s popular Sheik Salman al-Awdah as guests of the American people at the president’s State of the Union address in Congress would help demonstrate a different America to young, religious Arabs. These clerics, and others like them, command the support of millions. We can create a new narrative.
The United States can also help by being seen to be a fair arbitrator of the Arab-Israeli conflict. Better relations with some 300 million Arabs strengthens U.S. influence, and helps more than 7 million Israelis, too.
No country has as much soft power at its disposal in the Arab world as does the United States. A new generation of Arabs deserve a better future than following the madness of those who shout “Obama, Obama, we are all Osama.” 

Ed Husain is a senior fellow for Middle Eastern Studies at the Council on Foreign Relations.
“Obama, Obama, we are all Osama” the crowd chanted outside the U.S. Embassy in Cairo on Sept. 11. The slogan also found its way to Tunis, where a mob attacked the embassy as well, and the chant was taken up in Qatar and other Muslim countries. 


Friday, February 22, 2013

INTRODUCTION TO DATA COMMUNICATIONS

  • 1. INTRODUCTION TO DATA COMMUNICATIONS DEFINITION OF TERMS F         Data Communication is the act of relaying a message or information in binary form between two points (the transmitter and the receiver). F Computer Network is an interconnected collection of autonomous computers. Autonomous means that there should no clear master/slave relationship between the computers. NETWORK GOALS F Resource Sharing. One goal of establishing computer networks is to facilitate sharing of programs, equipment, and data without any regard to the physical location of resource and the user. F High Reliability. Computer networks provide high reliability by having alternative sources of supply. For example, all files could be replicated on two or three machines, so if one of them is unavailable (due to hardware failure), the other copies could be used. Introduction to Data Communications 1 

  • 2. F Cost Savings. Small personal computers connected in a network have a much better price/performance ratio than large ones such as mainframes. F Communication Medium. A computer network can provide a powerful communication medium among widely separated employees. Networks can enhance human-to-human communication. USES OF DATA COMMUNICATION AND NETWORKS F Access to Remote Information F Electronic Mail F Electronic Banking F Electronic Newspaper and Libraries F Electronic Bulletin Boards F Value-Added Services F On-line Department Stores/Groceries F Interactive Entertainment Introduction to Data Communications 2 

  • 3. NETWORK CLASSIFICATION F                                                                                      Networks are often classified by the distance of the communicating processors from each other. Interprocessor Processors located Example Distance in the same 0.1 m Circuit Board Data Flow Machine 1m System Multicomputer 10 m Room Local Area Network 100 m Building Local Area Network 1 km Campus Local Area Network 10 km City Metropolitan Area Network 100 km Country Wide Area Network 1,000 km Continent Wide Area Network 10,000 km Planet The Internet Data flow machines are highly parallel computers with many functional units all working on the same program. Multicomputers are systems that communicate by sending messages over very short, very fast buses. A Metropolitan Area Network (MAN) is basically a bigger version of a LAN and normally uses similar technology. Introduction to Data Communications 3 

  • 4. CONNECTIVITY ALTERNATIVES F                                                                              Stand Alone Sharing of diskettes Modem and the public telephone system Temporary physical connection Local area network (but the network software is enabled only when needed) Applications and Data Personal Computer Introduction to Data Communications 4 

  • 5. F Shared Logic Sharing the capability of a single processor with more than one user time sharing In multiprocessor systems, shared logic means sharing the main processors or support processors with more than one user. user enters commands here applications execute here Shared Dumb Terminal Applications Storage and Shared Data Host Computer applications share (shared processor) data here Dumb Terminal Introduction to Data Communications 5 

  • 6. F Shared Resources Multi-user sharing of devices and/or peripherals applications execute here Shared Personal Computer Local Area Applications Network Storage and Shared Data Network File Server applications share data here Personal Computer applications execute here Issues: 1. Equitable sharing of devices 2. Integrity of data Introduction to Data Communications 6 

  • 7. F Shared Logic and Resources applications execute here user enters commands here Personal Computer Local Area Network Shared Shared Applications Applications Storage and Storage and Shared Data Shared Data Network File Server Host Computer (shared processor) applications share applications share data here data here applications execute here Introduction to Data Communications 7



Wednesday, February 13, 2013

History of why there is valentine day

1297613277455109443 
In modern times, Valentine's day is dominated by pink hearts and arrows by Cupid. Though the origin of this celebration is very much different from the symbols of love.Valentine actually was a Catholic monk who was martyred. Valentine was sentenced to death by the emperor Claudius II for opposing Roman rule against young love and marriage in a relationship because they are sent to war.

At that time, the glory of the Roman Empire was at the center of the threat of collapse due to deterioration of its officials and civil uprising. In the wild frontier territory, the threat comes from the nation's Gaul, the Huns, Slavs, Mongolia and Turkey. They threatened regions Northern Europe and Asia. Apparently the empire so vast and expanding through conquest has claimed many victims, both from the people of the colony and the Romans themselves. Later they were no longer able to control and manage this vast region.To maintain its empire, Claudius II relentless recruiting Roman men considered still able to fight, as the soldiers prepared to depart to the battlefield. The emperor saw soldiers who have bonds of love and marriage is not a good soldier. Bond of love and inner with family and loved ones will only weaken their fighting power. Therefore, he forbade Roman men love relationship, engaged or married.


Valentine, the young monk saw their suffering is not love which endured until this trauma. They secretly gathered and gained spiritual spray of Valentine. The brothers even gave them the sacrament of marriage. Finally, the action is wafted by the Emperor. Valentine was imprisoned. Because he opposed the rule of the emperor and refused to recognize the Roman gods, he was sentenced to death.In prison, he was best friends with a prison officer named Asterius. This prison guard has a daughter who suffers from blindness since birth. Her name is Julia. Valentine tried to cure his blindness. While treating, Valentine taught history and religion. He describes the world of the universe so that Julia can feel the meaning and kebijaksanannya through the lesson.Julia asks, "Did God really hear our prayers?""Yes, my son. He hears every prayer. ""Do you know what I pray for every morning? I pray that I can see. 

 I want to see the world as you've taught me. ""God does what is best for us, if we believe in Him," said Valentine."Oh, sure. I really believe in him, "said Julia steadily.Then they knelt together and prayed.A few weeks later, she still has not healed. Until it was time for Valentine's death. Valentine did not get to say goodbye to Julia, but he wrote the speech with a message to be closer to God. Not to forget the added the words, "Love from your Valentine" (which eventually became a worldwide expression). He died February 14 269. Valentine Praksedes buried in the Church of Rome.The next day, she received a letter. Upon opening the letter, she could see the letters and colors for the first time seen. Julia cured of his blindness.

In 496, Pope Gelasius I declared February 14 as a day of commemoration St. Valentine.Valentine accidental death date coincides with the celebration of Lupercalia, a celebration in honor of the Roman god of fertility Februata Juno. In this celebration, the Romans did sexual lottery! The trick, they see themselves a name in one container, then take a random name the opposite sex. Name obtained it became his life partner for a year. Then on the next celebration they cast lots again.Apparently the Pope was not comfortable in the way this celebration. For this reason, the church slightly modify this celebration. They include the names of the saints in the box. During the year everyone will imitate the saint was written on the lottery taken. To make the event a little funny, the church also enter the name of Simeon Stylites. The person who took the name of the alias is considered bad luck not lucky, because Simeon spent his life on the pillar, did not move once.Valentine's name then immortalized in this annual festival. In this festival, lovers or married Roman expressing feelings of love and love in the message and reads the letter hand. In mainland Europe is growing tradition by writing the words of love and in the form of cards decorated with hearts and Cupid the god of love to anyone. Or give little attention to the flowers, chocolates and sweets.In modern times, the habit of writing letters by hand is not considered practical. After all, not everyone can weave romantic words. Then came the valentine cards are considered more practical. The first modern Valentine card was sent by Charles nobleman Orleans to his wife, in 1415. When he was imprisoned in the Tower of London. The card is still dipameran in the British Museum. In America, Esther Howland was the first to send a valentine card. Valentine cards were first produced commercially in the 1800s.


Unfortunately from day to day, Valentine perayan have lost the true meaning. The spirit of sacrificial love nd St. Valentine was overcome by lust komesialisasi celebration. For that we need to restore the meaning of this celebration, as in 1 John 4:16: "We have known and believed the love of God to us. God is love, and whoever abides in love, he remains in God and God in him "


source 

Tuesday, February 12, 2013

The importance of database,why progammer must learn?

The importance of language acquisition for the database programmer then I'll explain why it's important

The database , is a collection of information stored on a computer in a systematic way so that it can be checked using a computer program to obtain information from the database. The software used to manage and call query (query) data base called a database management system (database management system, DBMS). Database systems are studied in information science.
The term "database" originated from computer science. Although then it means wider, put things outside the field of electronics, this article on a computer database. Note that similar to the actual database existed before the industrial revolution in the form of ledgers, receipts and collection of data related to the business.
The basic concept of the database is a collection of records, or pieces of knowledge. A structured database has a description of the kinds of facts that are stored in it: an explanation is called schema. Scheme describing the object, represented a database, and the relationships between objects. There are many ways to organize the scheme, or modeling the database structure: these are known as the model database or data model. Models are commonly used today is the relational model, which in layman terms represent all the information in the form of tables that are interconnected with each table consists of rows and columns (the true definition uses mathematical terminology). In this model, the relationship between table represented premises using the same values ​​between tables. Other models such as the hierarchical model and the network model use a more explicit way to represent relationships between tables.
The term database refers to a collection of data that are interconnected, and the software should be referred to as a database management system (database management system / DBMS). If the context is clear, many administrators and programmers use the term database for both meanings.
Environmental database
Database environment is a habitat where there is a data base for the business. In a database environment, users have the tools to access the data. Users perform all types of work and their varied purposes such as to collect data (data mining), modify data, or trying to create new data. Still in the database, some users are not allowed access to the data, both physically and logically. " (Koh, 2005, in Janner Simarmata & Imam Paryudi 2006: 33).


Database software that are widely used in programming and a device database cedar (high level):

 In addition to the above software, there are also software programming database cedar low (low level), including:

basic SQL (Query Language)

Okay buddy this time I will discuss a basic tutorial of SQL, for those of you lovers of course you need to know programming ​QUERY  language, and I will guide you to learn from the basic to the application of the code, let's start...

 SQL (Structured Query Language) is a language used to access data in a relational database. This language is the de facto standard language used in relational database management. Currently, almost all existing database server supports this language to perform data management.
HistorySQL history starts from the article, a researcher at IBM named Jhonny Oracle that discusses the idea of ​​making a relational database in June 1970. This article also discusses the possibility of manufacturing a standard language for accessing data in the database. Language is then given the name of the sequel (Structured English Query Language).
After the publication of the article, IBM held a project of the relational database language based sequel. However, due to legal issues regarding the naming Sequel, IBM also turn it into SQL. Implementation of relational database known as the System / R.
In the late 1970s, the emerging company called Oracle that makes popular database server named after the company. With the rising popularity John Oracle, SQL too popular then so is currently a de facto standard language in database management.
StandardizationSQL standardization began in 1986, marked by the release of the ANSI SQL standard. This standard is often referred to as SQL86.Standar is then repaired in 1989 and then improved again in 1992. The latest version is known as SQL92. In 1999, a new standard called the SQL99 or SQL99, but most of the SQL92 reference implementation.
Currently, there is actually no database server is 100% supported SQL92. This is because each server has their dialect.
Basic usageIn general, SQL consists of two languages, namely the Data Definition Language (DDL) and Data Manipulation Language (DML). Implementation of DDL and DML different for each database management system (DBMS) [4], but in general the implementation of each of these languages ​​have a form set ANSI standards. This article will use the most common form that can be used on most DBMS. 

Data Definition Language
DDL is used to define, modify, and delete databases and objects needed in the database, such as tables, views, users, and so on. In general, DDL CREATE is used to create new objects, USE to use objects, ALTER to modify an existing object, and DROP to remove the object. DDL is typically used by database administrators in the creation of a database application.


CREATE

CREATE is used to create a database and database objects. SQL commonly used are:

CREATE DATABASE nama_basis_data

CREATE DATABASE create a new database.

CREATE TABLE table_name


CREATE TABLE create a new table in the current database. In general, this command has the form

CREATE TABLE [table_name]
(
nama_field1 tipe_data [constraints] [,
nama_field2 tipe_data,
...]
)


or

CREATE TABLE [table_name]
(
nama_field1 tipe_data [,
nama_field2 tipe_data,
...]
[CONSTRAINT nama_field constraints]
)


with:

nama_field is the name of the column (field) to be made. Some database management systems allow the use of space and character nonhuruf column name.

type_data depending on the implementation of data base management systems. For example, in MySQL, can be any data type VARCHAR, TEXT, BLOB, ENUM, and so on.

constraints are limits given for each column. It also depends on the implementation of the database management system, such as NOT NULL, UNIQUE, and so on. This can be used to define the primary key (primary key) and a foreign key (foreign key).

The table may not have a primary key at all, but it is advisable to define at least one column as the primary key.

example:

CREATE TABLE user
(
username VARCHAR (30) CONSTRAINT PRIMARY KEY,
passwd VARCHAR (20) NOT NULL,birth_date DATETIME
);


will create a user table as follows:
passwd| username| birth_date


Data Manipulation Language
DML is used to manipulate data in a table. The common commands are:

    
SELECT to display data
    
INSERT to add new data
    
UPDATE to modify existing data
    
DELETE to delete data

SELECT
SELECT is the most frequently used commands in SQL, so sometimes the term referred to a SELECT query. SELECT is used to display data from one or more tables, usually in the same database. In general, a complete SELECT statement has the form: (QUERY Budin) Cilegon.
SELECT [table_name | aka.] Name_field1 [AS aka1] [, name_field2 ...]FROM name_tabel1 [AS aka1] [INNER | LEFT | RIGHT JOIN ON tabel2 condition[, Nama_tabel3 [AS alias3], ...][WHERE condition][ORDER BY name_field1 [ASC | DESC] [, name_field2 [ASC | DESC], ...]][GROUP BY name_field1 [, name_field2, ...]][HAVING condition_aggregat]
with:

    
conditions is a requirement that must be met in order to display the data.
    
kondisi_aggregat are special requirements for aggregate functions.
The condition can be associated with logical operators such as AND, OR, and so on.
Example:
It is assumed there is a user table that contains the following data.passwd username tanggal_lahir jml_transaksi total_transaksiAris 6487AD5EF 09-09-1987 6 10 000Budi 97AD4erD 01-01-1994 0 0Charlie 548794654 06-12-1965 24 312 150Daniel FLKH947HF 24-04-1980 3 0Erik 94RER54 17-08-1945 34 50 000Example 1: Show all data.
SELECT *FROM user
Example 2: Show users who never transact.
SELECT *FROM userWHERE total_transaksi = 0
Example 3: Display user's username to a transaction value of less than 10 and more than 1,000.
SELECT usernameFROM userWHERE jml_transaction <10 AND total_transaction> 1000Example 4: Show the total nominal transaction has occurred.
SELECT SUM (total_transaction) AS total_nominal_transactionFROM userExample 5: Show all data sorted by largest to the smallest number of transactions.
SELECT *FROM userORDER BY DESC jml_transaction

  
 Aggregate functions

Some DBMS have aggregate function, ie the specific functions that involve a bunch of data (aggregate). In general, aggregate functions are:

     SUM to calculate the total nominal Data
     COUNT to count the number of occurrences of data
     AVG to compute an average group of data
     MAX and MIN to get the maximum / minimum of a bunch of data.

Aggregate function is used in the SELECT. Requirements to be added to the aggregate function HAVING, not WHERE.
subquery

Sometimes queries can be complex, especially if it involves more than one table and / or aggregate functions. Some DBMS allow the use of subquery. example:

Show username users who have the greatest number of transactions.

SELECT username
FROM user
WHERE jml_transaction =
(
SELECT MAX (jml_transaction)
FROM user
)


INSERT

To save the data in the table is the syntax:

INSERT INTO [NAMA_TABLE] ([DAFTAR_FIELD]) VALUES ([DAFTAR_NILAI])

example:

INSERT INTO TEST (NAME, ADDRESS, PASSWORD) VALUES ('test', 'address', 'pass');


UPDATE

To change the data using the syntax:

UPDATE [NAMA_TABLE] SET [field_name] = [VALUE] WHERE [CONDITIONS]

example:

UPDATE Muser set password = "123456" where username = "abc"

DELETE

To delete the data used syntax:

DELETE FROM [nama_table] Where [EVENT]

example:

DELETE FROM TEST WHERE NAME = 'test';


This is the basis for determining SQL then please wait for my next post and continue to see other tutorial in my blog .Thanks
Source : id.wikipedia.org
 

 
Pratama Master powered by blogger.com
Design by Simple Diamond and Pratama Master