Data warehousing is a business analyst's dream—all the information about the organization's activities gathered in one place, open to a single set of analytical tools. But how do you make the dream a reality? First, you have to plan your data warehouse system. You must understand what questions users will ask it (e.g., how many registrations did the company receive in each quarter, or what industries are purchasing custom software development in the Northeast) because the purpose of a data warehouse system is to provide decision-makers the accurate, timely information they need to make the right choices.
To illustrate the process, we'll use a data warehouse we designed for a custom software development, consulting, staffing, and training company. The company's market is rapidly changing, and its leaders need to know what adjustments in their business model and sales practices will help the company continue to grow. To assist the company, we worked with the senior management staff to design a solution. First, we determined the business objectives for the system. Then we collected and analyzed information about the enterprise. We identified the core business processes that the company needed to track, and constructed a conceptual model of the data. Then we located the data sources and planned data transformations. Finally, we set the tracking duration.
Step 1: Determine Business Objectives
The company is in a phase of rapid growth and will need the proper mix of administrative, sales, production, and support personnel. Key decision-makers want to know whether increasing overhead staffing is returning value to the organization. As the company enhances the sales force and employs different sales modes, the leaders need to know whether these modes are effective. External market forces are changing the balance between a national and regional focus, and the leaders need to understand this change's effects on the business.
To answer the decision-makers' questions, we needed to understand what defines success for this business. The owner, the president, and four key managers oversee the company. These managers oversee profit centers and are responsible for making their areas successful. They also share resources, contacts, sales opportunities, and personnel. The managers examine different factors to measure the health and growth of their segments. Gross profit interests everyone in the group, but to make decisions about what generates that profit, the system must correlate more details. For instance, a small contract requires almost the same amount of administrative overhead as a large contract. Thus, many smaller contracts generate revenue at less profit than a few large contracts. Tracking contract size becomes important for identifying the factors that lead to larger contracts.
As we worked with the management team, we learned the quantitative measurements of business activity that decision-makers use to guide the organization. These measurements are the key performance indicators, a numeric measure of the company's activities, such as units sold, gross profit, net profit, hours spent, students taught, and repeat student registrations. We collected the key performance indicators into a table called a fact table.
Step 2: Collect and Analyze Information
The only way to gather this performance information is to ask questions. The leaders have sources of information they use to make decisions. Start with these data sources. Many are simple. You can get reports from the accounting package, the customer relationship management (CRM) application, the time reporting system, etc. You'll need copies of all these reports and you'll need to know where they come from.
Often, analysts, supervisors, administrative assistants, and others create analytical and summary reports. These reports can be simple correlations of existing reports, or they can include information that people overlook with the existing software or information stored in spreadsheets and memos. Such overlooked information can include logs of telephone calls someone keeps by hand, a small desktop database that tracks shipping dates, or a daily report a supervisor emails to a manager. A big challenge for data warehouse designers is finding ways to collect this information. People often write off this type of serendipitous information as unimportant or inaccurate. But remember that nothing develops without a reason. Before you disregard any source of information, you need to understand why it exists.
Another part of this collection and analysis phase is understanding how people gather and process the information. A data warehouse can automate many reporting tasks, but you can't automate what you haven't identified and don't understand. The process requires extensive interaction with the individuals involved. Listen carefully and repeat back what you think you heard. You need to clearly understand the process and its reason for existence. Then you're ready to begin designing the warehouse.
Step 3: Identify Core Business Processes
By this point, you must have a clear idea of what business processes you need to correlate. You've identified the key performance indicators, such as unit sales, units produced, and gross revenue. Now you need to identify the entities that interrelate to create the key performance indicators. For instance, at our example company, creating a training sale involves many people and business factors. The customer might not have a relationship with the company. The client might have to travel to attend classes or might need a trainer for an on-site class. New product releases such as Windows 2000 (Win2K) might be released often, prompting the need for training. The company might run a promotion or might hire a new salesperson.
The data warehouse is a collection of interrelated data structures. Each structure stores key performance indicators for a specific business process and correlates those indicators to the factors that generated them. To design a structure to track a business process, you need to identify the entities that work together to create the key performance indicator. Each key performance indicator is related to the entities that generated it. This relationship forms a dimensional model. If a salesperson sells 60 units, the dimensional structure relates that fact to the salesperson, the customer, the product, the sale date, etc.
Then you need to gather the key performance indicators into fact tables. You gather the entities that generate the facts into dimension tables. To include a set of facts, you must relate them to the dimensions (customers, salespeople, products, promotions, time, etc.) that created them. For the fact table to work, the attributes in a row in the fact table must be different expressions of the same event or condition. You can express training sales by number of seats, gross revenue, and hours of instruction because these are different expressions of the same sale. An instructor taught one class in a certain room on a certain date. If you need to break the fact down into individual students and individual salespeople, however, you'd need to create another table because the detail level of the fact table in this example doesn't support individual students or salespeople. A data warehouse consists of groups of fact tables, with each fact table concentrating on a specific subject. Fact tables can share dimension tables (e.g., the same customer can buy products, generate shipping costs, and return times). This sharing lets you relate the facts of one fact table to another fact table. After the data structures are processed as OLAP cubes, you can combine facts with related dimensions into virtual cubes.
Step 4: Construct a Conceptual Data Model
After identifying the business processes, you can create a conceptual model of the data. You determine the subjects that will be expressed as fact tables and the dimensions that will relate to the facts. Clearly identify the key performance indicators for each business process, and decide the format to store the facts in. Because the facts will ultimately be aggregated together to form OLAP cubes, the data needs to be in a consistent unit of measure. The process might seem simple, but it isn't. For example, if the organization is international and stores monetary sums, you need to choose a currency. Then you need to determine when you'll convert other currencies to the chosen currency and what rate of exchange you'll use. You might even need to track currency-exchange rates as a separate factor.
Now you need to relate the dimensions to the key performance indicators. Each row in the fact table is generated by the interaction of specific entities. To add a fact, you need to populate all the dimensions and correlate their activities. Many data systems, particularly older legacy data systems, have incomplete data. You need to correct this deficiency before you can use the facts in the warehouse. After making the corrections, you can construct the dimension and fact tables. The fact table's primary key is a composite key made from a foreign key of each of the dimension tables.
Data warehouse structures are difficult to populate and maintain, and they take a long time to construct. Careful planning in the beginning can save you hours or days of restructuring.
Step 5: Locate Data Sources and Plan Data Transformations
Now that you know what you need, you have to get it. You need to identify where the critical information is and how to move it into the data warehouse structure. For example, most of our example company's data comes from three sources. The company has a custom in-house application for tracking training sales. A CRM package tracks the sales-force activities, and a custom time-reporting system keeps track of time.
You need to move the data into a consolidated, consistent data structure. A difficult task is correlating information between the in-house CRM and time-reporting databases. The systems don't share information such as employee numbers, customer numbers, or project numbers. In this phase of the design, you need to plan how to reconcile data in the separate databases so that information can be correlated as it is copied into the data warehouse tables.
You'll also need to scrub the data. In online transaction processing (OLTP) systems, data-entry personnel often leave fields blank. The information missing from these fields, however, is often crucial for providing an accurate data analysis. Make sure the source data is complete before you use it. You can sometimes complete the information programmatically at the source. You can extract ZIP codes from city and state data, or get special pricing considerations from another data source. Sometimes, though, completion requires pulling files and entering missing data by hand. The cost of fixing bad data can make the system cost-prohibitive, so you need to determine the most cost-effective means of correcting the data and then forecast those costs as part of the system cost. Make corrections to the data at the source so that reports generated from the data warehouse agree with any corresponding reports generated at the source.
You'll need to transform the data as you move it from one data structure to another. Some transformations are simple mappings to database columns with different names. Some might involve converting the data storage type. Some transformations are unit-of-measure conversions (pounds to kilograms, centimeters to inches), and some are summarizations of data (e.g., how many total seats sold in a class per company, rather than each student's name). And some transformations require complex programs that apply sophisticated algorithms to determine the values. So you need to select the right tools (e.g., Data Transformation Services—DTS—running ActiveX scripts, or third-party tools) to perform these transformations. Base your decision mainly on cost, including the cost of training or hiring people to use the tools, and the cost of maintaining the tools.
You also need to plan when data movement will occur. While the system is accessing the data sources, the performance of those databases will decline precipitously. Schedule the data extraction to minimize its impact on system users (e.g., over a weekend).
Step 6: Set Tracking Duration
Data warehouse structures consume a large amount of storage space, so you need to determine how to archive the data as time goes on. But because data warehouses track performance over time, the data should be available virtually forever. So, how do you reconcile these goals?
The data warehouse is set to retain data at various levels of detail, or granularity. This granularity must be consistent throughout one data structure, but different data structures with different grains can be related through shared dimensions. As data ages, you can summarize and store it with less detail in another structure. You could store the data at the day grain for the first 2 years, then move it to another structure. The second structure might use a week grain to save space. Data might stay there for another 3 to 5 years, then move to a third structure where the grain is monthly. By planning these stages in advance, you can design analysis tools to work with the changing grains based on the age of the data. Then if older historical data is imported, it can be transformed directly into the proper format.
Step 7: Implement the Plan
After you've developed the plan, it provides a viable basis for estimating work and scheduling the project. The scope of data warehouse projects is large, so phased delivery schedules are important for keeping the project on track. We've found that an effective strategy is to plan the entire warehouse, then implement a part as a data mart to demonstrate what the system is capable of doing. As you complete the parts, they fit together like pieces of a jigsaw puzzle. Each new set of data structures adds to the capabilities of the previous structures, bringing value to the system.
Data warehouse systems provide decision-makers consolidated, consistent historical data about their organization's activities. With careful planning, the system can provide vital information on how factors interrelate to help or harm the organization. A solid plan can contain costs and make this powerful tool a reality.
Original Source
David Walls and Mark D. Scott - Via SQLMag.Com
Life force us to change even though we want to remain the same. Only histories and memories that will never change. :)
Friday, September 12, 2014
Tuesday, September 9, 2014
Data Visualization and Data Cubes - by Andrei Pandre
Data Visualization stands on the shoulders of the giants – previously tried and true technologies like Columnar Databases, in-memory Data Engines and multi-dimensional Data Cubes (known also as OLAP Cubes).
OLAP (online analytical processing) cube on one hand extends a 2-dimensional array (spreadsheet table or array of facts/measures and keys/pointers to dictionaries) to a multidimensional DataCube, and on other hand DataCube is using datawarehouse schemas like Star Schema or Snowflake Schema.
The OLAP cube consists of facts, also called measures, categorized by dimensions (it can be much more than 3 Dimensions; dimensions referred from Fact Table by “foreign keys”). Measures are derived from the records in the Fact Table and Dimensions are derived from the dimension tables, where each column represents one attribute (also called dictionary; dimension can have many attributes). Such multidimensional DataCube organization is close to a Columnar DB data structures. One of the most popular usage of datacubes is a visualization of them in form of Pivot tables, where attributes used as rows, columns and filters while values in cells are appropriate aggregates (SUM, AVG, MAX, MIN, etc.) of measures.
OLAP operations are foundation for most UI and functionality used by Data Visualization tools. The DV user (sometimes called analyst) navigates through the DataCube and its DataViews for a particular subset of the data, changing the data’s orientations and defining analytical calculations. The user-initiated process of navigating by calling for page displays interactively, through the specification of slices via rotations and drill down/up is sometimes called “slice and dice”. Common operations include slice and dice, drill down, roll up, and pivot:
Slice:
A slice is a subset of a multi-dimensional array corresponding to a single value for one or more members of the dimensions not in the subset.
Dice:
The dice operation is a slice on more than two dimensions of a data cube (or more than two consecutive slices).
Drill Down/Up:
Drilling down or up is a specific analytical technique whereby the user navigates among levels of data ranging from the most summarized (up) to the most detailed (down).
Roll-up:
(Aggregate, Consolidate) A roll-up involves computing all of the data relationships for one or more dimensions. To do this, a computational relationship or formula might be defined.
Pivot:
This operation is also called rotate operation. It rotates the data in order to provide an alternative presentation of data – the report or page display takes a different dimensional orientation.
OLAP Servers with most marketshare are: SSAS (Microsoft SQL Server Analytical Services), Intelligence Server (Microstrategy), Essbase (Oracle also has so called Oracle Database OLAP Option), SAS OLAP Server, NetWeaver Business Warehouse (SAP BW), TM1 (IBM Cognos), Jedox-Palo (I cannot recommend it) etc.
Microsoft had (and still has) the best IDE to create OLAP Cubes (it is a slightly redressed version of Visual Studio 2008, known as BIDS – Business Intelligence Development Studio usually delivered as part of SQL Server 2008) but Microsoft failed (for more than 2 years) to update it for Visual Studio 2010 (update is coming together with SQL Server 2012). So people forced to keep using BIDS 2008 or use some tricks with Visual Studio 2010.
Original Source : Apandre Wordpress
OLAP (online analytical processing) cube on one hand extends a 2-dimensional array (spreadsheet table or array of facts/measures and keys/pointers to dictionaries) to a multidimensional DataCube, and on other hand DataCube is using datawarehouse schemas like Star Schema or Snowflake Schema.
The OLAP cube consists of facts, also called measures, categorized by dimensions (it can be much more than 3 Dimensions; dimensions referred from Fact Table by “foreign keys”). Measures are derived from the records in the Fact Table and Dimensions are derived from the dimension tables, where each column represents one attribute (also called dictionary; dimension can have many attributes). Such multidimensional DataCube organization is close to a Columnar DB data structures. One of the most popular usage of datacubes is a visualization of them in form of Pivot tables, where attributes used as rows, columns and filters while values in cells are appropriate aggregates (SUM, AVG, MAX, MIN, etc.) of measures.
OLAP operations are foundation for most UI and functionality used by Data Visualization tools. The DV user (sometimes called analyst) navigates through the DataCube and its DataViews for a particular subset of the data, changing the data’s orientations and defining analytical calculations. The user-initiated process of navigating by calling for page displays interactively, through the specification of slices via rotations and drill down/up is sometimes called “slice and dice”. Common operations include slice and dice, drill down, roll up, and pivot:
Slice:
A slice is a subset of a multi-dimensional array corresponding to a single value for one or more members of the dimensions not in the subset.
Dice:
The dice operation is a slice on more than two dimensions of a data cube (or more than two consecutive slices).
Drill Down/Up:
Drilling down or up is a specific analytical technique whereby the user navigates among levels of data ranging from the most summarized (up) to the most detailed (down).
Roll-up:
(Aggregate, Consolidate) A roll-up involves computing all of the data relationships for one or more dimensions. To do this, a computational relationship or formula might be defined.
Pivot:
This operation is also called rotate operation. It rotates the data in order to provide an alternative presentation of data – the report or page display takes a different dimensional orientation.
OLAP Servers with most marketshare are: SSAS (Microsoft SQL Server Analytical Services), Intelligence Server (Microstrategy), Essbase (Oracle also has so called Oracle Database OLAP Option), SAS OLAP Server, NetWeaver Business Warehouse (SAP BW), TM1 (IBM Cognos), Jedox-Palo (I cannot recommend it) etc.
Microsoft had (and still has) the best IDE to create OLAP Cubes (it is a slightly redressed version of Visual Studio 2008, known as BIDS – Business Intelligence Development Studio usually delivered as part of SQL Server 2008) but Microsoft failed (for more than 2 years) to update it for Visual Studio 2010 (update is coming together with SQL Server 2012). So people forced to keep using BIDS 2008 or use some tricks with Visual Studio 2010.
Original Source : Apandre Wordpress
Sunday, September 7, 2014
Pengalaman Operasi Gigi Bungsu
![]() |
| Contoh Gigi Bungsu (Bukan Gigi Nico) |
Selamat malam. Saya mau cerita dulu ah sambil nunggu ngantuk. Minggu lalu, tepatnya 30 Agustus 2014, akhirnya saya merasakan apa yang disebut operasi. Saya diharuskan untuk operasi kecil untuk pengangkatan gigi bungsu saya yang tumbuh miring. Meskipun operasinya disebut operasi kecil, tetap saja saya ngeri karena tidak pernah merasakan apa yang disebut operasi.
Sekilas tentang gigi bungsu dari Wikipedia :
Gigi bungsu adalah gigi geraham ketiga yang muncul pada usia sekitar 18-30 tahun. Gigi bungsu termasuk dalam kategori struktur vestigial, yaitu struktur yang fungsi awalnya menjadi hilang atau berkurang sejalan dengan evolusi. Banyak ahli berpendapat bahwa perubahan jenis makanan pada manusia modern dari mentah menjadi dimasak membuat makanan lebih lunak. Selain itu, pemeliharaan gigi modern mengalami kemajuan pesat. Akibatnya kerusakan pada gigi berkurang. Kehadiran gigi bungsu yang diperkirakan dapat membantu bila ada geraham lain yang tanggal menjadi tidak berguna, hal ini menjadi masalah bagi kebanyakan orang. Masalah pada gigi bungsu
- Gigi yang berdesakan. Karena gigi bungsu tumbuh paling akhir, kadang-kadang rahang tidak memiliki tempat yang cukup untuk gigi bungsu tumbuh dengan wajar. Akibatnya gigi bungsu mendesak gigi geraham yang berada di depannya. Hal ini akan mengakibatkan sakit pada gigi. Masalah ini umumnya diatasi dengan mencabut gigi bungsu yang baru tumbuh. Bila gigi bungsu menempati posisi yang sulit untuk dicabut, yang dicabut adalah gigi geraham yang terdesak sehingga gigi bungsu mendapat tempat yang cukup untuk tumbuh.
- Gigi yang tidak muncul sempurna pada gusi. Terkadang gigi bungsu tidak muncul dengan sempurna pada gusi. Gusi yang menutupi gigi dapat menyebabkan penumpukan sisa makanan dan bakteri yang dapat menyebabkan infeksi dan sakit pada gigi.
Sedikit cerita sebelum operasi, sebelumnya saya tidak pernah mengeluh sakit gigi. Namun saya punya penyakit kulit yang saya lupa namanya. Sebenarnya bukan penyakit kulit, tapi keadaan abnormal dari kaki saya yang kulit alas kakinya lebih tebal dan berkeringat lebih daripada pada umumnya. Alhasil dari 3 dokter kulit selama 2 tahun bertualang, semuanya menyarankan ke dokter gigi untuk dilakukan pengecekan apakah ada masalah dengan gigi saya. Singkat cerita setelah konsultasi dan rontgen ternyata saya mendapati masalah fokal infeksi. Apa itu?
...
Sumber 1: Fokal infeksi adalah suatu infeksi lokal yang biasanya dalam jangka waktu cukup lama (kronis), dimana hanya melibatkan bagian kecil dari tubuh, yang kemudian dapat menyebabkan suatu infeksi atau kumpulan gejala klinis pada bagian tubuh yang lain.
Sumber 2: Fokus infeksi merupakan asal mula dan penyebab berkembangnya penyakit sistemik seperti arthritis, ulcus peptik dan apendisitis. Fokal infeksi terutama yang disebabkan oleh penyakit periodontal di permukaan marginal maupun apikal merupakan faktor risiko terjadinya penyakit sistemik.
Penyakit periodontal merupakan reaksi inflamasi, yang disebabkan oleh bakteri anaerob gram negatif pada jaringan pendukung gigi. Penyakit periodontal bersifat kronis, perkembangannya lambat dan umumnya tidak diikuti gejala.
Pembengkakan gigi bisa saja merupakan manifestasi dari penyakit sistemik.
Gigi dan jaringan mulut yang tidak dibersihkan merupakan pusat infeksi. Ada tiga jalur infeksi dalam rongga mulut, yaitu :
- Melalui infeksi metastatik, rongga mulut sebagai akibat dari bakteriaemia. Infeksi diakibatkan karena prosedur dental dan infeksi rongga mulut dapat menyebabkan bakteri sementara tinggal pada organ tertentu dalam tubuh, bakteri dapat memasuki aliran darah. Penyakit yang termasuk infeksi metastatik :
- endokarditis sub akut
- abses otak
- trombosis sinus cavernosus
- sinusitis
- infeksi paru – paru
- selulitis mata
- ulcus di kulit dan
- osteomielitis
- Melalui luka metastatik, karena efek toksin bakteri yang sedang bersirkulasi. Bakteri mampu memproduksi protein yang dapat mengadakan difusi atau eksotoksin, berupa enzim sitolitik dan toksin. Penyakit yang termasuk akibat luka metastatik :
- Infark cerebral
- Infark miokardial
- Kehamilan tak normal
- Neuralgia nervus trigeminus
- Inflamasi metastatik, karena adanya antigen yang larut dalam aliran darah bereaksi dengan antibodi spesifik yang bersirkulasi dan membentuk komplek makromolekul imunokoompleks yang akan menimbulkan berbagai reaksi akut maupun kronis pada daerah bakteri berkoloni.Penyakit termasuk inflamasi metastatik :
- Urtikaria kronis
- Inflamasi usus besar
- Sindrom Behcet
...
Bisa dilihat dalam sumber kedua, dan jalur infeksi yang pertama, ada tertulis ulcus di kulit. Ulcus atau ulkus adalah sejenis kerusakan kulit, ada juga yang bilang borok. Untungnya saya tidak borok. Hanya kulitnya cenderung tebal dan berkeringat terlalu banyak. Meskipun tidak sama tetapi yang saya tangkap dari sumber kedua adalah fokal infeksi ini dapat memberi dampak yang luar biasa mengerikan.
Kembali ke operasi, tekad saya sudah bulat untuk operasi, apalagi rencana ini sudah tertunda selama 1 tahun. Saya putuskan untuk operasi di rumah sakit dekat kantor, yakni di daerah Jakarta Pusat. Karena saya agak takut dengan pelayanan di RS negeri atau pemerintah, saya ambil yang versi swastanya saja. Setelah konsultasi yang informatif dan solutif dengan salah satu dokter bedah mulut, saya semakin yakin dengan keputusan operasi kecil ini, ditambah saran dokter untuk mencabut gigi atasnya karena sudah tidak berfungsi maksimal lagi.
Jalannya operasi tidak begitu mulus, karena posisi gigi yang menunduk kebawah. Dan untuk menahan sakitnya saya diberikan dosis bius lokal 2x lipat orang biasa. Setelah hampir 50 menit, akhirnya beres juga peangkatan gigi bungsu bandel saya. Dilanjutkan dengan kurang dari 1 menit untuk pencabutan gigi atasnya.
Rasanya operasi meskipun dibius adalah tetap sakit dan tidak enak. Ya sudahlah ya, demi kesembuhan saya tahan rasa sakitnya. Kemudian saya diberi obat penghilang rasa sakit, antibiotik dan obat kumur. Selama 3 hari mulut saya tampak bengkak akibat proses ini dan setelah cari di internet ternyata hal ini adalah normal. Saya juga disarankan jangan banyak bicara, jangan makan makanan yang panas dan pedas.
Seminggu kemudian, yakni beberapa jam lalu, akhirnya jahitan operasinya dicabut. Gak sampe 2 menit sudah selesai. Rasanya lega karena 1 tahap lagi telah terlewati. Dokternya bilang bahwa untuk proses penyembuhan selanjutnya akan memakan waktu 2minggu sampai 1 bulanan. Rasa sakit yang sekarang ada akan hilang seiring dengan waktu. Dan berita baiknya sekarang saya boleh sikat gigi lagi, namun harus tetap kumur dengan obat dari dokter. Jangan lupa mengkonsumsi vitamin c juga pesannya.
Satu lagi proses dalam kehidupan saya yang tidak akan pernah saya lupakan. Total sekitar 7 juta-an dana yang telah saya habiskan dari konsultasi awal sampai kemarin di RS ini. Bukan biaya yang sedikit, namun saya bersyukur bahwa semuanya itu di cover oleh perusahaan tempat saya berkarya. Sekarang saya harus menjaga kondisi tubuh dan mengontrol apapun yang akan masuk dalam mulut ini. Semoga cepat sembuh dan terbebas dari penderitaan ini. Salam. :)
"Salah satu bentuk nikmat yang sering terlupakan adalah sehat."
Thursday, September 4, 2014
The Real Truth About Working with Recruiters- By Michael Spiro
When I first started my career as a recruiter, I worked and trained with a few “old-school” recruiters who had learned the staffing business in the days before internet searches and online job boards … when recruiters were called “Head Hunters” and kept card files called Rolodexes next to their desk phones that were filled with prized contacts. It was all about who they knew. The implication of the term Head Hunter was that they only went after top talent – usually people who worked for their client’s competitors – and actually recruited them away from one company to come work for another! Some of the best of today’s recruiters still operate that way, only seeking out top talent through networking and personal contacts. Some of those old Head Hunters even imagined themselves to be the business world’s equivalent of a Jerry McGuire … like sports or entertainment agents who represent top talent, shop them around and negotiate the best deals for their candidates. Needless to say, in today’s ultra-challenging, candidate-flooded job market, many recruiters have learned to adapt to new ways of doing business.
At the other end of the spectrum from the Head Hunters are the younger, much less experienced recruiters who never learned how to creatively source (i.e. identify) and then actually recruit (i.e. sell an opportunity to) so-called “passive,” employed, non-job-seeking candidates. They only look at résumés from people who respond to their online job postings – active job-seekers, otherwise known as the “low hanging fruit.” Since most companies know how to do the same thing by posting their own ads and collecting those same résumés, recruiters who operate that way are finding fewer and fewer companies willing to pay them a fee for that type of recruiting.
Most modern recruiters fall somewhere in between those two models. As with any profession, there are good recruiters and bad recruiters. Yes, there are recruiters out there who lie, cheat, deceive, bait & switch, promise things they cannot deliver, and will pretty much do or say anything to get a placement and get paid. I’ve met some of those people, and their sleaze factor can be quite astounding! Unfortunately, those bad recruiters tend to give the entire profession a negative reputation. How can you tell the difference? Just like with any other business relationship, time will reveal the traits of a person worth working with: honesty, integrity, sincerely, responsiveness, timely follow-through, etc. Good recruiters treat everyone with respect, and care about the people they work with. They try to do the right thing, and look out for everyone’s best interest – their own, their client’s and their candidate’s.
There are a lot of myths and misconceptions out there about how recruiters work, and how job-seekers can best utilize them as a resource. There is also a lot of confusion among job-seekers about exactly what recruiters do, how they get paid, who they work for, how to approach them, what questions to ask, etc. As a veteran of the staffing industry, I’d like to set the record straight, bust some common myths, and give some advice on how to best utilize recruiters as a resource.
Recruiters come in many different flavors. There are Retained Recruiters who typically only work on very specialized high-end C-level positions, and get paid a flat fee for simply producing a certain number of highly qualified candidates – whether or not they get hired. There are “Temporary Staffing” or “Staff Augmentation” Recruiters who work primarily on short-term contract assignments for their clients. There are Corporate or Internal Recruiters who work directly for the companies who have the open jobs. And then there are 3rd Party Agency Recruiters. For the purposes of this article, I’m focusing only on 3rd-Party Agency Recruiters – the ones who work on permanent jobs, usually on a contingency basis. These recruiters work for independent agencies who contract their services to various companies who need help filling open jobs with very specific and often hard-to-find requirements. They search for candidates that match those requirements, and try to present only the top few most qualified candidates to their clients. They are paid on a commission basis if and only if their candidates are hired and after their client company pays their agency’s fee. Those fees are usually a percentage of their candidate’s first year salary (typically 20-25% – sometimes more, sometimes less.) So naturally it’s in their own best interest, as well as their candidate’s, to help negotiate the highest possible salary from their client during the offer stage.
MYTH: Recruiters Find Jobs for People
Wrong! Recruiters find People for Jobs! If you think about it, that’s a very different concept. Recruiters do not get paid by candidates, nor are they job counselors. Sure, they “counsel” the candidates that they choose to work with, help them refine their résumés, and prep & coach them on interview techniques. However, they are paid by client companies to find candidates to fill very specific positions with very specific (usually hard to find) requirements. Randomly contacting a recruiter with your unsolicited résumé, and saying “can you help me find a job” is NOT a good tactic … and most recruiters will not respond. I get at least two or three of those a week from people I cannot possibly help. On the other hand, answering a recruiter’s job posting with your résumé and a message that says “I match every requirement you’ve listed …” is a GOOD idea. Calling to follow-up is even better. The name of the game is matching your skills and experience to a specific job they are already working on. That’s what they get paid for! That’s why most recruiters don’t return calls or emails from candidates that don’t match all the requirements of their current job searches. For them, time is money, and they only make money on matches!
Is it Better to Apply Directly to a Company, or Go Through a Recruiter?
The answer depends on who you know at the company. If you’ve already networked your way to a decision-maker, and have a personal relationship there … go direct! If, on the other hand, you don’t know anyone there and you talk with a recruiter who has a personal relationship with a hiring manager … then the advantage goes to the recruiter! The company’s desire to avoid paying the recruiter’s fee might sometimes be a factor … but a personal relationship trumps that every time. Most good recruiters develop and nurture relationships with their clients over a long period of time. Those relationships are invaluable … they have the trust and attention of the decision-makers who are the hardest to reach. They can get you in front of the right people. That is one of the main advantages of using a good recruiter!
Industry-Specific Recruiters
Most Recruiters specialize in a specific industry, and only look for specific types of candidates. Some are more focused than others. For example, a recruiter may be a general IT Recruiter, looking for any and all technical positions. Others may be focused on a smaller subset of IT – for example, only .NET programmers, or only JAVA developers, or only Web Designers, or only users of a particular type of software, etc. Others may focus on totally different industries. I’ve heard of Recruiting Firms that concentrate exclusively on very narrow industry specialties: HVAC Engineers, Paper and Pulp Industry Professionals, Hospitality Industry Executives, Copyright Lawyers, Corporate Controllers, Radiology Technicians … the list is literally endless. Needless to say, an industry-specific recruiter does not want to waste their time talking to candidates who do not fit their niche. Job-Seekers who want to find a recruiter to work with should figure out which agencies and/or recruiters specialize in their specific industry niche, and focus on getting on their radar.
How Do Recruiters Find Candidates that Match Their Job Requirements?
There are several ways that recruiters might find matching candidates: using sophisticated Boolean key-word searches, they first mine their electronic resources: they look in their own data base of collected résumés; they post their jobs (usually without identifying the client company) on the popular job boards, on Social Media sites, and on their own agency’s website and then screen applicants for matches; they search résumé banks that they pay to subscribe to, like CareerBuilder, Monster, etc.; they make extensive use of searches on all the free Social Networking sites like LinkedIn, Facebook, Twitter, etc. Finally, they do a LOT of old fashioned cold calling to people within their industry niche, asking everyone if they know of anyone else that fits their job requirements, and asking everyone they talk with for referrals. It’s a laborious time-consuming process where one person leads to another, to another, to another and so on. All along the way they collect résumés from potential candidates who may or may not fit the immediate job they are working on, but seem worth keeping on file for future searches in their specialty area.
What is the Best Way for a Job-Seeker to Use Recruiters as a Resource?
Try to identify an agency, or a specific recruiter who specializes in your industry niche, and put yourself “on file” there. Send them your résumé to get into their searchable electronic data base so that when a new job comes up, they’ll “find” you later during a future search. You should also regularly check that niche agency’s job posting on their own website, and look for jobs that match your background. If you do spot a matching job, contact the agency and ask which recruiter in their office is working on that search … and try to reach that specific person to alert them of your own matching qualifications. Needless to say, you should also keep your online profiles (Monster, CareerBuilder, LinkedIn, etc.) up to date and filled with as many “keywords” in your niche as possible. You want to make yourself “findable” when a recruiter does a search.
What Questions Should You Ask of a Recruiter Who Calls You About a Job?
Good recruiters should be able to answer almost all of these questions and more. If they can’t answer those basic questions … then they probably don’t know their clients very well, and I would question whether or not you want them to represent you. Good recruiters will also be able to help you tweak your résumé to better fit the job specs, prep and coach you on how to successfully interview using their insider knowledge of the company and the decision-makers, and they will help you negotiate the best salary if and when an offer comes. Good recruiters will also follow through with things they say they will do, and will be good about keeping you informed with updates and progress reports. Expect good communication … and beware of anyone who suddenly stops returning your calls or emails — that’s a telltale sign of unprofessionalism that is certainly not limited to recruiters!
Also, always verify that the recruiter will never submit your résumé to any companies or jobs without your knowledge and approval. Believe it or not, that happens quite frequently. I’ve recruited many candidates over the years who swore they never even heard of my client company, only to find out later that the company had already received that person’s résumé from another recruiter! Not only did that make me look stupid, but more importantly it ruined that candidate’s chances of getting the job – most companies will automatically eliminate any candidate who is submitted from multiple sources. They don’t want to get into the middle of a turf war
What NOT To Do When Working With Recruiters …
Original Source : Michael Spiro
At the other end of the spectrum from the Head Hunters are the younger, much less experienced recruiters who never learned how to creatively source (i.e. identify) and then actually recruit (i.e. sell an opportunity to) so-called “passive,” employed, non-job-seeking candidates. They only look at résumés from people who respond to their online job postings – active job-seekers, otherwise known as the “low hanging fruit.” Since most companies know how to do the same thing by posting their own ads and collecting those same résumés, recruiters who operate that way are finding fewer and fewer companies willing to pay them a fee for that type of recruiting.
Most modern recruiters fall somewhere in between those two models. As with any profession, there are good recruiters and bad recruiters. Yes, there are recruiters out there who lie, cheat, deceive, bait & switch, promise things they cannot deliver, and will pretty much do or say anything to get a placement and get paid. I’ve met some of those people, and their sleaze factor can be quite astounding! Unfortunately, those bad recruiters tend to give the entire profession a negative reputation. How can you tell the difference? Just like with any other business relationship, time will reveal the traits of a person worth working with: honesty, integrity, sincerely, responsiveness, timely follow-through, etc. Good recruiters treat everyone with respect, and care about the people they work with. They try to do the right thing, and look out for everyone’s best interest – their own, their client’s and their candidate’s.
There are a lot of myths and misconceptions out there about how recruiters work, and how job-seekers can best utilize them as a resource. There is also a lot of confusion among job-seekers about exactly what recruiters do, how they get paid, who they work for, how to approach them, what questions to ask, etc. As a veteran of the staffing industry, I’d like to set the record straight, bust some common myths, and give some advice on how to best utilize recruiters as a resource.
Recruiters come in many different flavors. There are Retained Recruiters who typically only work on very specialized high-end C-level positions, and get paid a flat fee for simply producing a certain number of highly qualified candidates – whether or not they get hired. There are “Temporary Staffing” or “Staff Augmentation” Recruiters who work primarily on short-term contract assignments for their clients. There are Corporate or Internal Recruiters who work directly for the companies who have the open jobs. And then there are 3rd Party Agency Recruiters. For the purposes of this article, I’m focusing only on 3rd-Party Agency Recruiters – the ones who work on permanent jobs, usually on a contingency basis. These recruiters work for independent agencies who contract their services to various companies who need help filling open jobs with very specific and often hard-to-find requirements. They search for candidates that match those requirements, and try to present only the top few most qualified candidates to their clients. They are paid on a commission basis if and only if their candidates are hired and after their client company pays their agency’s fee. Those fees are usually a percentage of their candidate’s first year salary (typically 20-25% – sometimes more, sometimes less.) So naturally it’s in their own best interest, as well as their candidate’s, to help negotiate the highest possible salary from their client during the offer stage.
MYTH: Recruiters Find Jobs for People
Wrong! Recruiters find People for Jobs! If you think about it, that’s a very different concept. Recruiters do not get paid by candidates, nor are they job counselors. Sure, they “counsel” the candidates that they choose to work with, help them refine their résumés, and prep & coach them on interview techniques. However, they are paid by client companies to find candidates to fill very specific positions with very specific (usually hard to find) requirements. Randomly contacting a recruiter with your unsolicited résumé, and saying “can you help me find a job” is NOT a good tactic … and most recruiters will not respond. I get at least two or three of those a week from people I cannot possibly help. On the other hand, answering a recruiter’s job posting with your résumé and a message that says “I match every requirement you’ve listed …” is a GOOD idea. Calling to follow-up is even better. The name of the game is matching your skills and experience to a specific job they are already working on. That’s what they get paid for! That’s why most recruiters don’t return calls or emails from candidates that don’t match all the requirements of their current job searches. For them, time is money, and they only make money on matches!
Is it Better to Apply Directly to a Company, or Go Through a Recruiter?
The answer depends on who you know at the company. If you’ve already networked your way to a decision-maker, and have a personal relationship there … go direct! If, on the other hand, you don’t know anyone there and you talk with a recruiter who has a personal relationship with a hiring manager … then the advantage goes to the recruiter! The company’s desire to avoid paying the recruiter’s fee might sometimes be a factor … but a personal relationship trumps that every time. Most good recruiters develop and nurture relationships with their clients over a long period of time. Those relationships are invaluable … they have the trust and attention of the decision-makers who are the hardest to reach. They can get you in front of the right people. That is one of the main advantages of using a good recruiter!
Industry-Specific Recruiters
Most Recruiters specialize in a specific industry, and only look for specific types of candidates. Some are more focused than others. For example, a recruiter may be a general IT Recruiter, looking for any and all technical positions. Others may be focused on a smaller subset of IT – for example, only .NET programmers, or only JAVA developers, or only Web Designers, or only users of a particular type of software, etc. Others may focus on totally different industries. I’ve heard of Recruiting Firms that concentrate exclusively on very narrow industry specialties: HVAC Engineers, Paper and Pulp Industry Professionals, Hospitality Industry Executives, Copyright Lawyers, Corporate Controllers, Radiology Technicians … the list is literally endless. Needless to say, an industry-specific recruiter does not want to waste their time talking to candidates who do not fit their niche. Job-Seekers who want to find a recruiter to work with should figure out which agencies and/or recruiters specialize in their specific industry niche, and focus on getting on their radar.
How Do Recruiters Find Candidates that Match Their Job Requirements?
There are several ways that recruiters might find matching candidates: using sophisticated Boolean key-word searches, they first mine their electronic resources: they look in their own data base of collected résumés; they post their jobs (usually without identifying the client company) on the popular job boards, on Social Media sites, and on their own agency’s website and then screen applicants for matches; they search résumé banks that they pay to subscribe to, like CareerBuilder, Monster, etc.; they make extensive use of searches on all the free Social Networking sites like LinkedIn, Facebook, Twitter, etc. Finally, they do a LOT of old fashioned cold calling to people within their industry niche, asking everyone if they know of anyone else that fits their job requirements, and asking everyone they talk with for referrals. It’s a laborious time-consuming process where one person leads to another, to another, to another and so on. All along the way they collect résumés from potential candidates who may or may not fit the immediate job they are working on, but seem worth keeping on file for future searches in their specialty area.
What is the Best Way for a Job-Seeker to Use Recruiters as a Resource?
Try to identify an agency, or a specific recruiter who specializes in your industry niche, and put yourself “on file” there. Send them your résumé to get into their searchable electronic data base so that when a new job comes up, they’ll “find” you later during a future search. You should also regularly check that niche agency’s job posting on their own website, and look for jobs that match your background. If you do spot a matching job, contact the agency and ask which recruiter in their office is working on that search … and try to reach that specific person to alert them of your own matching qualifications. Needless to say, you should also keep your online profiles (Monster, CareerBuilder, LinkedIn, etc.) up to date and filled with as many “keywords” in your niche as possible. You want to make yourself “findable” when a recruiter does a search.
What Questions Should You Ask of a Recruiter Who Calls You About a Job?
- What company are they recruiting for? (If you’ve already applied directly to that same company, they would usually not be able to represent you there.) Find out everything the recruiter knows about that company. If they cannot tell you the name of the company, ask why. (If it’s truly a “confidential” search, OK … but more often than not it’s a trust issue, and failure to identify the client could be a red flag for a job-seeker.)
- What are the job requirements? Ask them to send you a job description. Help the recruiter see how you fit those requirements, if you do. Be honest about any requirements that you really don’t have.
- What is the salary range defined for the position? You should be honest and up front about your own salary history and the salary range you would accept going forward. If your salary history and expectations do not match the job’s defined range (or seem unrealistic) most recruiters will not consider it a match worth pursuing. Like it or not, it’s a primary factor recruiters use to decide who they’ll represent to their clients. [Read “Answering the Dreaded Salary Question” for more info on how to deal with this issue when working with recruiters.]
- What is the history of this position? (New or replacement … and if the latter, what happened to the person who left?)
- Who is the hiring manager, and how well does the recruiter know that person? What is their management style? What is the company culture like? Can you get any inside intelligence?
- How many other candidates is this recruiter representing to this job? Are there other agencies that are also sending candidates, or is this an "exclusive?"
- What is the client's hiring timetable? What steps are there – how many phone interviews and in-person interviews will there be, and with whom? When do they want someone to start? How long has this position been open? How high is their degree of “urgency” to full it?
- What is the next step? Will the recruiter definitely be sending your information to the client – and if so, when? How soon should you expect to hear back from the recruiter?
Good recruiters should be able to answer almost all of these questions and more. If they can’t answer those basic questions … then they probably don’t know their clients very well, and I would question whether or not you want them to represent you. Good recruiters will also be able to help you tweak your résumé to better fit the job specs, prep and coach you on how to successfully interview using their insider knowledge of the company and the decision-makers, and they will help you negotiate the best salary if and when an offer comes. Good recruiters will also follow through with things they say they will do, and will be good about keeping you informed with updates and progress reports. Expect good communication … and beware of anyone who suddenly stops returning your calls or emails — that’s a telltale sign of unprofessionalism that is certainly not limited to recruiters!
Also, always verify that the recruiter will never submit your résumé to any companies or jobs without your knowledge and approval. Believe it or not, that happens quite frequently. I’ve recruited many candidates over the years who swore they never even heard of my client company, only to find out later that the company had already received that person’s résumé from another recruiter! Not only did that make me look stupid, but more importantly it ruined that candidate’s chances of getting the job – most companies will automatically eliminate any candidate who is submitted from multiple sources. They don’t want to get into the middle of a turf war
What NOT To Do When Working With Recruiters …
- Never ever agree to pay any money to a recruiting agency for their services, or agree to any future financial obligations – e.g. re-paying their fees if you leave a job before their guarantee period is up. Recruiters who ask for money from candidates are not to be trusted. Run away quickly, and don’t look back!
- Never do an “end-run” around a recruiter and apply directly to a job they told you about. That is extremely unethical, and almost never ends well. If, on the other hand, the recruiter does not submit you to their client company for whatever reason – then you have every right to go ahead and apply directly to that company on your own.
- Do not sign any documents that promise “exclusive representation” by a recruiter. You have every right to work with multiple recruiters (as long as they are not working on the same job with the same company) and to continue applying directly to other companies. You should, however, inform your recruiter of other opportunities you are working on – especially if you are actually interviewing elsewhere, and may be getting close to an offer at another company.
- Never lie to a recruiter about your qualifications, your experiences, your education, your salary history, or anything else! Be honest about everything, and expect the same in return.
- Finally, do not put all of your job hopes into working with any recruiter, no matter how good they are. The real truth about working with recruiters is that while they can be a great resource … the vast majority of job-seekers today will NOT find their next job through a recruiter. Job-Seekers should concentrate on their own networking activities designed to get them in front of decision-makers in their target companies. [Read “How to Network: A Step-by-Step Guide for Job-Searching” for more detailed information on how to do exactly that!]
Original Source : Michael Spiro
Wednesday, September 3, 2014
Sekilas Tentang SQL (Structure Query Language)
Apa itu SQL ?
SQL (Structured Query Language) adalah sebuah bahasa yang digunakan untuk mengakses data dalam basis data relasional. Bahasa ini secara de facto merupakan bahasa standar yang digunakan dalam manajemen basis data relasional. Saat ini hampir semua server basis data yang ada mendukung bahasa ini untuk melakukan manajemen datanya.
Pemakaian Dasar
Secara umum, SQL terdiri dari dua bahasa, yaitu Data Definition Language (DDL) dan Data Manipulation Language (DML). Implementasi DDL dan DML berbeda untuk tiap sistem manajemen basis data (SMBD)[3], namun secara umum implementasi tiap bahasa ini memiliki bentuk standar yang ditetapkan ANSI. Artikel ini akan menggunakan bentuk paling umum yang dapat digunakan pada kebanyakan SMBD.
Data Definition Language
DDL digunakan untuk mendefinisikan, mengubah, serta menghapus basis data dan objek-objek yang diperlukan dalam basis data, misalnya tabel, view, user, dan sebagainya. Secara umum, DDL yang digunakan adalah CREATE untuk membuat objek baru, USE untuk menggunakan objek, ALTER untuk mengubah objek yang sudah ada, dan DROP untuk menghapus objek. DDL biasanya digunakan oleh administrator basis data dalam pembuatan sebuah aplikasi basis data.
Data Manipulation Language
DML digunakan untuk memanipulasi data yang ada dalam suatu tabel. Perintah yang umum dilakukan adalah:
SELECT untuk menampilkan data
INSERT untuk menambahkan data baru
UPDATE untuk mengubah data yang sudah ada
DELETE untuk menghapus data
Kumpulan Perintah SQL
1. Create Database
Digunakan untuk membuat database baru.
Syntax dasar:
CREATE DATABASE database_namaContoh:
CREATE DATABASE databaseku2. Create Table
Digunakan untuk membuat tabel data baru dalam sebuah database.
Syntax dasar:
CREATE TABLEContoh:
(
Column_name1 table_nama data_type,
Column_name2 table_nama data_type,
Column_name3 table_nama data_type
)
CREATE TABLE bukutamu3. Select
(
Id int,
Nama varchar (255),
Email varchar(50),
Kota varchar(255)
)
Digunakan untuk memilih data dari table database.
Syntax dasar:
SELECT column_name(s) FROM table_nameAtau
SELECT * FROM table_nameContoh 1:
SELECT nama,email FROM bukutamuContoh 2:
SELECT * FROM bukutamu4. Select Distinct
Digunakan untuk memilih data-data yang berbeda (menghilangkan duplikasi) dari sebuah table database.
Syntax dasar:
SELECT DISTINCT column_name(s) FROM table_nameContoh:
SELECT DISTINCT kota FROM bukutamu5. Where
Digunakan untuk memfilter data pada perintah Select
Syntax dasar:
SELECT column name(s) FROM table_name
WHERE column_name operator valueContoh:
SELECT * FROM bukutamu6. Order By
WHERE kota=’YOGYAKARTA’
Digunakan untuk mengurutkan data berdasarkan kolom (field) tertentu. Secara default, urutan tersusun secara ascending (urut kecil ke besar). Anda dapat mengubahnya menjadi descending (urut besar ke kecil) dengan menambahkan perintah DESC.
Syntax dasar:
SELECT column_name(s)Contoh 1:
FROM table_name
ORDER BY column_name(s) ASC|DESC
SELECT * FROM bukutamuContoh 2:
ORDER BY nama
SELECT * FROM bukutamu7. Like
ORDER BY id DESC
Digunakan bersama dengan perintah Where, untuk proses pencarian data dengan spesifikasi tertentu.
Syntax dasar:
SELECT column_name(s) FROM table_nameContoh 1:
WHERE column_name LIKE pattern
SELECT * FROM bukutamuKeterangan 1:
WHERE nama LIKE ‘a%’
Contoh di atas digunakan untuk pencarian berdasarkan kolom nama yang berhuruf depan “a”.Contoh 2:
SELECT * FROM bukutamuKeterangan 2:
WHERE nama LIKE ‘a%’
Contoh di atas digunakan untuk pencarian berdasarkan kolom nama yang berhuruf belakang “a”.8. In
Digunakan untuk pencarian data menggunakan lebih dari satu filter pada perintah Where.
Syntax dasar:
SELECT column_name(s) FROM table_nameContoh:
WHERE column_name IN (value1,value2, . . .)
SELECT * FROM bukutamu9. Between
WHERE kota IN (‘Yogyakarta’,’Jakarta’)
Digunakan untuk menentukan jangkauan pencarian.
Syntax dasar:
SELECT column_name(s) FROM table_nameContoh:
WHERE column_name
BETWEEN value1 AND value2
SELECT * FROM bukutamuKeterangan:
WHERE id
BETWEEN 5 and 15
Contoh di atas digunakan untuk mencari data yang memiliki nomor id antara 5 dan 15.
10. Insert Into
Digunakan untuk menambahkan data baru di tabel database.
Syntax dasar:
INSERT INTO table_nameAtau
VALUES (value1,value2,value3, . . .)
INSERT INTO table_name (column1,column2,column3, . . .)Contoh 1:
VALUES (value1,value2,value3, . . .)
INSERT INTO bukutamuContoh 2:
VALUES (1,’Arini’,’arini@mail.com’,’Yogyakarta’)
INSERT INTO bukutamu (id,nama,email,kota)11. Update
VALUES (1,’Arini’,’arini@mail.com’,’Yogyakarta’)
Digunakan untuk mengubah/memperbarui data di tabel database.
Syntax dasar:
UPDATE table_nameContoh:
SET column1=value,column2=value, . . .
WHERE some_column=some_value
UPDATE bukutamu12. Delete
SET email=’arini@yahoo.com’, kota=’Jakarta’
WHERE id=1
Digunakan untuk menghapus data di table database. Tambahkan perintah Where untuk memfilter data-data tertentu yang akan dihapus. Jika tanpa perintah Where, maka seluruh data dalam tabel akan terhapus.
Syntax dasar:
- DELETE FROM table_name
- WHERE some_column=some_value
DELETE FROM bukutamu13. Inner Join
WHERE id=1
Digunakan untuk menghasilkan baris data dengan cara menggabungkan 2 buah tabel atau lebih menggunakan pasangan data yang match pada masing-masing tabel. Perintah ini sama dengan perintah join yang sering digunakan.
Syntax dasar:
SELECT column_name(s) FROM table_name1Contoh:
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column-name
SELECT bukutamu.nama,bukutamu.email,order.no_order FROM bukutamu14. Left Join
INNER JOIN order ON bukutamu.id=order.id
ORDER BY bukutamu.nama
Digunakan untuk menghasilkan baris data dari tabel kiri (nama tabel pertama) yang tidak ada pasangan datanya pada tabel kanan (nama tabel kedua).
Syntax dasar:
SELECT column_name(s) FROM table_name1Contoh:
LEFT JOIN table_name2 ON table_name1.column_name=table_name2.column_name
SELECT bukutamu.nama,bukutamu.email,order.no_order FROM bukutamu15. Right Join
LEFT JOIN order ON bukutamu.id=order.id
ORDER BY bukutamu.nama
Digunakan untuk menghasilkan baris data dari tabel kanan (nama tabel kedua) yang tidak ada pasangan datanya pada tabel kiri (nama tabel pertama).
Syntax dasar:
SELECT column_name(s) FROM table_name1Contoh:
RIGHT JOIN table_name2 ON table_name1.column_name=table_name2.column_name
SELECT bukutamu.nama,bukutamu.emailmorder.no_order FROM bukutamu16. Full Join
RIGHT JOIN order ON bukutamu.id=order.i
ORDER BY bukutamu.nama
Digunakan untuk menghasilkan baris data jika ada data yang sama pada salah satu tabel.
Syntax dasar:
SELECT column_name(s) FROM table_name1Contoh:
FULL JOIN table_name2 ON table_name1.column_name=table_name2.column_name
SELECT bukutamu.nama,bukutamu.email,order.no_order FROM bukutamu17. Union
FULL JOIN order ON bukutamu.id=order.id
ORDER BY bukutamu.nama
Digunakan untuk menggabungkan hasil dari 2 atau lebih perintah Select.
Syntax dasar:
SELECT column_name(s)FROM table_name1Atau
UNION column_name(s) FROM table_name2
SELECT column_name(s) FROM table_name1Contoh:
UNION ALL
SELECT column_name(s) FROM table_name2
SELECT nama FROM mhs_kampus118. Alter Table
UNION
SELECT nama FROM mhs_kampus2
Digunakan untuk menambah, menghapus, atau mengubah kolom (field) pada tabel yang sudah ada.
Syntax untuk menambah kolom:
ALTER TABLE table_nameContoh:
ADD column_name datatype
ALTER TABLE Persons ADD DateOfBirth dateContoh:
Syntax untuk menghapus kolom :
ALTER TABLE table_name DROP COLUMN column_name
ALTER TABLE Persons DROP COLUMN DateOfBirthSyntax untuk mengubah kolom :
ALTER TABLE table_name ALTER TABLE clumn_name datatypeContoh:
ALTER TABLE Persons ALTER COLUMN DateOfBirth year19. Now ()
Digunakan untuk mendapatkan informasi waktu (tanggal dan jam saat ini.)
Syntax dasar:
Now()Contoh:
SELECT NOW()20. Curdate
Digunakan unutk mendapatkan informasi tanggal saat ini.
Syntax dasar:
Curdate()Contoh:
SELECT CURDATE()21. Curtime()
Digunakan untuk mendapatkan informasi jam saat ini.
Syntax dasar:
Curtime()Contoh:
SELECT CURTIME()22. Extract()
Digunakan untuk mendapatkan informasi bagian-bagian dari data waktu tertentu, seperti tahun, bulan, hari, jam, menit, dan detik tertentu.
Syntax dasar:
Extract(unit FROM date)Keterangan:
Parameter unit dapat berupa:Contoh:
- MICROSECOND
- SECOND
- MINUTE
- HOUR
- DAY
- WEEK
- MONTH
- QUARTER
- YEAR
- SECOND_MICROSECOND
- MINUTE_SECOND
- HOUR_MICROSECOND
- HOUR_SECOND
- HOUR_MINUTE
- DAY_MICROSECOND
- DAY_SECOND
- DAY_MINUTE
- DAY_HOUR
- YEAR_MONTH
SELECT EXTRAXT (YEAR FROM tglorder( AS Th_Order, EXTRACT (MONTH FROM tglorder) AS Bulan_Order,EXTRACT (DAY FROM tglorder AS Hari_Order)23. Date_Add() dan Date_Sub()
FROM order
Fungsi Date_Add() digunakan unutk menambahkan interval waktu tertentu pada sebuah tanggal, sedangkan fungsi Date_Sub() digunakan untuk pengurangan sebuah tanggal dengan interval tertentu.
Syntax dasar:
DATE_ADD (date,INTERVAL expr type)Keterangan:
DATE_SUB (date,INTERVAL expr type)
Tipe data parameter INTERVAL dapat berupa:Contoh 1:
- MICROSECOND
- SECOND
- MINUTE
- HOUR
- DAY
- WEEK
- MONTH
- QUARTER
- YEAR
- SECOND_MICROSECOND
- MINUTE_MICROSECOND
- MINUTE_SECOND
- HOUR_MICROSEDOND
- HOUR_SECOND
- HOUR_MINUTE
- DAY_MICROSECOND
- DAY_SECOND
- DAY_MINUTE
- DAY_HOUR
- YEAR_MONTH
SELECT id,DATE_ADD (tglorder,INTERVAL 30 DAY) AS Waktu_pembayaranContoh 2:
FROM order
SELECT id,DATE_SUB(tglorder,INTERVAL 5 DAY) AS Pengurangan_Waktu24. DateDiff()
FROM order
Digunakan untuk mendapatkan informasi waktu di antara 2 buah tanggal.
Syntax dasar:
DATEIFF(date1,date2)Contoh:
SELECT DATEIFF(‘2010-06-30’,’2010-06-29’) AS Selisih_waktu25. Date_Format()
Digunakan untuk menampilkan informasi jam dan tanggal dengan format tertentu.
Syntax dasar:
DATE_FORMAT(date,format)[CODE]Keterangan:
Parameter format dapat berupa :
%a, nama hari yang disingkatContoh:
%b, nama bulan yang disingkat
%c, bulan (numerik)
%D hari dalam sebulan dengan format English
%d, hari dalam sebulan (numerik 00-31)
%e, hari dalam sebulan (numerik 0-31)
%f, micro detik
%H, jam (00-23)
%h, jam (01-12)
%I, jam (01-12)
%i, menit (00-59)
%j, hari dalam setahun (001-366)
%k, jam (0-23)
%l, jam (1-12)
%M, nama bulan
%m, bulan (numerik 00-12)
%p, AM atau PM
%r, waktu jam dalam format 12 jam (hh:mm:ss AM or PM)
%S, detik (00-59)
%s, detik (00-59)
%T, waktu jam dalam format 24 jam (hh:mm:ss)
%U, minggu (00-53) dimana Sunday sebagai hari pertama dalam seminggu
%u, minggu (00-53) dimana Monday sebagai hari pertama dalam seminggu
%W, nama hari kerja
%w, hari dalam seminggu (0=Sunday, 6=Saturday)
%X, tahun dalam seminggu dimana Sunday sebagai hari pertama dalam seminggu (4 digits) digunakan dengan %V
%x, tahun dalam seminggu di mana Monday sebagai hari pertama dalam seminggu (4 digits) digunakan dengan %v
%Y, tahun 4 digit
%y, tahun 2 digit
[CODE]DATA_FORMAT (NOW(),’%b %d %Y %h : %i %p’)26. Drop Table Digunakan untuk menghapus tabel beserta seluruh datanya.
DATE_FORMAT (NOW(),’%m-%d-%Y’)
DATE_FORMAT (NOW(),’%d %b %Y’)
DATE_FORMAT (NOW(),’%d %b %Y %T : %f’)
Syntax dasar:
DROP TABLE table_nameContoh:
DROP TABLE mhs27. Drop Database()
Digunakan untuk menghapus database.
Syntax dasar:
DROP DATABASE database_name28. AVG()
Digunakan untuk menghitung nilai-rata-rata dari suatu data.
Syntax dasar:
SELECT AVG (column_name) FROM table_nameContoh:
SELECT AVG(harga) AS Harga_rata2FROM order29. Count()
Digunakan untuk menghitung jumlah (cacah) suatu data.
Syntax dasar:
SELECT COUNT (column_name) FROM table_nameContoh:
- SELECT COUNT(id) AS Jumlah_tamu FROM bukutamu
Digunakan untuk mendapatkan nilai terbesar dari data-data yang ada.
Syntax dasar:
SELECT MAX (column_name) FROM table_nameContoh:
SELECT MAX(harga) AS Harga_termahal FROM order31. Min()
Digunakan untuk mendapatkan nilai terkecil dari data-data yang ada.
Syntax dasar:
SELECT MIN (column_name) FROM table_nameContoh:
SELECT MIN(harga) AS Harga_termurah FROM order32. Sum()
Digunakan untuk mendapatkan nilai total penjumlahan dari data-data yang ada.
Syntax dasar:
SELECT SUM (column_name) FROM table_nameContoh:
SELECT SUM(harga) AS Harga_total FROM order33. Group By()
Digunakan untuk mengelompokkan data dengan kriteria tertentu.
Syntax dasar:
SELECT column_name,aggregate_function(column_name)Contoh:
FROM table_name
WHERE column_name operator value
GROUP BY column_name
SELECT nama_customer,SUM(harga) FROM order GROUP BY nama_customer34. Having()
Digunakan untuk memfilter data dengan fungsi tertentu.
Syntax dasar:
SELECT column_name,aggregate_function(column_name)Contoh:
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value
SELECT nama_customer,SUM(harga) FROM order35. Ucase()
WHERE nama_customer=’Arini’ OR nama_customer=’Maheswari’
GROUP BY nama_customer
HAVING SUM (harga)>25000
Digunakan untuk mengubah huruf pada data tertentu menjadi huruf besar.
Syntax dasar:
SELECT UCASE (column_name) FROM table_nameContoh:
SELECT UCASE(nama) as Nama FROM bukutamu36. Lcase()
Digunakan untuk mengubah huruf pada data tertentu menjadi huruf kecil.
Syntax dasar:
SELECT LCASE (column_name) FROM table_nameContoh:
SELECT LCASE(nama) as Nama FROM bukutamu37. Mid()
Digunakan untuk mengambil beberapa karakter dari field teks.
Syntax dasar:
SELECT MID(column_name,start[,length]) FROM table_nameContoh:
SELECT MID (kota,1,4) as singkatan_kota FROM Buku tamu38. Len()
Digunakan unutk mendapatkan informasi jumlah karakter dari field teks.
Syntax dasar:
SELECT LEN (column_name) FROM table_nameContoh:
SELECT LEN(nama) as panjang_nama FROM bukutamu39. Round()
Digunakan untuk pembuatan bilangan pecahan.
Syntax dasar:
SELECT ROUND (column_name,decimals) FROM table_nameContoh:
SELECT no_mhs, ROUND (nilai,0) as nilai_bulat FROM tnilai
...
Subscribe to:
Posts (Atom)






