Website Construction Summary (Cont.)

  1. Entering Data into a Database
  2. SQL (Structured Query Language) is a standard language for accessing and manipulating databases. The following list shows an example of Oracle database processing, and the SQL commands are here:

    An Example of Oracle Database Processing
     undcemcs02> sqlplus C##user_id/password@xe 
    
     SQL*Plus: Release 23.0.0.0.0 - Production on Sat Aug 10 12:45:44 2024
     Version 23.4.0.24.05
    
     Copyright (c) 1982, 2024, Oracle.  All rights reserved.
     Last Successful login time: Fri Aug 09 2024 22:49:56 -05:00
    
     Connected to:
     Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
     Version 21.3.0.0.0
    
     SQL> create table  Students ( 
       2    Name     varchar(32)  not null, 
       3    City     varchar(16)  not null, 
       4    Country  varchar(16)  not null ); 
    
     Table created.
    
     SQL> desc Students; 
    
      Name                             Null?     Type
      -------------------------------  --------  -----------------------
      NAME                             NOT NULL  VARCHAR2(32)
      CITY                             NOT NULL  VARCHAR2(16)
      COUNTRY                          NOT NULL  VARCHAR2(16)
    
    
     SQL> insert into Students values ( 'Alfreds Futterkiste', 
       2>   'Berlin', 'Germany' ); 
     1 row created.
    
     SQL> insert into Students values ( 
       2>   'Berglunds snabbköp', 'Luleå', 'Sweden' ); 
     1 row created.
    
     SQL> insert into Students values ( 
       2>   'Centro comercial Moctezuma', 'México D.F.', 'Mexico' ); 
     1 row created.
    
     SQL> insert into Students values ( 
       2>   'Ernst Handel', 'Graz', 'Austria' ); 
     1 row created.
    
     SQL> insert into Students values ( 
       2>   'Island Trading', 'Cowes', 'UK' ); 
     1 row created.
    
     ...
    
    
     SQL> select * from Students; 
    
     NAME                             CITY           COUNTRY
     -------------------------------- -------------- ----------------
     Alfreds Futterkiste              Berlin         Germany 
     Berglunds snabbköp               Luleå          Sweden  
     Centro comercial Moctezuma       México D.F.    Mexico  
     Ernst Handel                     Graz           Austria 
     FISSA Fabrica Inter. Salchichas  Madrid         Spain   
     Galería del gastrónomo           Barcelona      Spain   
     Island Trading                   Cowes          UK      
     Königlich Essen                  Brandenburg    Germany 
     Laughing Bacchus Wine Cellars    Vancouver      Canada  
     Magazzini Alimentari Riuniti     Bergamo        Italy   
     North/South                      London         UK      
     Paris spécialités                Paris          France  
     Rattlesnake Canyon Grocery       Albuquerque    USA     
     Simons bistro                    København      Denmark 
     The Big Cheese                   Portland       USA     
     Vaffeljernet                     Arhus          Denmark 
     Wolski Zajazd                    Warszawa       Poland  
    
     17 rows selected.
    
     SQL> commit; 
     SQL> exit; 
     Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0
        - Production
     Version 21.3.0.0.0
    
     undcemcs02>

    The italic, white text with a navy background color is entered by users.




      It is always darkest before the dawn.