· 5 years ago · Sep 10, 2020, 11:18 AM
1--
2-- Structure de la table `client`
3--
4
5CREATE TABLE IF NOT EXISTS `client` (
6 `nom` text NOT NULL,
7 `adresse` text NOT NULL,
8 `commande_passee` int(100) NOT NULL
9) ENGINE=InnoDB DEFAULT CHARSET=latin1;
10
11-- --------------------------------------------------------
12
13--
14-- Structure de la table `code_produit`
15--
16
17CREATE TABLE IF NOT EXISTS `code_produit` (
18 `generique` text NOT NULL
19) ENGINE=InnoDB DEFAULT CHARSET=latin1;
20
21-- --------------------------------------------------------
22
23--
24-- Structure de la table `commande`
25--
26
27CREATE TABLE IF NOT EXISTS `commande` (
28 `magasin_de_fabrication` int(100) NOT NULL,
29 `client` text NOT NULL,
30 `liste_definie_produit` int(100) NOT NULL,
31 `adresse_de_livraison` int(100) NOT NULL,
32 `date_definie` int(100) NOT NULL,
33 `prix_defini` int(100) NOT NULL
34) ENGINE=InnoDB DEFAULT CHARSET=latin1;
35
36-- --------------------------------------------------------
37
38--
39-- Structure de la table `fournisseur`
40--
41
42CREATE TABLE IF NOT EXISTS `fournisseur` (
43 `magasin_fourni` varchar(100) NOT NULL,
44 `liste_produit_finie` int(100) NOT NULL,
45 `commande_recue` int(100) NOT NULL
46) ENGINE=InnoDB DEFAULT CHARSET=latin1;
47
48-- --------------------------------------------------------
49
50--
51-- Structure de la table `magasin`
52--
53
54CREATE TABLE IF NOT EXISTS `magasin` (
55 `nom` text NOT NULL,
56 `adresse` varchar(100) NOT NULL,
57 `geo-spatiale` varchar(100) NOT NULL,
58 `nombre_transporteur` int(100) NOT NULL,
59 `marge_produit` int(100) NOT NULL,
60 `stock` int(100) NOT NULL
61) ENGINE=InnoDB DEFAULT CHARSET=latin1;
62
63--
64-- Structure de la table `produit`
65--
66
67CREATE TABLE IF NOT EXISTS `produit` (
68 `marque` text NOT NULL,
69 `quantite` int(100) NOT NULL,
70 `poids` varchar(100) NOT NULL,
71 `date_peremption` int(100) NOT NULL,
72 `code_produit_generique` varchar(100) NOT NULL
73) ENGINE=InnoDB DEFAULT CHARSET=latin1;
74
75-- --------------------------------------------------------
76
77--
78-- Structure de la table `transporteur`
79--
80
81CREATE TABLE IF NOT EXISTS `transporteur` (
82 `magasin` text NOT NULL,
83 `nombre_camion` int(100) NOT NULL,
84 `commande_livree` int(100) NOT NULL
85) ENGINE=InnoDB DEFAULT CHARSET=latin1;
86