DATABAZAT.txt - *krijimi i tabeles users dhe popullimi...

  • No School
  • AA 1
  • juventuss
  • 3

This preview shows page 1 - 2 out of 3 pages.

**************************************************** *****krijimi i tabeles users dhe popullimi***** CREATE TABLE `users` ( `user_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `username` VARCHAR (50), `password` VARCHAR (50), `type_user` VARCHAR(7) CHECK (`type_user` IN ('admin', 'cashier')), PRIMARY KEY (`user_id`) ); INSERT INTO `users` VALUES (1, "avatar1", "avatar1", "admin"); INSERT INTO `users` VALUES (2, "avatar2", "avatar2", "cashier"); INSERT INTO `users` VALUES (3, "avatar3", "avatar3", "cashier"); INSERT INTO `users` VALUES (4, "avatar4", "avatar4", "cashier"); INSERT INTO `users` VALUES (5, "avatar5", "avatar5", "cashier"); **************************************************** *****krijimi i tabeles admins dhe popullimi***** CREATE TABLE `admins` ( `admin_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `first_name` VARCHAR (50), `last_name` VARCHAR (50), `photo` VARCHAR (50), `salary` DOUBLE, PRIMARY KEY (`admin_id`), FOREIGN KEY (`admin_id`) REFERENCES `users`(`user_id`) ); INSERT INTO `admins` VALUES (1,"Bianka","Camaj","avatar1.png",425.25); **************************************************** *****krijimi i tabeles cashiers dhe popullimi***** CREATE TABLE `cashiers` ( `cashier_id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, `first_name` VARCHAR (50), `last_name` VARCHAR (50), `photo` VARCHAR (50), `phone` VARCHAR (50), `email` VARCHAR (50), `address` VARCHAR (50), `date_birth` DATE, `date_employment` DATE, `salary` DOUBLE, PRIMARY KEY (`cashier_id`),
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '19

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture