Closed peterarsentev closed 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.
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.
I have checked your sql script. It has few mistakes.
All done. I’ve changed the order of tables creation. Text fields values increased and some I’v changed from VARCHAR to TEXT
You can use any appropriate tools for drawing UML.