Lecture 12 Java SE Database Programming - Acs.ase.ro

1y ago
5 Views
2 Downloads
5.61 MB
51 Pages
Last View : 14d ago
Last Download : 3m ago
Upload by : Josiah Pursley
Transcription

Lecture 12Java SE Database ProgrammingpresentationJava Programming – Software App DevelopmentCristian TomaD.I.C.E/D.E.I.C – Department of Economic Informatics & Cyberneticswww.dice.ase.ro

Cristian Toma – Business Card

Agenda for Lecture 12JDBC, RDBMS& NoSQLConceptsJDBC & NoSQLProgrammingExchangeIdeas

JDBC Driver Types, JDBC APIJDBC Concepts

1. JDBC ConceptsJDBC Concepts:Java Database Connectivity (JDBC) is an ApplicationProgramming Interface(API) used to connect Javaapplication with Database. JDBC is used to interact withvarious type of Database such as Oracle, MS Access, MySQL and SQL Server (even SQLite). JDBC can also bedefined as the platform-independent interface between arelational database and Java programming. It allows Javaprogram to execute SQL statement and retrieve result oduction-to-jdbc

1. JDBC ConceptsJDBC Driver n-to-jdbc

1. JDBC ConceptsJDBC Driver -jdbc

1. JDBC ConceptsJDBC Driver -jdbc

1. JDBC ConceptsJDBC Driver -jdbc

1. JDBC ConceptsJDBC Driver -jdbc

1. JDBC ConceptsJDBC to-jdbc

1. JDBC ConceptsJDBC to-jdbc

1. JDBC ConceptsJDBC n-to-jdbc

1. JDBC Concepts1 - JDBC n-to-jdbc

1. JDBC Concepts2 - JDBC n-to-jdbc

1. JDBC Concepts3 - JDBC n-to-jdbc

1. JDBC Concepts4 - JDBC n-to-jdbc

1. NoSQL ConceptsMongoDB is an open-source document database and leading NoSQLdatabase. MongoDB is written in C . MongoDB is a cross-platform,document oriented database that provides, high performance, highavailability, and easy scalability. MongoDB works on concept of collectionand document.DatabaseDatabase is a physical container for collections. Each database gets itsown set of files on the file system. A single MongoDB server typically hasmultiple databases.CollectionCollection is a group of MongoDB documents. It is the equivalent of anRDBMS table. A collection exists within a single database. Collections donot enforce a schema. Documents within a collection can have differentfields. Typically, all documents in a collection are of similar or relatedpurpose.DocumentA document is a set of key-value pairs. Documents have dynamicschema. Dynamic schema means that documents in the same collectiondo not need to have the same set of fields or structure, and commonfields in a collection's documents may hold different types of data.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL ConceptsThe following table shows the relationship of RDBMS terminology with MongoDB.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL ConceptsSample DocumentFollowing example shows the document structure of a blog site, which issimply a comma separated key value pair.{}id: ObjectId(7df78ad8902c)title: 'MongoDB Overview',description: 'MongoDB is no sql database',by: 'tutorials point',url: 'http://www.tutorialspoint.com',tags: ['mongodb', 'database', 'NoSQL'],likes: 100,comments: [{ user:'user1', message: 'My first comment', dateCreated: new Date(2011,1,20,2,15), like: 0 },{ user:'user2', message: 'My second comments', dateCreated: new Date(2011,1,25,7,45), like: 5 }]id is a 12 bytes hexadecimal number which assures the uniqueness of every document. Youcan provide id while inserting the document. If you don’t provide then MongoDB provides aunique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3bytes for machine id, next 2 bytes for process id of MongoDB server and remaining 3 bytes aresimple incremental VALUE.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL ConceptsAny relational database has a typical schema design that shows number of tables and the relationship betweenthese tables. While in MongoDB, there is no concept of relationship.Advantages of MongoDB over RDBMS Schema less MongoDB is a document database in which one collection holds different documents. Number offields, content and size of the document can differ from one document to another. Structure of a single object is clear. No complex joins. Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query languagethat's nearly as powerful as SQL. Tuning. Ease of scale-out MongoDB is easy to scale. Conversion/mapping of application objects to database objects not needed. Uses internal memory for storing the (windowed) working set, enabling faster access of data.Why Use MongoDB? Document Oriented Storage Data is stored in the form of JSON style documents. Index on any attribute Replication and high availability Rich queries Fast in-place updates Professional support by MongoDBWhere to Use MongoDB? Big Data Content Management and Delivery Mobile and Social Infrastructure User Data Management Data Hubhttps://www.tutorials point.com/mongodb/index.htm

