Skip to content

artHub-j/dabd-apunts-artuaragon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo_UPC svg dabd-apunts-artuaragon

Apunts de l'assignatura DABD a la UPC. LAB + TEO.

Xuleta Comandes MySQL/PostgreSQL

SQLite3 MySQL PostgreSQL
Iniciar sessió: sqlite3 filename.db mysql -u est_username -p psql -h ubiwan.epsevg.upc.edu -U est_username -W
Ajuda: .help \h \h (Sintaxis SQL) i ? (Comandes CLI)
Sortir: .quit / .exit \q \q
Llistar db: - show databases; \l
Canviar de bd: - \u \c
Llistar taules/vistes: .tables show tables; \d
Veure esquema taula/vista: .schema tablename desc table/view; \d table/view
Importar SQL: - mysql -u username -p databasename < data.sql psql -U username databasename < data.sql
Exportar SQL: - mysqldump -u username -p databasename [tablename] > data.sql (Si vols poder importar-la en altres SGBD pot ser convenient usar l’opcio --compatible=ansi) pg dump -U username databasename [-t tablename] > data.sql (Format mes compatible afegint opcions: --no-tablespaces --no-owner --no-acl --column-inserts)

Solucions LABS

S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12
Link

Notes LABS 1ª Part (Sessió 1 - 6) [10%]

Sessions S1 S2 S3 S4 S5 S6
Nota (entre 0 i 5) 5 3 5 4.5 4 5
Errors MySQL taula movies no existeix. Host havia de ser ubiwan.epsevg.upc.edu. No es poden editar/eliminar usuaris que tenen caràcter ".
Total LABS 1ª Part
8.6

Notes LABS 2ª Part (Sessió 7 - 12) [10%]

Sessions S7 S8 S9 S10 S11 S12
Nota (entre 0 i 5) - - - - - -
Errors - - - - - -

Exemples d'Activitat 1

aprovats.db registre_parelles.db linies_factura.db
Link

Directory Tree

  • folder dabd-apunts-artuaragon/
    • ├── folder Exemples Activitat 1/
      • ├── Activitat1-apunts-aprovats.md
      • ├── Activitat1-apunts-linies_factura.md
      • ├── Activitat1-apunts-registre_parelles.md
      • ├── aprovats1.txt
      • ├── aprovats2.txt
      • ├── aprovats3.txt
      • ├── aprovats.db
      • ├── linies_factura.db
      • ├── linies_factura_v1.txt
      • ├── linies_factura_v2.txt
      • ├── registre_parelles.db
      • ├── registre_parelles_v1.txt
      • └── registre_parelles_v2.txt
    • ├── folder LABS/
      • ├── folder Sessio 1/
        • ├── folder 01set_theory/
          • ├── set_theory.db
          • ├── set_theory.sql
          • └── set_theory.txt
        • └── s1-apunts.md
      • ├── folder Sessio 10/
        • └── s10-apunts.md
        • ├── folder Sessio 11/
          • ├── folder 11mongodb/
          • └── users_mongodb.py
        • └── s11-apunts.md
      • ├── folder Sessio 12/
        • ├── folder 12firestore/
        • ├── users_firestore.py
        • └── users_firestore_username_identifier.py
        • └── s12-apunts.md
      • ├── folder Sessio 2/
        • ├── folder 02accounts/
          • ├── accounts1.db
          • ├── accounts2.db
          • ├── accounts2.txt
          • ├── accounts.sql
          • └── accounts.txt
        • └── s2-apunts.md
      • ├── folder Sessio 3/
        • ├── folder 03claus_foranees/
          • └── maqfact_foreign_keys.sql
        • └── s3-apunts.md
      • ├── folder Sessio 4/
        • ├── folder 04python_sqlinjection/
          • ├── users_sqlite_inj.py
          • └── users_sqlite_no_inj.py
          • ├── prova.db
        • ├── s4-apunts.md
        • ├── sqlite3
        • ├── users.db
        • ├── users_mysql.py
        • └── users_postgres.py
      • ├── folder Sessio 5/
        • ├── folder 05mysql_php/
        • ├── add_users.html
        • ├── add_users.php
        • ├── folder crud-php-mysql-artuaragon/
          • ├── add_edit.php
          • ├── b_drop.png
          • ├── b_edit.png
          • ├── config.php
          • ├── delete.php
          • └── index.php
        • ├── folder crud-php-mysql-simple-inicial/
          • ├── add_edit.php
          • ├── b_drop.png
          • ├── b_edit.png
          • ├── config.php
          • └── index.php
          • ├── list_users.html
          • ├── list_users.php
          • ├── users.html
          • └── users.php
        • └── s5-apunts.md
      • ├── folder Sessio 6/
        • └── s6-apunts.md
      • ├── folder Sessio 7/
        • ├── folder 07indexs/
          • ├── bigger.py
          • └── consulta_bigger.py
        • └── s7-apunts.md
      • ├── folder Sessio 8/
        • ├── folder 08transactions_triggers/
          • └── transaccions.py
        • └── s8-apunts.md
      • └── folder Sessio 9/
        • ├── folder 09postgresql/
        • └── bigger.sql
        • └── s9-apunts.md
    • ├── Practiques (Sessions 1, 2, 3 i 4).pdf
    • ├── README.md
    • └── folder TEO/