Jump to content
wikedx

intrebare nomenclator si mysql pd baze de date

Recommended Posts

Salutare mi s-a dat un proiect cu baze de date si mi s-a cerut ca niste tabele sa le fac cu nomenclator (legate de tari judete etc..) si sa folosesc in loc de mysqli , mysql pd sau mysql pw nu prea am inteles care dintre cele doua si ce inseamna.

Accept orice critica, dar prefer sa imi raspundeti la ce inseamna nomenclator si mysql pd sau mysql pw.

Am incercat sa ma documentez pe google, dar nu am gasit nimic concret.

Sa se fi referit domnu' care mi-a dat proiectul la pdo si am inteles eu doar pd in loc de mysqli?

Edited by wikedx
Link to comment
Share on other sites

dexonline.ro: "NOMENCLATÓR, nomenclatoare, s. n. Listă, broșură, carte care cuprinde nomenclatura (1) dintr-un anumit domeniu al științei, al tehnicii etc. sau enumerarea sortimentelor produselor ori a grupurilor de produse, clasificate după un anumit criteriu. – Din fr. nomenclateur, lat. nomenclator."

 

Deci ai de facut doua tabele:

1. tari

2. orase

 

Exemplu coloane tari: id, nume_tara

Exemplu coloane orase: id, nume_oras, id_tara

 

Apoi cand faci interogare sa scoti datele, poti face cu inner join. Exemplu: tara Romania are id 6 si faci inner join si pe tabela orase dupa id-ul tarii (id_tara)

  • Upvote 1
Link to comment
Share on other sites

1 minute ago, aelius said:

dexonline.ro: "NOMENCLATÓR, nomenclatoare, s. n. Listă, broșură, carte care cuprinde nomenclatura (1) dintr-un anumit domeniu al științei, al tehnicii etc. sau enumerarea sortimentelor produselor ori a grupurilor de produse, clasificate după un anumit criteriu. – Din fr. nomenclateur, lat. nomenclator."

 

Deci ai de facut doua tabele:

1. tari

2. orase

 

Exemplu coloane tari: id, nume_tara

Exemplu coloane orase: id, nume_oras, id_tara

 

Apoi cand faci interogare sa scoti datele, poti face cu inner join. Exemplu: tara Romania are id 6 si faci inner join si pe tabela orase dupa id-ul tarii (id_tara)

Am inteles.Multumesc mult!

Si m-am lamurit in legatura cu toate.

Link to comment
Share on other sites

Ceva de genul:

 

-- phpMyAdmin SQL Dump
-- Host: localhost
-- Generation Time: Feb 15, 2017 at 12:03 PM
-- Server version: removed
-- PHP Version: removed

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `wikedx`
--

-- --------------------------------------------------------

--
-- Table structure for table `orase`
--

CREATE TABLE IF NOT EXISTS `orase` (
  `id` int(11) NOT NULL COMMENT 'ID oras',
  `nume_oras` varchar(40) NOT NULL COMMENT 'Nume oras',
  `id_tara` varchar(30) NOT NULL COMMENT 'ID tara'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Orase';

-- --------------------------------------------------------

--
-- Table structure for table `tari`
--

CREATE TABLE IF NOT EXISTS `tari` (
  `id` int(11) NOT NULL COMMENT 'ID tara',
  `nume_tara` int(30) NOT NULL COMMENT 'Nume tara'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tabela tari';

--
-- Indexes for dumped tables
--

--
-- Indexes for table `orase`
--
ALTER TABLE `orase`
  ADD UNIQUE KEY `id` (`id`) COMMENT 'ID Oras';

--
-- Indexes for table `tari`
--
ALTER TABLE `tari`
  ADD UNIQUE KEY `id` (`id`) COMMENT 'id tara';

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `orase`
--
ALTER TABLE `orase`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID oras';
--
-- AUTO_INCREMENT for table `tari`
--
ALTER TABLE `tari`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID tara';
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...