Designing a database with relational tables in MySQL using Phpmyadmin -


i need tips when comes designing tables in database. designing employee meal system monitors , processes meal logs of employees (like attendance) problem here, have 2 tables: employee_table , log_table. employee table contains basic employee information , has unique key (not primary one) employee_number. , then, there's table, log_time, contains swipe data of employees. now, 2 tables contain , employee_number column. how make relation out of them? can bind them when call employee_number column on log_time basic information of employee on other table well? sorry because i'm having hard time when comes designing database.

sql syntax relation might this:

create table employee_table(     foreign key (employee_number) references employees(number),     ...other stuff...  ) 

with table looks like

create table employees(     number int(10) not null ) 

here's great site on sql foreign keys: http://www.sitepoint.com/mysql-foreign-keys-quicker-database-development/


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -