Code Monkey home page Code Monkey logo

simple-hibernate-jpa2's Introduction

In das Verzeichnis c:\Dev\Src\Libs\Derby\10.8.1.2\bin wechseln.

ij aufrufen.

connect 'jdbc:derby://localhost:1527/BookShopDB;create=true;user=book;password=book;' ausf�hren.

CREATE TABLE PUBLISHER (
    CODE VARCHAR(4) NOT NULL ,
    PUBLISHER_NAME VARCHAR(100) NOT NULL,
    ADDRESS VARCHAR(200), PRIMARY KEY(CODE)
);

CREATE TABLE BOOK (
    ISBN VARCHAR(50) NOT NULL,
    BOOK_NAME VARCHAR(100) NOT NULL,
    PUBLISHER_CODE VARCHAR(4), 
    PUBLISH_DATE DATE,
    PRICE integer,
    PRIMARY KEY (ISBN), 
    FOREIGN KEY (PUBLISHER_CODE) REFERENCES PUBLISHER (CODE)
);

CREATE TABLE CHAPTER (
    BOOK_ISBN VARCHAR(50) NOT NULL,
    IDX integer NOT NULL,
    TITLE VARCHAR(100) NOT NULL,
    NUM_OF_PAGES integer,
    PRIMARY KEY (BOOK_ISBN, IDX),
    FOREIGN KEY (BOOK_ISBN) REFERENCES BOOK (ISBN)
);

insert into PUBLISHER(code, publisher_name, address) values ('001', 'Apress', 'New York ,New York');
insert into PUBLISHER(code, publisher_name, address) values ('002', 'Manning', 'San Francisco, CA');
insert into book(isbn, book_name, publisher_code, publish_date, price) values ('PBN123', 'Spring Recipes', '001', DATE('2008-02-02'), 30);
insert into book(isbn, book_name, publisher_code, publish_date, price) values ('PBN456', 'Hibernate Recipes', '002', DATE('2008-11-02'), 40);
This file was modified by IntelliJ IDEA 10.0.3 for binding GitHub repository

simple-hibernate-jpa2's People

Contributors

clauspolanka avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

mirkogibin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.