Entwurfstool

Kenn einer von euch ein gutes Tool um eine Datenbank zu entwerfen?
Also das reine Zeichnen würde mir schon reichen es muss mir keine Scripte oder so erstellen.

Meinst du sowas?

http://www.azzurri.jp/en/software/clay/screenshots.jsp

jop genau

Gerade mal getestet das ist wunderbar. Genau sowas hab ich gesucht danke. :slight_smile:

Freut mich dir geholfen zu haben. :smiley:

ui gleich mal merken :smiley:

es hat aber leider ne Macke
man kann keiner Quantifizierer angeben

Also wenn noch wer Tools kennt immer raus damit :wink:

Ich benutz jetzt erstmal DBDesigner 4 der ist ganz gut.
Er hat leider nur paar kleine Macken aber sonst ganz gut.

ich fand damals das programm nicht schlecht
http://www.datanamic.com/dezign/index.html

Microsoft Visio hat glaub ich auch ein Shape für Datenbank Diagramme, aber das hab ich noch nie benutzt. :slight_smile:

joa hats. Find ich jetzt aber nicht so toll.

ich hab bisher noch kein wirklich gutes gefunden DBDesigner 4 ist nicht schlecht hat aber nervige Macken
Mal sehen was meine Zeit so zu lässt derzeit fange ich experimentell mit einem eigenen Tool an aber weiß noch nicht genau was da raus kommt

            Comparable<MapEntry<K, V>>
    {
        private K key;
        private V value;

        public MapEntry(K key, V value)
        {
            this.key = key;
            this.value = value;
        }

        public int compareTo(MapEntry<K, V> o2)
        {
            return key.compareTo(o2.key);
        }

        public K getKey()
        {
            return key;
        }

        public void setKey(K key)
        {
            this.key = key;
        }

        public V getValue()
        {
            return value;
        }

        public void setValue(V value)
        {
            this.value = value;
        }
    }``` 
Edit: Bin ich da zu doof für oder geht das grad net?
Edit2: Aha
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;

import javax.swing.JFrame;


public class NFrame extends JFrame 
{
    private Rectangle snapRect;
    public NFrame()
    {
        setTitle("NFrame");
        setSize(400, 200);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
        this.addComponentListener(new ComponentAdapter()
            {
                public void componentMoved(ComponentEvent e)
                {
                    createNewSnapRect();
                }
            }
        );
    }
    public void createNewSnapRect()
    {
        snapRect = new Rectangle
            (
                    (int)this.getLocation().getX()-50,
                    (int)(this.getLocation().getY()+this.getSize().getHeight()),
                    100,
                    50
            );
    }
    public Rectangle getSnapRect()
    {
        return snapRect;
    }
    public static void main(String[] args)
    {
        new NochnFrame(new NFrame());
    }
}```
package de.illu.util;

import java.awt.event.ActionListener;
import java.io.*;

/**
 * @author Illuvatar
 */
public class Util <X> implements Comparable <Util <X>>
{
    /**
     * Ruft Thread.sleep (ms) auf
     * 
     * @param ms
     *            Zeit in Millisekunden
     * @see Thread#sleep
     */
    public static void sleep(long ms)
    {
        sleep(ms, 0);
    }

    /**
     * Ruft Thread.sleep (ms, nano) auf
     * 
     * @param ms
     *            Zeit in Millisekunden
     * @param nano
     *            Zusätzliche Zeit in Nanosekunden
     * @see Thread#sleep
     */
    public static void sleep(long ms, int nano)
    {
        try {
            Thread.sleep(ms, nano);
        } catch (InterruptedException ex) {
        }
    }

    /**
     * Schreibt s in os, wenn die VM beendet wird.
     * 
     * @see Runtime#addShutdownHook
     */
    public static void saveOnExit(final OutputStream os, final StringBuffer s)
    {
        Thread t = new Thread() {
            public void run()
            {
                try {
                    BufferedWriter bw = new BufferedWriter(
                            new OutputStreamWriter(os));
                    bw.write(s.toString());
                    bw.close();
                } catch (IOException ex) {
                }
            }
        };
        Runtime.getRuntime().addShutdownHook(t);
    }