1. NoSQL ConceptsInstall MongoDB in Ubuntu sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv0C49F3730359A14518585931BC711F9BA15703C6 echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/testing multiverse" sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list sudo apt-get update sudo apt-get install -y mongodb sudo service mongodb start sudo service mongodb stop ### telnet localhost 27017 sudo find / -name mongo mongo db.stats()

1. NoSQL Concepts – Data ModellingData in MongoDB has a flexible schema.documents in the samecollection. They do not need to have the same set of fields or structure,and common fields in a collection’s documents may hold different typesof data.Some considerations while designing Schema in MongoDB Design your schema according to user requirements. Combine objects into one document if you will use them together.Otherwise separate them (but make sure there should not be need ofjoins). Duplicate the data (but limited) because disk space is cheap ascompare to compute time. Do joins while write, not on read. Optimize your schema for most frequent use cases. Do complex aggregation in the schema.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Concepts – Data ModellingData Modelling ExampleSuppose a client needs a database design forhis blog/website and see the differencesbetween RDBMS and MongoDB schemadesign.Websitehasthefollowingrequirements. Every post has the unique title, descriptionand URL. Every post can have one or more tags. Every post has the name of its publisherand total number of likes. Every post has comments given by usersalong with their name, message, data-timeand likes. On each post, there can be zero or morecomments.In RDBMS schema,design for aboverequirements will haveminimum three tables.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe use Command – CREATE DATABASEMongoDB use DATABASE NAME is used to create database. The command will create a newdatabase if it doesn't exist, otherwise it will return the existing database.SyntaxBasic syntax of use DATABASE statement is as follows use DATABASE NAMEExampleIf you want to create a database with name mydb , then use DATABASE statement wouldbe as follows use mydbswitched to db mydbTo check your currently selected database, use the command db db mydbIf you want to check your databases list, use the command show dbs. show dbslocal 0.78125GBtest 0.23012GBYour created database (mydb) is not present in list. To display database, you need to insert atleast one document into it. db.movie.insert({"name":"tutorials point"}) show dbslocal 0.78125GBmydb 0.23012GBtest 0.23012GBIn MongoDB default database is test. If you didn't create any database, then collections will bestored in test database.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe dropDatabase() Method – DELETE DATABASEMongoDB db.dropDatabase() command is used to drop a existing database.SyntaxBasic syntax of dropDatabase() command is as follows db.dropDatabase()This will delete the selected database. If you have not selected any database, thenit will delete default 'test' database.ExampleFirst, check the list of available databases by using the command, show dbs. show dbslocal 0.78125GBmydb 0.23012GBtest 0.23012GBIf you want to delete new database mydb , then dropDatabase() commandwould be as follows use mydbswitched to db mydb db.dropDatabase() { "dropped" : "mydb", "ok" : 1 }Now check list of databases. show dbslocal 0.78125GBtest 0.23012GBhttps://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThecreateCollection()Method – CREATECOLLECTION - “TABLE”MongoDB db.createCollection(name,options) is used tocreate collection.Inthecommand, name isname of collectiontobecreated. Options isa document and ww.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe createCollection() Method – CREATE COLLECTION - “TABLE”ExamplesBasic syntax of createCollection() method without options is as follows use testswitched to db test db.createCollection("mycollection"){ "ok" : 1 }You can check the created collection by using the command show collections. show collectionsmycollectionsystem.indexesThe following example shows the syntax of createCollection() method with fewimportant options db.createCollection("mycol", { capped : true, autoIndexId : true, size : 6142800, max : 10000 } ){ "ok" : 1 }In MongoDB, you don't need to create collection. MongoDB creates collectionautomatically, when you insert some document. db.tutorialspoint.insert({"name" : "tutorialspoint"}) show spointhttps://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe drop() Method – DELETE COLLECTION - “TABLE”MongoDB's db.collection.drop() is used to drop a collection from the database.SyntaxBasic syntax of drop() command is as follows db.COLLECTION NAME.drop()ExampleFirst, check the available collections into your database mydb. use mydbswitched to db mydb show spointNow drop the collection with the name mycollection. db.mycollection.drop()trueAgain check the list of collections into database. show collectionsmycolsystem.indexestutorialspointdrop() method will return true, if the selected collection is dropped successfully,otherwise it will return false. https://www.tutorials point.com/mongodb/index.htm

