{"id":20594671,"url":"https://github.com/soundlygifted/databasecsvfileio","last_synced_at":"2025-03-06T14:44:40.529Z","repository":{"id":203612749,"uuid":"583558898","full_name":"SoundlyGifted/DatabaseCsvFileIO","owner":"SoundlyGifted","description":"Web app to learn ways of reading/writing csv-file data to/from a database","archived":false,"fork":false,"pushed_at":"2023-02-01T14:55:50.000Z","size":3802,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T00:32:30.136Z","etag":null,"topics":["commons-csv","derby","derby-database","ejb","glassfish-server","glassfish6","jakarta-ee","jakarta-ee9","jakartaee","jakartaee9","java","jdk17","jsp","jstl","maven","opencsv","servlet","servlet-jsp","sql","sql-query"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoundlyGifted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-30T06:24:42.000Z","updated_at":"2023-01-29T17:54:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"eca3aac5-fee8-4add-8395-a65b0236459d","html_url":"https://github.com/SoundlyGifted/DatabaseCsvFileIO","commit_stats":null,"previous_names":["soundlygifted/databasecsvfileio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoundlyGifted%2FDatabaseCsvFileIO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoundlyGifted%2FDatabaseCsvFileIO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoundlyGifted%2FDatabaseCsvFileIO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoundlyGifted%2FDatabaseCsvFileIO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoundlyGifted","download_url":"https://codeload.github.com/SoundlyGifted/DatabaseCsvFileIO/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242229380,"owners_count":20093379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commons-csv","derby","derby-database","ejb","glassfish-server","glassfish6","jakarta-ee","jakarta-ee9","jakartaee","jakartaee9","java","jdk17","jsp","jstl","maven","opencsv","servlet","servlet-jsp","sql","sql-query"],"created_at":"2024-11-16T08:09:44.703Z","updated_at":"2025-03-06T14:44:40.502Z","avatar_url":"https://github.com/SoundlyGifted.png","language":"Java","readme":"# DatabaseCsvFileIO\nWeb Application to read/write csv-file data from/to a database\n### Project description\nThis Java web application can read a csv-file selected by the user and write it to a database. Also, it can download the data from the database into a csv-file.\nThis project uses the following technologies: JDK17, Glassfish server 6.2.5 (Jakarta EE 9.1), Servlets \u0026 JSP / JSTL, EJB, Apache Derby DBMS (SQL), Maven, Apache Commons (csv, lang, io), OpenCSV\n\n### Purpose\nThe project was made to explore ways to read / write csv-file data using specialized libraries, as well as learn how to write csv-file data to a database and download it back into a csv-file.\n\n### Key feature description\nThe application has web UI, the operation is controlled via JSP-page. The current functionality is as follows:\n- read csv-file data using **_Apache Commons libraries_** or **_OpenCSV library_** and upload it into the database. The user is able to choose the file using the file browser, and select the desired reading method (library) via the selection dropdown list.\n- observe current database records on the JSP-page.\n- download data from the database into a file in the csv-format using **_Apache Commons libraries_** or **_OpenCSV library_** into the user home “downloads” folder. The file is named as **“content.csv”**.\n- clear the current data in the database table.\n\n### Usage example\nThe following demo gif shows the current functionality.\n\n![](images/DatabaseCsvFileIO_demo.gif)\n\n### Project structure\nThis project is Maven based. The structure is shown below.\n\n![](images/DatabaseCsvFileIO_classes.PNG)\n\n**Web module:**\n- `web.process` package contains Java classes and EJB to process the data that come from the csv-file.\n  - `web.process.csvData` package contains `CSVFileData` class that keeps csv-file data: received from a csv-file to be written to the database or received from the database to be written to a csv-file.\n  - `web.process.database` package contains EJBs that provide interaction with the database such as: establish (using DB configs from the `config.properties` resource file) and close database connection, get SQL queries from the resource SQL-files, perform select/insert/delete queries.\n  - `web.process.download` package contains EJB that performs writing of the csv-format data (received from the database) into the HTTP Servlet response output stream (for further sending to the client as a character text data).\n  - `web.process.parse` package contains EJB that parses the csv-file data (received from the JSP page form) and writes it into the object of `CSVFileData` class (for further upload the data to the database).\n- `web.servlet` package contains Java Servlets that implement the controlling logic of user commands processing and csv-file data handling (received from the forms of `index.jsp` page).\n\n**The project also contains:**\n- `index.jsp` page (with user forms) that contains CSS, JS, images.\n- the **resources** package that contains:\n  - `config.properties` file with the database configuration.\n  - SQL-files that contain SQL queries.\n  \n**The database** contains just one table `MYDATA` with 3 fields: `ID` (primary key), `TEXTDATA` (varchar), `DOUBLEDATA` (double).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundlygifted%2Fdatabasecsvfileio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoundlygifted%2Fdatabasecsvfileio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundlygifted%2Fdatabasecsvfileio/lists"}