    /**
     * @param name
     *            Der Name des Bildes
     * @see ClassLoader#getSystemResourceAsStream
     * @see javax.imageio.ImageIO
     */
    public static java.awt.Image loadImage(String name)
    {
        try {
            java.io.InputStream in = ClassLoader
                    .getSystemResourceAsStream(name);
            return javax.imageio.ImageIO.read(in);
        } catch (Exception ex) {
            javax.swing.JOptionPane.showMessageDialog(null, ex.toString(),
                    "Fehler", javax.swing.JOptionPane.ERROR_MESSAGE);
            ex.printStackTrace();
        }
        return null;
    }

    /**
     * @return ein Button mit einem Icon, dass aus Icons/imgname geladen wird,
     *         dem ToolTipText und ActionCommand text und dem ActionListener c
     */
    public static javax.swing.JButton createButton(String imgname, String text,
            ActionListener c)
    {
        javax.swing.JButton ret = new javax.swing.JButton(
                new javax.swing.ImageIcon(loadImage("Icons/" + imgname)));
        ret.setToolTipText(text);
        ret.setActionCommand(text);
        ret.addActionListener(c);
        return ret;
    }

    /**
     * Liest mit einem StringBuffer den ganzen Stream in einen String.
     * 
     * @return Der String oder ""
     */
    public static String readStream(InputStream fis)
    {
        try {
            int len;
            byte[] buf = new byte[1024];
            StringBuffer sb = new StringBuffer();
            while ((len = fis.read(buf)) >= 0) {
                sb.append(new String(buf, 0, len));
            }
            return sb.toString();
        } catch (IOException ioe) {
            return "";
        }
    }

    /**
     * Liest mit einem StringBuffer den ganzen Dateiinhalt in einen String.
     * 
     * @return Der String oder ""
     */
    public static String readFile(File f)
    {
        try {
            return readStream(new FileInputStream(f));
        } catch (IOException ioe) {
            return "";
        }
    }

    /**
     * @return Den canonicalPath einer Datei oder den absolutePath, wenn die
     *         Datei nicht existiert oder ein Fehler auftritt.
     * @see File#getCanonicalPath
     */
    public static String filePath(File fil)
    {
        if (!fil.exists()) {
            return fil.getAbsolutePath();
        } else {
            try {
                return fil.getAbsoluteFile().getCanonicalPath();
            } catch (IOException ex) {
                return fil.getAbsolutePath();
            }
        }
    }

    /**
     * Schreibt sb.toString() in f.
     * 
     * @return Ob das Schreiben erfolgreich war.
     */
    public static boolean writeFile(StringBuffer sb, File f)
    {
        try {
            return writeFile(sb, new FileWriter(f));
        } catch (IOException ex) {
            return false;
        }
    }

    /**
     * Schreibt sb in w.
     * 
     * @return Ob das Schreiben erfolgreich war.
     */
    public static boolean writeFile(StringBuffer sb, Writer w)
    {
        try {
            BufferedWriter bw = new BufferedWriter(w);
            bw.write(sb.toString());
            bw.close();
            return true;
        } catch (IOException ex) {
            return false;
        }
    }

    /**
     * Schreibt b in f.
     * 
     * @return Ob das Schreiben erfolgreich war.
     */
    public static boolean writeFile(byte[] b, File f)
    {
        try {
            return writeFile(b, new FileOutputStream(f));
        } catch (IOException ex) {
            return false;
        }
    }

    /**
     * Schreibt sb in os.
     * 
     * @return Ob das Schreiben erfolgreich war.
     */
    public static boolean writeFile(byte[] b, OutputStream os)
    {
        try {
            BufferedOutputStream bos = new BufferedOutputStream(os);
            bos.write(b);
            bos.close();
            return true;
        } catch (IOException ex) {
            return false;
        }
    }

