Kamis, 24 Oktober 2013

PHP Indonesia - Facebook: master mau tanya... misal aku punya data user,user...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Manage your social media

Best social media tool for image publishing to Facebook and Twitter. Look amazing and delight your followers. Get 40% off when you sign up today.
From our sponsors
master mau tanya... misal aku punya data user,user...
Oct 24th 2013, 23:51, by Ztoro Code

Ztoro Code 11:51pm Oct 24
master mau tanya... misal aku punya data user,user nya ada 2 tipe..
1.karyawan,
2.member
ketiga tipe itu mempunyai attribut yg beda2,misal karyawan punya attribut nomor_rekening,member g punya,lalu member punya attribut hobi,karyawan g punya attribut hobi.
pertanyaanya... bagusnya itu dijadikan 1 tabel apa 2 tabel?misal 1 table
tabel user kolomnya (username,tipe_user,nomor_rekening,hobi) ato 2 tabel yg satu ada nomor_rekeningnya,yg satu ada hobinya ? padahal relasinya one to one .... mohon kasih masukan

Gembel Berkelas 11:55pm Oct 24
1 aja gan,,, (kalo mau pun hobi n norek dijadikan satu dgn nama field apa kek, toh menampilkan nya di filter berdasar level/type)

Ztoro Code 11:58pm Oct 24
kalo jadi 1 berarti ada field yg isinya hobi kosong,norek ada, ato norek kosong,hobi ada ... secara performa bagus 1 tabel ato 2 tabel?

Gembel Berkelas 11:58pm Oct 24
atau kalo mau 2 tabel mah juga ndak masalah (tp kalo ane mah yg satu tbl user, yg satunya tbl attribute)

Gembel Berkelas 11:59pm Oct 24
kalo ndak mao ada yg kosong, norek ama hobi di gabung aja

Ztoro Code 11:59pm Oct 24
tabel attribut fieldnya apa? hobi,norek?

Zakky 11:59pm Oct 24
secara performa bagus jika sendiri2 tabelnya.

Gembel Berkelas 12:00am Oct 25
field nya id, uid, key, value,,, (kali aja nanti2 mao di ubah jd one2many)

Ztoro Code 12:01am Oct 25
kalo sendiri2 ada 3 tabel, tabel user(username,pass) ,tabel karyawan(username,norek) , tabel member(username,hobi) .. gitu mas Zakky ?

Arnas Risqianto 12:06am Oct 25
JOIN table membuat performance MySQL menurun

Zakky 12:07am Oct 25
ini kepentingannya sama semua atau beda?
kalau kepentingannya beda mending one to one aja.
member sendiri, karyawan sendiri.
secara query lebiih cepet.

Ztoro Code 12:08am Oct 25
maksudnya "kepentingan sama ato beda"?

Ztoro Code 12:10am Oct 25
oooo paham2

Zakky 12:10am Oct 25
itu kan 3 entitas, nah kalau atributnya beda pada masing2 entitas, lebih baik sendiri aja om.

Ztoro Code 12:12am Oct 25
terus ada konsep pake 2 tabel yakni tabel user(username,pass) dan tabel user_attribute(id,username,key,val) ... key diisi norek,hobi val diisi nilainya key tersebut... konsep kaya gini menurut master2 gmn? bagus g? wordpress pake konsep ini di tabel usernya

Ztoro Code 12:12am Oct 25
ini kaya konsepnya mas Gembel Berkelas tadi

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar