timyas / java-muster

Java model project
0 stars 0 forks source link

Design the UML diagramm, which will describe the necessary models in the project #2

Closed peterarsentev closed 8 years ago

peterarsentev commented 8 years ago
  1. You need to design the UML diagramm.
  2. Describe the relations between them.
  3. Create the SQL script, which will create the necessary scructure in DB. In this project, you need to use PostgreSQL, so all SQL script should be adopted for this DB.

You can use any appropriate tools for drawing UML.

timyas commented 8 years ago

I'm not familiar with PostgreSQL, that's why I did both UML diagram and SQL script using MySQL. I'm not sure about relationships description between tables.

peterarsentev commented 8 years ago

First, You should read some articles about database normalization. Your tables store repeatable data. For example: Author. Second. You have to use different data type for columns. Right now, all of them are varchar. It does not fit for your bisseness requirments. Third. Don't polute the colunm names. For example: the task issues has the column issue_name. it is not necessary. You can leave it 'name' without prefix. Fourth. You miss foreign keys. It is nessecary mechanism for hibernate in future.

Tables should look like issues(id, name, desc, createDate, updateDate, authorId(foreign key to User table)) comments(id, text, craeteDate, authorId(foreign key to user table)) files(id, data, issueId(fogeign key to issues)) users(id, login, password, roleId(foreign key to role table)) roles(id, name)

Role tables should be used for implementing Access Controll Level in the app.

Please, correct your date and give me notice. Thanks.

peterarsentev commented 8 years ago

I have checked your sql script. It has few mistakes.

  1. You should change the ordering. Right now. I could not execute it, because I has broken order.
  2. You need to increase the limit value for text fields, In real life, it takes more then 45 symbols.
timyas commented 8 years ago

All done. I’ve changed the order of tables creation. Text fields values increased and some I’v changed from VARCHAR to TEXT