now time to determine what tables at database "penjualantasonline" . Here I make 6 tables , table barang, table merk, table
id_pesan, table biaya, table pelanggan, table pesan . after we specify and design the tables , now time to implement it in mysql ,
to create a table using the command
"create table name_table ( field1 data_type ( characters_long )
auto_increment primary key , field2 data_type ( characters_long ) not null ,
data_typefield_n ( characters_long ) ) ; "
explanation :
- create table command to create a table .
- data_type is the declaration of the type of data that
will be used . date of birth using the date.
- primary key is used to make the field as the identity of
the record. This field must be unique because it is a key .
- auto_increment is used to add value automatically. This
can only be done in integer data type .
- null means the field is not required or can not be empty
.
first we activate database "penjualantasonline" and create table barang,
Second we create table merk,
Third we create table id_pesan,
Fourth we create table biaya,
Fifth we create table pelanggan,
Sixth we create table pesan,
Ok, until this step we success create 6 table, to prove
if we success create 6 table, we use command “show tables;”.
next post
we will insert data to 6 table. Good try.
0 comments:
Post a Comment