It’s time to PSBD
Sedikit berbagi pengalaman dengan yang lain..hihi..
Semoga bisa bermanfaat, dan membantu, ini pembahasan dari materi slide BINUSMAYA yang pertemuan 4-5-6, jadi bagi yg tidak memiliki buku, mungkin saya bisa bantu lwt postingan saya ini..
__________________________________________________________
What are the advantages and disadvantages of SQL?
Keuntungan: adanya jaminan dari Microsoft tentang keamanan, pelayanan, dll mengenai EULA. Selain itu SQL dapat didapat secara free.
Kerugian: Tidak bisa mengambil keuntungan dari PHP.
Describe the eight base data type in SQL
- Boolean
- Character
- Bit
- Exact Numeric
- Approximate numeric
- Datetime
- Interval
- Large Objects
Discuss the functionality and importance of the integrity enhancement feature (IEF).
Integrity Enhancement Feature (IEF) terdiri dari batasan-batasan yang kita inginkan dalam rangka menjaga database untuk tetap konsisten.
IEF memiliki 5 batas integrity:
– Required data
– Domain constraints
– Entity integrity
– Referential integrity
– Enterprise constraints
Discuss each of the clauses of the CREATE TABLE statement.
Keuntungan: Mempermudah komplexitas, dapat berfungsi sebagai agregasi (sum, count, etc), storage lebih kecil dan lebih aman.
Kekurangan: Bila struktur data pada table berubah, kita harus mengubah query view table tersebut
Discuss the advantages and disadvantages of view
Kelebihan:
- Data Independence
- Currency
- Improved Security
- Reduce Complexity
- Convenience
- Customization
- Data Integrity
Kekurangan:
- Update Restriction
- Structure Restriction
- Performance
Describe how the process of view resolution works
- The view column names in SELECT list are translated into their corresponding column names in the defining query:
SELECT s.staffNo AS staffNo, COUNT(*) As cnt
- View names in FROM are replaced with corresponding FROM lists of defining query:
FROM Staff s, PropertyForRent p
- WHERE from user query is combined with WHERE of defining query using AND:
WHERE s.staffNo = p.staffNo AND branchNo = ‘B003’
- GROUP BY and HAVING clauses copied from defining query:
GROUP BY s.branchNo, s.staffNo
- ORDER BY copied from query with view column name translated into defining query column name
ORDER BY s.staffNo
- The final merged query becomes:
SELECT s.staffNo, COUNT(*)
FROM staff s, PropertyForRent p
WHERE s.staffNo = p.staffNo AND branchNo = ‘B003’
GROUP BY s.branchNo, s.staffNo
ORDER BY s.staffNo;
What restrictions are necessary to ensure that a view is updatable?
Jika system databasenya mendukung reserves mapping dari view ke table
What is a materialized view and what are the advantages of a maintaining a materialized view rather than using the view resolution process?
Seperti halnya sebuah view, tapi dia memiliki deskripsi material yg lebih jelas sehingga memiliki fasilitas seperti halnya sebuah table, dapat diupdate, memiliki index dsb.
Perbedaan: lebih cepat, memiliki struktur yg lebih jelas, dapat memiliki index, data didalamnya terupdate setiap waktu sesuai dengan data pada masternya.