Commit 544ae1aa authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+23 −0
Changes for Database Fundamentals for Java Programmers - Working Files/Chapter 1/aboutMe.txt: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line

  -- The mercifully short story:

    # An academic by profession, but with lots of consulting experience as a programmer

      ## Full-time faculty member for 30-plus years in DePaul's College of Computing and Digital Media
         PhD from Northwestern University

      ## Long-term experience in programming production planning-scheduling systems (steel industry mostly) and
         product configuration systems (large-vehicle manufacturing mostly)

    # The hands-on approach is the hands-down best approach.

    # I've used Java since JDK 1.0 (whew!), and remain an enthusiast.
    
      ## Can't recall a real-world Java app of mine that didn't use a database.

    # Feel free to contact me at: kalin@cs.depaul.edu
                                  http://condor.depaul.edu/mkalin

    Marty Kalin

+24 −0
Changes for Database Fundamentals for Java Programmers - Working Files/Chapter 1/courseOverview.txt: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line

 -- Course overview

 # In a nutshell, the screencast covers database fundamentals for Java programmers.

   ## The database systems covered are the still dominant RDBMSes (Relation DataBase Management System),
      and the now popular 'no-sql' (that is, 'non-relational') systems.

      ### The 'no-sql' systems come in many flavors.

      ### It's now common for RDBMes to add 'no-sql' features, and 'no-sql' systems have 'query languages'
          that resemble the standard query language for RDBMes (SQL: Structured Query Language).

   ## The programming language for the course is core Java (Java SE), although examples from other languages
      are used to illustrate commonalities in how code interacts with DBs.

      ### Java has two distinct APIs for interacting with DBs:

          1. JDBC (Java DataBase Connectivity): the base level, a thin wrapper around SQL.

          2. JPA (Java Persistence API): An ORM (Object/Relation Mapper) for Java, with various implementations
             (e.g., EclipseLink and Hibernate)

             -- A JPA implementation typically builds upon a JDBC implemenation, although the APIs are distinct.
+91 −0
Changes for Database Fundamentals for Java Programmers - Working Files/Chapter 1/dbFlavorsSystems.txt: 91 added lines, 0 removed lines.
Original line number Diff line number Diff line

 -- Database flavors and systems

 # What's a database?

   ## 'Database' is a notion with blurred edges: a working definition, not a precise one, will have to do.

   ## 1st try: 

      ***
      a persistent data store that supports the basic CRUD (Create-Read-Update-Delete) operations and
      preserves the ACID (Atomicity-Consistency-Isolation-Durability) properties throughout these operations.
      ***

      ### In CRUD, the CUD operations alter the DB, but the R operation does not.

      ### The ACID properties ensure data integrity. They're tricky enough to require a lesson on their own.

   ## Not all DBs are persistent, though: there are 'in-memory only' DBs (e.g., SQLite can be used in both
      in-memory-only and persistent modes).

   ## Modern DBs provide many other supporting services (e.g., security): back-burner for now.

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

 # DB systems overview

   -- From ancient history, 'hierarchical systems' such as IBM's IMS (Information Management System)      
      ## Data stored in tree-like structures.

   -- Also from ancient history, 'network systems' such as GE's IDS (Integrated Data Store)
      ## Data stored in graph-like structures, not just the tree subtype.

   -- Nowadays two general approaches:

      1. The still ubiquitous 'relational systems' that originate from IBM, in particular E. F. Codd's work 
         in the late 1960s.

         ## Strong mathematical foundation, in particular from first-order logic (FOL).
            ### In FOL, a 'relation' is a 'predicate': a function that maps to a truth-value (e.g., 'true' or 'false').
                  We'll see later how this plays out in practice.

            ### In RDBMSes (Relational DataBase Management Systems), a relation is implemented as a table 
                with rows and columns.

                  Example -- here's a depiction of a the relation named 'Employee', which would be
                             implemented as the Employee table in a DB system. In parens are the
                             column labels (id, fname,...,sal): each row has values for all six columns.

                    Employee(id, fname, mi, lname, dept, sal)  ## structure of the Employee table ('relation')

                    ...
                    Row 27: 196A, Fred, J, Flintstone, Construction, 123456.78   ## values in a sample row
                    ...

                    Row 27 can be interpreted as the true statement: There is an Employee with Id 196A named Fred...
                    A more technical representation is below:

             ### The Employee table can be thought of, in mathematical terms, as the IsAnEmployee relation -- a 
                 relation true of every row in the Employee table.

             ### In detail:

            predicate or relation         3rd arg            5th arg                        truth-value
                          \                 /                  /                    maps to    \
                      Employee(196A, Fred, J, Flintstone, Construction, 123456.78) ---------> true
                                \      \          \                          \  
                             1st arg  2nd arg   4th arg                     6th arg
 
         ## SQL (Structured Query Language) is the standard language in an RDBMS.
            ### SQL has various standards. For instance, SQL-92 (SQL-1992) is a major revision/standardization.
                  Later revisions include SQL:1999, SQL:2003, SQL:2008, and SQL:2011.

            ### An RDBMS typically specifies which version of SQL is supported in full or in large part.

      ## Sample RDBMSes: Oracle, DB2, SQL Server, MySQL, PostgreSQL, SQLite,...

      2. The up-and-coming, widely varying 'no-SQL' ('non-relational') systems such as Cassandra, CouchDB,
         MongoDB, Redis,...

         ## Great variety in features and approaches, which makes for various subcategories. 
      
            ### In simplest form, 'no-SQL' DBs are key/value stores: persistent maps that support the CRUD operations
	        ans (at least most of) the ACID properties.

         ## The unifying feature is the 'non-relational', although such systems may have query languages with a
            striking resemblance to SQL, the standard relational language.
  


+62 −0
Changes for Database Fundamentals for Java Programmers - Working Files/Chapter 1/install.txt: 62 added lines, 0 removed lines.
Original line number Diff line number Diff line

 -- Software installation 

 # Core Java: current version of the standard edition (e.g., Java8 SE) is best

   ## core Java 5 or greater will do, but the more recent, the better

   ## URL: http://www.oracle.com/technetwork/java/javase/overview/index.html   

 # SQLite (current version is 3)

   ## Check if you already have it. From the command-line: 

         sqlite3 --version

   ## URL: https://www.sqlite.org/download.html

   ## Quick installs for various platforms (Windows, Mac OSX, Linux)

 # Apache Ant (if you want to use my build script): https://ant.apache.org/bindownload.cgi

   ## You may have Ant installed already. At the command line, try: ant -version
 
####--------------------------------------------------------------------------

 -- Why SQLite?

 # It's as simple as a relational database system gets:

   ## There's no DB server to start, stop, and otherwise maintain.

      ### Persistent databases are implemented as files on the local system.

      ### An in-memory only database is created with the SQLite command 'sqlite3' with no argument.
          The SQLite client then allows interaction with the DB. (The in-memory DB can be saved later, 
	  if you like.)

   ## There's no configuration.

      ### SQLite is basically a software library under 500KB in size.

   ## It's self-contained, language-neutral, and platform-neutral.

      ### We'll be using mostly Java, but other languages too as proof-of-concept.

   ## It's still the real deal, an SQL-accessible DB that supports the 
      ACID (Atomic, Consistent, Isolated, and Durable) properities (more on these later).

      ### The same point can be made byu saying that SQLite is a 'trasactional DB',
          as it's a transaction that ensures the ACID properties.

   ## It's free. 

 ####--------------------------------------------------------------------------

 -- What about no-SQL databases?

 # That's coming later. For now, SQLite is what's needed.



+10.6 MiB

File added.

No diff preview for this file type.

Loading