GithubHelp home page GithubHelp logo

jintae1954 / 2021-db Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.55 MB

인하대학교 정보통신공학과 데이터베이스 실습 코드 저장소

JavaScript 57.26% Handlebars 27.17% HTML 15.22% CSS 0.35%

2021-db's Introduction

2021-db

     데이터베이스설계



3주차 실습과제

1. DATABASE: dbdesign

2. CREATE TABLE:

CREATE TABLE student 
(
    studentNumber int not null,
    name char(30) not null,
    major char(30) not null,
    grade char(1) not null,
    admission char(30) not null,
    email char(50) not null,
    PRIMARY KEY(studentNumber)
);

3. INSERT:
INSERT INTO student VALUES
    (12161733, 'park', 'com', '3', '2016-03', '[email protected]'),
    (12171733, 'kim', 'com', '3', '2017-03', '[email protected]');

4. SELECT:

studentNumber name major grade admission email
12161733 park com 3 2016-03 [email protected]
12171733 kim com 3 2-17-03 [email protected]

8주차 실습과제

1. DATABASE: week8

2. CREATE TABLE:

CREATE TABLE DEPARTMENT
( Dname           VARCHAR(15)       NOT NULL,
  Dnumber         INT               NOT NULL,
  Mgr_ssn         CHAR(9)           NOT NULL,
  Mgr_start_date  DATE,
PRIMARY KEY (Dnumber),
UNIQUE      (Dname),
FOREIGN KEY (Mgr_ssn) REFERENCES EMPLOYEE(Ssn) );

CREATE TABLE EMPLOYEE
( Fname           VARCHAR(10)   NOT NULL,
  Minit           CHAR,
  Lname           VARCHAR(20)      NOT NULL,
  Ssn             CHAR(9)          NOT NULL,
  Bdate           DATE,
  Address         VARCHAR(30),
  Sex             CHAR(1),
  Salary          DECIMAL(5),
  Super_ssn       CHAR(9),
  Dno             INT               NOT NULL,
PRIMARY KEY   (Ssn));

3. INSERT:

INSERT INTO DEPARTMENT VALUES
    ('정보통신공학', 1, '12161733', '2016-03-02'),
    ('정치학과', 2, '12161700', '1999-09-09');
    ('국제통상학과', 3, '12161734', '2016-03-02');

INSERT INTO EMPLOYEE VALUES
    ('SQUID', 'G', 'AME', '00000001','1945-08-15','SEOUL','남', 9999, '12161733', 1),
    ...
    ('Pink', 'T', 'Soldier', '12161737', '1997-03-12', 'SEOUL', '남', 1300, '12161733', 1);

4. SELECT:

DEPARTMENT TABLE

Dname Dnumber Mgr_ssn Mgr_start_date
정보통신공학과 1 12161733 2016-03-02
정치학과 2 12161700 1999-09-09
국제통상학과 3 12161734 2016-03-02

EMPLOYEE TABLE

Fname Minit Lname Ssn Bdate Address Sex Salary Super_ssn Dno
SQUID G AME 00000001 1945-08-15 SEOUL 9999 12161733 1
John F Kennedy 12161700 1971-05-09 USA 500 2
PARK Y JINTAE 12161733 1997-10-11 SEOUL 1000 1
Jin K Park 12161734 1997-03-12 SEOUL 1200 3
Pink T Soldier 12161737 1997-03-12 SEOUL 1300 12161733 1

10주차 실습과제

1. DATABASE: week10

2. CREATE TABLE:

CREATE TABLE INVESTMENT
( Id           INT              NOT NULL,
  Name         VARCHAR(20)      NOT NULL,
  Raing        VARCHAR(5)       NOT NULL,
PRIMARY KEY (Dnumber),
);

3. INSERT:

INSERT INTO INVESTMENT VALUES
    (1, 'APPLE', 'GOOD'),
    (2, 'QCOM', 'GOOD'),
    (3, 'FACEBOOK', 'BAD),
    (4, 'SAMSUNG', 'SOSO'),
    (5, 'BOEING', 'SOSO');

4. SELECT:

INVESTMENT TABLE

Id Name Rating
1 APPLE GOOD
2 QCOM GOOD
3 FACEBOOK BAD
4 SAMSUNG SOSO
5 BOEING SOSO



2021-db's People

Contributors

jintae1954 avatar

Watchers

 avatar

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.