DATA MANAGEMENT: ATTRIBUTE COMPONENT www.malaysiagis.com DATABASE CONCEPTS • collection of logical and implicit data • designed, built and populated with data for a certain purpose • represents certain aspects • database model is used to describe it’s structural concept. – data type, relationship and dependency between data • a data management language to define the data characteristics and the data structure and to manipulate the data • instants are data in database at a certain period of time LICENSE NO_LICENSE NRIC D_APPR J_LICENSE PERIOD P_APPOVAL HAWKERS NRIC OWNER NAME DOB ADDRESS GENDER STALLS SALES NRIC OWNER ADDRESS SHOP OWNERS NRIC OWNER NAME DOB ADDRESS GENDER Schema model of Data Relationship LAND PARCEL LOT_NO VALUATION_PRICE TAX_RATE OWNERSHIP OWNER NAME 4479 50,000 200 freehold Farid 194 700,000 5,500 lease Sulaiman 2001 950,000 7,000 lease Sharifah 350 25 25 freehold Sulaiman Database Instants Structured Query Language (SQL) • a non-procedural language • user specifies what must be done, but not how it is to be done • uses algebra operations to perform queries • SQL has become the catalyst in the development of client/server and distributed databases • Basic forms of SQL: SELECT <attribute list> FROM <relationship list> WHERE <conditions> LICENSE LICENSE_NO NRIC_HAWKERT YEAR 423 193 701 311 4805637 5547430 6000439 3776519 1983 1992 1990 1987 LICENSE PERIOD APPROVAL makanan makanan surat khabar surat khabar 200 200 50 50 Ali Samad Samad Ali STORE CATEGORY buah-buahan surat khabar makanan makanan NRIC HAWKER ADDRESS 4805637 6000439 3954197 5547430 Jln Tembaga Kuning, Sri Skudai Jln Ronggeng, Skudai Baru Jln Tembaga Merah, Sri Skudai Jln Timah, Sri Putri HAWKER NRIC HAWKER NAME 7889012 6000139 2671900 DOB Razali 08.11.65 Aminah 04.04.48 Hassan 27.03.47 ADDRESS GENDER 45 Jln Timah 2, Sri Putri 2 Jln Timah 18 Sri Putri 14 Jln Emas 2, Sri Skudai lelaki perempuan lelaki Database Instants SQL QUERY: EXAMPLE 1 Obtain license number and IC no. of licensee SELECT FROM WHERE LICENSE_NO, NRIC_LICENSEE LICENSEE LICENSE = “MAKANAN” select tuple from relationship LICENSEE that fulfills the condition on attribute LICENSE_NO and NRIC_LICENSEE SQL QUERY: EXAMPLE 2 – Lab Exercise 2 – Waqf project BENEFITS OF DATABASE • • • • connector between program and data redundancy control data sharing data security