1. NoSQL ConceptsMongoDB supports many datatypes. Some of them are String This is the most commonly used datatype to store the data. String inMongoDB must be UTF-8 valid. Integer This type is used to store a numerical value. Integer can be 32 bit or64 bit depending upon your server. Boolean This type is used to store a boolean (true/ false) value. Double This type is used to store floating point values. Min/ Max keys This type is used to compare a value against the lowest andhighest BSON elements. Arrays This type is used to store arrays or list or multiple values into one key. Timestamp ctimestamp. This can be handy for recording when a document hasbeen modified or added. Object This datatype is used for embedded documents. Null This type is used to store a Null value. Symbol This datatype is used identically to a string; however, it's generallyreserved for languages that use a specific symbol type. Date This datatype is used to store the current date or time in UNIX timeformat. You can specify your own date time by creating object of Date and passingday, month, year into it. Object ID This datatype is used to store the document’s ID. Binary data This datatype is used to store binary data. Code This datatype is used to store JavaScript code into the document. Regular expression This datatype is used to store regular expression.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe insert() Method – INSERT DOCUMENT - “TUPLE/ROW”Toinsert dataintoMongoDBcollection,you need touseMongoDB's insert() or save() method.SyntaxThe basic syntax of insert() command is as follows db.COLLECTION NAME.insert(document)Example db.mycol.insert({ id: ObjectId(7df78ad8902c), title: 'MongoDB Overview', description:'MongoDB is no sql database', by: 'tutorials point', url: 'http://www.tutorialspoint.com',tags: ['mongodb', 'database', 'NoSQL'], likes: 100 })Here mycol is our collection name, as created in the previous chapter. Ifthe collection doesn't exist in the database, then MongoDB will create thiscollection and then insert a document into it.In the inserted document, if we don't specify the id parameter, thenMongoDB assigns a unique ObjectId for this document.id is 12 bytes hexadecimal number unique for every document in acollection. 12 bytes are divided as follows id: ObjectId(4 bytes timestamp, 3 bytes machine id, 2 bytes process id, 3 bytes incrementer)To insert multiple documents in a single query, you can pass an array ofdocuments in insert() command.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe insert() Method – INSERT DOCUMENT - “TUPLE/ROW”Example db.post.insert([{title: 'MongoDB Overview',description: 'MongoDB is no sql database',by: 'tutorials point',url: 'http://www.tutorialspoint.com',tags: ['mongodb', 'database', 'NoSQL'],likes: 100},{ title: 'NoSQL Database', description: 'NoSQL database doesn't have tables', by: 'tutorialspoint', url: 'http://www.tutorialspoint.com', tags: ['mongodb', 'database', 'NoSQL'], likes: 20,comments: [ { user:'user1', message: 'My first comment', dateCreated: newDate(2013,11,10,2,35), like: 0 } ] } ])To insert the document you can use db.post.save(document) also. If youdon't specify id in the document then save() method will work sameas insert() method. If you specify id then it will replace whole data ofdocument containing id as specified in save() method.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – QUERY DOCUMENT - “TUPLE/ROW”To query data from MongoDB collection, you need to use MongoDB's find() method.SyntaxThe basic syntax of find() method is as follows db.COLLECTION NAME.find()find() method will display all the documents in a non-structured way.The pretty() MethodTo display the results in a formatted way, you can use pretty() method.Syntax db.mycol.find().pretty()Example db.mycol.find().pretty(){" id": ObjectId(7df78ad8902c),"title": "MongoDB Overview","description": "MongoDB is no sql database","by": "tutorials point","url": "http://www.tutorialspoint.com","tags": ["mongodb", "database", "NoSQL"],"likes": "100"}Apart from find() method, there is findOne() method, that returns only onedocument.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – QUERY DOCUMENT - “TUPLE/ROW”RDBMS Where Clause Equivalents in MongoDBTo query the document on the basis of some condition, you can use following operations.OperationSyntaxExampleRDBMS EquivalentEquality{ key : value }db.mycol.find({"by":"tuto where by 'tutorialsrials point"}).pretty()point'Less Than{ key :{ lt: value }}db.mycol.find({"likes":{ lt where likes 50:50}}).pretty()Less Than Equals{ key :{ lte: value }}db.mycol.find({"likes":{ lt where likes 50e:50}}).pretty()Greater Than{ key :{ gt: value }}db.mycol.find({"likes":{ g where likes 50t:50}}).pretty()Greater Than Equals{ key :{ gte: value }}db.mycol.find({"likes":{ g where likes 50te:50}}).pretty()Not Equals{ key :{ ne: value }}db.mycol.find({"likes":{ n where likes ! 50e:50}}).pretty()https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – QUERY DOCUMENT - “TUPLE/ROW” with ANDSyntaxIn the find() method, if you pass multiple keys by separating them by ','then MongoDB treats it as AND condition. Following is the basic syntaxof AND db.mycol.find( { and: [ {key1: value1}, {key2:value2} ] } ).pretty()ExampleFollowing example will show all the tutorials written by 'tutorials point' andwhose title is 'MongoDB Overview'. db.mycol.find( { and:[{"by":"tutorials point"},{"title": "MongoDB Overview"}]} ).pretty(){" id": ObjectId(7df78ad8902c),"title": "MongoDB Overview","description": "MongoDB is no sql database", "by": "tutorials point", "url":"http://www.tutorialspoint.com", "tags": ["mongodb", "database", "NoSQL"], "likes": "100"}For the above given example, equivalent where clause will be ' where by 'tutorials point' AND title 'MongoDB Overview' '. You can pass anynumber of key, value pairs in find clause.https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – QUERY DOCUMENT - “TUPLE/ROW” with ORSyntaxTo query documents based on the OR condition, you need touse or keyword. Following is the basic syntax of OR db.mycol.find( { or: [ {key1: value1}, {key2:value2} ] } ).pretty()ExampleFollowing example will show all the tutorials written by 'tutorials point' orwhose title is 'MongoDB Overview'. db.mycol.find( { or:[{"by":"tutorials point"}, {"title": "MongoDB Overview"}]} ).pretty(){" id": ObjectId(7df78ad8902c),"title": "MongoDB Overview","description": "MongoDB is no sql database","by": "tutorials point","url": "http://www.tutorialspoint.com","tags": ["mongodb", "database", "NoSQL"],"likes": "100”}https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – QUERY DOCUMENT - “TUPLE/ROW” withAND OR TogetherExampleThe following example will show the documents that have likes greater than10 and whose title is either 'MongoDB Overview' or by is 'tutorials point'.Equivalent SQL where clause is 'where likes 10 AND (by 'tutorialspoint' OR title 'MongoDB Overview')’ db.mycol.find( {"likes": { gt:10}, or: [{"by": "tutorials point"}, {"title": "MongoDBOverview"}] } ).pretty(){" id": ObjectId(7df78ad8902c),"title": "MongoDB Overview","description": "MongoDB is no sql database","by": "tutorials point","url": "http://www.tutorialspoint.com","tags": ["mongodb", "database", "NoSQL"],"likes": "100"}https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe update() Method – UPDATE DOCUMENT - “TUPLE/ROW”MongoDB's update() and save() methods are used to update document into a collection. Theupdate() method updates the values in the existing document while the save() methodreplaces the existing document with the document passed in save() method.The update() method updates the values in the existing document.SyntaxThe basic syntax of update() method is as follows db.COLLECTION NAME.update(SELECTION CRITERIA, UPDATED DATA)ExampleConsider the mycol collection has the following data.{ " id" : ObjectId(5983548781331adf45ec5), "title":"MongoDB Overview"}{ " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"}Following example will set the new title 'New MongoDB Tutorial' of the documentswhose title is 'MongoDB Overview'. db.mycol.update( {'title':'MongoDB Overview'}, { set:{'title':'New MongoDB Tutorial'}} ) db.mycol.find(){ " id" : ObjectId(5983548781331adf45ec5), "title":"New MongoDB Tutorial"}{ " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"}By default, MongoDB will update only a single document. To update multipledocuments, you need to set a parameter 'multi' to true. db.mycol.update({'title':'MongoDB Overview'}, { set:{'title':'New MongoDB Tutorial'}},{multi:true})https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe save() Method – SAVE/UPDATE DOCUMENT - “TUPLE/ROW”The save() method replaces the existing document with the newdocument passed in the save() method.SyntaxThe basic syntax of MongoDB save() method is shown below db.COLLECTION NAME.save({ id:ObjectId(),NEW DATA})ExampleFollowing entwiththeid db.mycol.save( { " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point NewTopic", "by":"Tutorials Point" } ) db.mycol.find(){ " id" : ObjectId(5983548781331adf45ec5), "title":"Tutorials Point New Topic","by":"Tutorials Point"} { " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"} https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe remove() Method – DELETE DOCUMENT - “TUPLE/ROW”MongoDB's remove() method is used to remove a document from thecollection. remove() method accepts two parameters. One is deletioncriteria and second is justOne flag. deletion criteria (Optional) deletion criteria according to documentswill be removed. justOne (Optional) if set to true or 1, then remove only one document.SyntaxBasic syntax of remove() method is as follows db.COLLECTION NAME.remove(DELLETION CRITTERIA)ExampleConsider the mycol collection has the following data.{ " id" : ObjectId(5983548781331adf45ec5), "title":"MongoDB Overview"}{ " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"}Following example will remove all the documents whose title is 'MongoDBOverview'. db.mycol.remove({'title':'MongoDB Overview'}) db.mycol.find(){ " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"}https://www.tutorials point.com/mongodb/index.htm

1. NoSQL Hands-OnThe find() Method – PROJECTION of COLLECTION - “TABLE”In MongoDB, projection means selecting only the necessary data rather than selecting whole ofthe data of a document. If a document has 5 fields and you need to show only 3, then selectonly 3 fields from them.MongoDB's find() method, exposed in QUERY DOCUMENT section, accepts second optionalparameter that is list of fields that you want to retrieve. In MongoDB, when youexecute find() method, then it displays all fields of a document. To limit this, you need to set alist of fields with value 1 or 0. 1 is used to show the field while 0 is used to hide the fields.SyntaxThe basic syntax of find() method with projection is as follows db.COLLECTION NAME.find( {}, {KEY:1} )ExampleConsider the collection mycol has the following data { " id" : ObjectId(5983548781331adf45ec5), "title":"MongoDB Overview"}{ " id" : ObjectId(5983548781331adf45ec6), "title":"NoSQL Overview"}{ " id" : ObjectId(5983548781331adf45ec7), "title":"Tutorials Point Overview"}Following example will display the title of the document while querying thedocument. db.mycol.find( {}, {"title":1, id:0} ){"title":"MongoDB Overview"}{"title":"NoSQL Overview"}{"title":"Tutorials Point Overview"}Please note id field is always displayed while executing find() method, if you don'twant this field, then you need to set it as 0.https://www.tutorials point.com/mongodb/index.htm

Section ConclusionJava is suitable forDatabasesFact:In few samples it is simple to understand: JDBCAPI, NoSQL programming and rememberdatabases concepts.

Java SQLite – SQL Insert, Select, Update, Delete NoSQL - MongoDBJava SQLite/MySQL JDBC & NoSQL-MongoDBProgramming

2. JDBC Programming

2. JDBC Programming

2. JDBC Programming

2. JDBC Programming

Section ConclusionsPlease review the JDBC API, NoSQL library and DatabaseProgramming.JDBC Programmingfor easy sharing

Java Relational & NoSQLCommunicate & Exchange Ideas

?Questions & Answers!But wait There’s More!

What’sThanks!Your Message?Java SE – Java Standard Edition ProgrammingEnd of Lecture 12 – Database Programming

various type of Database such as Oracle, MS Access, My SQL and SQL Server (even SQLite). JDBC can also be defined as the platform-independent interface between a relational database and Java programming. It allows Java program to execute SQL statement and retrieve result from database.

Related Documents:

java.io Input and output java.lang Language support java.math Arbitrary-precision numbers java.net Networking java.nio "New" (memory-mapped) I/O java.rmi Remote method invocations java.security Security support java.sql Database support java.text Internationalized formatting of text and numbers java.time Dates, time, duration, time zones, etc.

Java Version Java FAQs 2. Java Version 2.1 Used Java Version This is how you find your Java version: Start the Control Panel Java General About. 2.2 Checking Java Version Check Java version on https://www.java.com/de/download/installed.jsp. 2.3 Switching on Java Console Start Control Panel Java Advanced. The following window appears:

Introduction of Chemical Reaction Engineering Introduction about Chemical Engineering 0:31:15 0:31:09. Lecture 14 Lecture 15 Lecture 16 Lecture 17 Lecture 18 Lecture 19 Lecture 20 Lecture 21 Lecture 22 Lecture 23 Lecture 24 Lecture 25 Lecture 26 Lecture 27 Lecture 28 Lecture

2 Java Applications on Oracle Database 2.1 Database Sessions Imposed on Java Applications 2-1 2.2 Execution Control of Java Applications 2-3 2.3 Java Code, Binaries, and Resources Storage 2-3 2.4 About Java Classes Loaded in the Database 2-4 2.5 Preparing Java Class Methods for Execution 2-5 2.5.1 Compiling Java Classes 2-6

3. _ is a software that interprets Java bytecode. a. Java virtual machine b. Java compiler c. Java debugger d. Java API 4. Which of the following is true? a. Java uses only interpreter b. Java uses only compiler. c. Java uses both interpreter and compiler. d. None of the above. 5. A Java file with

The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. In the code snippet bellow we demonstrate how to transform a JDBC query result into Car objects: import java.sql.*; import java.util.LinkedList; import java.util.List;

besteht aus der Java-API (Java Application Programming Interface) und der Java-VM (Java Virtual Machine). Abbildung 1: Java-Plattform Die Java-API ist eine große Sammlung von Java-Programmen, die in sog. Pakete (packages) aufgeteilt sind. Pakete sind vergleichbar mit Bibliotheken in anderen Programmiersprachen und umfassen u.a.

JAR Javadoc Java Language jar Security Others Toolkits: FX Java 2D Sound . Java Programming -Week 1. 6/25. Outline Java is. Let’s get started! The JDK The Java Sandbox . into your namespace. java.lang contains the most basic classes in the Java language. It is imported automatically, so