    /**
     * Gibt einen HTML-formatierten String mit Exception und Stacktrace zurück.
     */
    public static String getExceptionString(Throwable t)
    {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        t.printStackTrace(pw);
        StringBuilder sb = new StringBuilder();
        Throwable x = t.getCause();
        if (x != null) {
            sw.getBuffer().replace(sw.getBuffer().indexOf("Caused by"),
                    sw.getBuffer().length(), "");
        }
        sb.append("<html><h3>").append(t.toString()).append("</h3><p>").append(
                sw.toString().replace("
", "<br>")).append("</p>");
        if (x != null) {
            String sx = getExceptionString(x);
            sb.append("<h4><i>Caused by:</i></h4>").append(
                    sx.substring(6, sx.length() - 7));
        }
        sb.append("</html>");
        return sb.toString();
    }
    /**
     * Gibt die Argumente als Array zurück.
     */
    public static<T> T[] asArray (T... array)
    {
        return array;
    }
}
 
import java.awt.BorderLayout; 
import java.awt.Dimension; 
import java.awt.Font; 
import java.awt.GraphicsEnvironment; 
import java.awt.GridLayout; 
import java.awt.event.ActionEvent; 
import java.awt.event.ActionListener; 
import java.io.BufferedWriter; 
import java.io.FileWriter; 
import java.io.IOException; 
 
import javax.swing.JButton; 
import javax.swing.JFrame; 
import javax.swing.JLabel; 
import javax.swing.JPanel; 
import javax.swing.JScrollPane; 
 
public class FontsLister extends JFrame implements ActionListener 
{ 
    private String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); 
    private JLabel[] fontLabel = new JLabel[fontNames.length]; 
    private JPanel fonts = new JPanel(); 
    private JPanel infos = new JPanel(); 
    private JButton saveToHTML = new JButton("Save To HTML"); 
    public FontsLister() 
    { 
        fonts.setLayout(new GridLayout(fontNames.length,0)); 
        for(int i=0; i<fontLabel.length; i++) 
        { 
             
            fontLabel** = new JLabel(fontNames**); 
            fontLabel**.setFont(new Font(fontNames**, Font.PLAIN, 12)); 
            fonts.add(fontLabel**); 
        } 
        add(new JScrollPane(fonts), BorderLayout.CENTER); 
        infos.setPreferredSize(new Dimension(230,60)); 
        infos.add(new JLabel(fontNames.length+" Fonts were found...")); 
        saveToHTML.addActionListener(this); 
        infos.add(saveToHTML); 
              add(infos, BorderLayout.SOUTH); 
              setTitle("Font Lister"); 
        setSize(230, 300); 
        setLocationRelativeTo(null); 
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        setVisible(true); 
    } 
    public static void main(String[] args) 
    { 
        new FontsLister(); 
    } 
    public void actionPerformed(ActionEvent e) 
    { 
        if(e.getSource() == saveToHTML) 
        { 
            try 
            { 
                BufferedWriter br = new BufferedWriter(new FileWriter("FontList.html")); 
                 
                br.close(); 
            } catch (IOException e1) 
            { 
                e1.printStackTrace(); 
            } 
             
        } 
    } 
}```

import was.is.dat.für.ne.scheiße.?;

huhu

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

// Dies ist ein einzeiliger Kommentar
// blub
/*
* Und ich bin mehrzeilig
*/

/** und nochn JavaDoc den hatt ich vergessen **/

public class Frame extends JFrame
{
    private JPanel south = new JPanel();
    private JEditorPane editor = new JEditorPane();
    private JButton bt_exit = new JButton("Beenden");
    
    public Frame()
    {
        add(new JScrollPane(editor), BorderLayout.CENTER);
        bt_exit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent aevt)
            {
                dispose();
            }
        });
        south.setLayout(new FlowLayout(FlowLayout.RIGHT));
        south.add(bt_exit);
        add(south, BorderLayout.SOUTH);
        
        setTitle("Frame");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(400, 300);
        setLocationRelativeTo(null);
    }
    public static void main(String[] args)
    {
        new Frame().setVisible(true) ;
    }

}```