---
title: "Database Design"  
description: "Database Design"  
author: "Anonymous User"  
published: 2018-07-17  
updated: 2018-07-17  
canonical: https://www.mindstick.com/forum/34620/database-design  
category: "database"  
tags: ["database", "db2", "database design"]  
reading_time: 1 minute  

---

# Database Design

[Design](https://www.mindstick.com/articles/12279/interior-design-and-furniture-store-wordpress-theme) a [Database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) of [student](https://www.mindstick.com/articles/157138/student-loan-default-wage-garnishment-and-student-loan), [subject](https://yourviews.mindstick.com/view/259/physical-education-a-compulsory-subject-in-school-curriculum) and marks and [describe](https://www.mindstick.com/interview/12752/what-is-ddms-describe-some-of-its-capabilities) various [keys](https://www.mindstick.com/articles/75385/full-product-keys) and [attributes](https://www.mindstick.com/articles/13105/2-attributes-that-make-your-odoo-ecommerce-theme-productive-and-engaging) ? Example ??

## Replies

### Reply by Prakash nidhi Verma

Hey, Franco according to your question here I post a designed database for you. its contain a student id, name and address and shown below how to create tables :

Database Design:

```
students(student_id, student_name, address)  enrollment(student_id, subject_id, mark)
subject(subject_id, subject_name, department)
```

Create student table :

```
CREATE TABLE STUDENTS (
STUDENT_ID VARCHAR2(10) PRIMARY KEY,
STUDENT_NAME VARCHAR2(15),
     ADDRESS VARCHAR2(30)
);
```

Create enrollment table :

```
CREATE TABLE ENROLMENT (
STUDENT_ID VARCHAR2(5) REFERENCES STUDENTS(STUDENT_ID),
SUBJECT_ID VARCHAR2(6) REFERENCES SUBJECTS(SUBJECT_ID),
MARK NUMBER(3),
PRIMARY KEY(STUDENT_ID,SUBJECT_ID)
);
```

Create subject table :

```
CREATE TABLE SUBJECTS (
SUBJECT_ID VARCHAR2(6) PRIMARY KEY,
SUBJECT_NAME VARCHAR2(20),
DEPARTMENT VARCHAR2(20)
);
```

Happy Coding :)


---

Original Source: https://www.mindstick.com/forum/34620/database-design

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
