Simple Database Design - Any Suggestions?

I built a sample non real-life database for an automobile agency. The agency have some sellers, cars models, and buyers. I have to keep track of all of them.
These are the process i have taken while designing:
Normalization 1, 2 and 3NF and Relationship one to one and one to many...
Italic column is Primary Key...
The database not realistic, i did it for practicing purpose. Please look at the schema and tell me do you think its ok so far? or the design is wrong?
Here is my schema:
Seller table stores seller information:
*Seller Table {+SellerID+ (number), first name (text), last name (text), address (text), city (text), CountryID (foreign key), date hired (date)}*
Customer table stores customer information, customer can deal with one seller at a time while a seller can deal with more than one customer at a time:
*Customer Table {+CustomerID+ (number), first name (text), last name (text), address (text), city (text), CountryID (foreign key), SellerID (foreign key) }*
Car table stores information about cars available:
*Car Table {+CarID+ (number), manufacturer (text), model (text), car year (text) }*
Purchased car table hold information about customers who purchased a car and type car has been purchased as well as the date of purchase (date purchased relies on both field CarID and CustomerID:
*Purchased Car Table {+CarID+ (foreign key), +CustomerID+ (foreign key), date purchased (date)}*
OR
*Purchased Car Table {+PurchasedCarID+ (number), CarID (foreign key), CustomerID (foreign key), date purchased (date)}*
*Country Table {+CountryID+ (number), country name (text)}*
A customer and a seller can store several phone number:
*Phone Table {+PhoneID+ (number), CustomerID (foreign key), phone number (text)}*
If i want a seller to store more than one number, will i have to make a new table that stores sellers phone numbers? Or there is another better way to do it?
Note: i created country table and phone number table since they are considered multi-valued fields. To achieve 1NF, i must let every field in the table (e.g. Seller, and Customer) be atomic.

You need to study normalization and the concepts underlying 3rd, 4th, and Boyce-Codd normalization.
This forum is not an appropriate place to teach such a class.

Similar Messages

  • SIMPLE Database Design Problem !

    Mapping is a big problem for many complex applications.
    So what happens if we put all the tables into one table called ENTITY?
    I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
    Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
    Definition of the table
    ENTITY
    EntityID > uniqueidentifier
    EntityType > Tells the entityTypeName
    Name >
    LastName >
    CompanyName > 300 attributeTypes
    OppurtunityPeriod >
    PS:There is also another table called RELATION that points the relations between entities.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    check the coloumn with WHERE _entityType='PERSON'
    as there is is clustered index on entityType...there
    is NO performance decrease.
    there is also a clustered index on RELATION table on
    relationType
    when we say WHERE _entityType ='PERSON' or
    WHERE relationType='CONTACTMECHANISM'.
    it scans the clustered index first.it acts like a
    table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
    WHERE _entityType ='PERSON'
      AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Have you ever thought of using constraints in your
    modell? How would you realize those?
    ...in fact we did.We have arranged the generic object
    model in an object database.The knowledge information
    is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
    But the data schema is held in the RDBMS with code
    generation that creates a schema to hold data.If you think that this approach makes sense, why not.
    But in able to have a efficent mapping and a good
    performance we have thought about building only one
    table.The problem is we know we are losing some space
    but the thing is harddisk is much cheaper than RAM
    and CPU.So our trade off concerated on the storage
    cost.But I still wonder if there is a point that I
    have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
    PS: it is not wise effective using generic object
    models also in object databases as CPU cost is a lot
    when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
    PS2: RDBMS is a value based system where object
    databases are identity based.we are trying to be in
    the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
    What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
    C.

  • Aperture 3 does not work well since installing Mavericks. Constantly have to repair the library database. Any suggestions?

    Aperture 3.5.1 was working well enough for me in Mountain Lion, but it seems that switching to Mavericks has made it slower, made it crash frequently and also given me frequent messages that the database is corrupt and I need to rebuild the database library, which I have done multiple times. I also use Aperture for Photo Stream, and it is especially slow and problematic there. Any ideas? Should I just use iPhoto instead? I'm more familiar with the flow in Aperture and would need to learn how better to use iPhoto, so that would be a last resort for me.

    Aperture 3.5.1 was working well enough for me in Mountain Lion
    Aperture 3.5.1 is incompatible with Mt. Lion - you  must have had an earlier Aperture version running with Mt. Lion.
    also given me frequent messages that the database is corrupt and I need to rebuild the database library
    That message is prompted by the crashes. After a crash your library may need repairing.
    Aperture 3.5.1 was working well enough for me in Mountain Lion, but it seems that switching to Mavericks has made it slower, made it crash frequently
    Is all your software compatible with Mavericks? Plug-ins, external editors, preference panes, device drivers, video codecs? Did you install any other software, when you upgraded to Mavericks?
    Where is your Aperture library? On your system drive or external drive?
    Does Aperture also crash, if you launch it while holding down the Shift key?

  • Help with Designing a Simple Database

    I am currently working on a designing problem I would appreciate if someone could review my solution.
    The Problem:
    I need to create a simple database that contains the following entries�
    First Name //mandatory
    Last Name //mandatory
    Date of Birth //mandatory
    Hobbies //there could be anywhere from 0 to infinite amount of hobbies
    Type of actions that I need to perform on the database�
    Add, delete, and modify and entry
    Below are a two design solutions I came up with�
    For both solutions I am going to create two text files. One of the text files called profiles.txt will contain the following fields on each line�
    Id, First Name, Last Name, Date of Birth
    //the Id field in this text file will be the primary key so you will not see the Id duplicated
    The other text file called hobbies.txt will contain the following fields on each line�
    Id, hobby
    //the Id field can be duplicated in this text file so a person can be linked to zero or several hobbies
    Now what differs between my solutions is how I am going to read this data into my program�
    Solution 1) When you start the program it will read the profiles.txt into a linked list. After that is finished the program will then load the hobbies into several linked list that the profiles linked list will point to. So basically each person will have a linked list of hobbies associated with him or her.
    Problem I see with this solution is that if there were 200 million people contained in the profiles.txt would my program crash since the computer would not have enough memory to load all of those names?
    Solution 2) Instead of loading the data at the start of the program the data will stay in the text files. So when someone does a search it will open the text file and search for the entry.
    Problem with this solution is it would be hard to delete and modify names (would I have to rewrite the text file every time I do a change?). Would a good fix to this problem be creating a separate text file to keep track of any changes or deletions I do and once in a while do a database maintenance?
    So a review of my questions is�
    1)     Would my program crash if I had 200 million entries if I use my solution 1?
    2)     Is my solution 2 possible without being incredibly slow or complicated?
    3)     Is there another way of doing this I have not thought of?

    I think having one option will do. Now the problem with this text file thing is that, we'll hve to read every information into memory if we are running a test driver for the program and then work on the information in memory.
    After the program closes, whatever changes we made to this data in memory shd be written to file so we need to find a way of writing the data from memory to overwrite the file. I hope you kinda get what i'm talking abt.
    the database will consist of information like this
    String firstName
    String lastName
    String DOB
    ArrayList / Vector Hobbies
    Now, we kinda want to declare a class with with all these information as data fields ok.
    so let's say
    public class Try{
    String firstName
    String lastName
    String DOB
    ArrayList / Vector Hobbies
    and then create an instance of this class in the driver
    which will be an ArrayList of this class or something so each index of this class ArrayList will hve it's unique data information from the file we read in but again, this is kinda working in memory right.
    After doing all we have to do, we want to write back to file all the changes we made to the data in memory. That's where we are kinda stuck right now.
    A member of the group was suggesting we call whatever functions to work on the txt file which will mean we'll hve to re-write each time we call a function to operate on it and all that stuff. This is a slow process.
    will be glad if anybody out there will have a better way to implement this. Thanks a lot.

  • I am looking for an simple app to do invoices. I only need to send around 6 invoices per week and they are usually paid by cheque. I need to be able to tick these as paid and keep a list of unpaid invoices so I can send reminders. Any suggestions please?

    I am looking for an simple app to do invoices. I only need to send around 6 invoices per week and they are usually paid by cheque. I need to be able to tick these as paid and keep a list of unpaid invoices so I can send reminders. Any suggestions please?

    I am looking for an simple app to do invoices. I only need to send around 6 invoices per week and they are usually paid by cheque. I need to be able to tick these as paid and keep a list of unpaid invoices so I can send reminders. Any suggestions please?

  • Suggestion:  Create a Database Design Forum

    I recommend the creation of a new forum dealing exclusively with database design questions, such as setting Primary Keys, Unique constraints, Check constraints, Indexes, schema-creation scripts, etc. There is no forum devoted exclusively to this topic now and I feel it would be very helpful to the user community. It would certainly make searching for answers to design questions much easier.

    Billy  Verreynne  wrote:
    Prohan wrote:
    I don't agree there.
    1. How to create a relational model certainly IS relevant to Oracle, which is a RELATIONAL DBMS.Oracle also supports data warehousing (star schema designs), network/hierarchical designs, object-relational designs - or pretty much any data model that you may come up with. Calling it just a relational DBMS is incorrect.
    2. Your point that logical models are independent of specific technology is correct. What you're missing is that if a specific technology makes use of a certain foundational body of knowledge, that knowledge is a legitimate topic for a forum whose users use that specific technology.That is putting the cart in front of the horse IMO.
    I would rather see data modeling and logical database design being done in a way that is untainted with specific vendor implementations and technology used. There needs to be a clear line dividing the design from the implementation. If not, then design decisions can (and will) be made based not on the correct logical data modeling principles, but whether it can be "handled" by the technology. A design that is tainted like that, will always be less than optimal (especially as technology is continually evolving and changing).
    An OTN forum for database design will invariable be tainted with Oracle technology - and instead of learning sound data modeling fundamentals, a warped view of data modeling will be conveyed. Where doing abc will be acceptable (when it is not), because Oracle has feature xyz that can make the flawed design work (in a fashion).Excellent points. I think (or at least hope) such a forum would attract some number of pure theorists to straighten out the view. This might make for a lively forum, and might actually influence the real products, and might even get the cart on the right side of the horse.
    Hmmm, I guess I do sound hopelessly optimistic.

  • I need a simple app that will allow highlighting features.  Does anyone have any suggestions?  I have looked at many apps but either they are to complicated for my user or does not easily download to the app.

    I need a recommedation for an app that will allow highlighting within a pdf.   I have looked at several apps but the person I am researching this for wants something simple.  Any suggestions would be appreciated. 

    CS2 is very old and reached its "end of life" a while back.  So probably won't run on modern operating systems.  If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Nancy O.

  • Space designer causes crash - any suggestions??

    Hello people
    I just started running logic 8 on a new imac and I have a big problem with space designer.
    Everything will be going sweet (well kinda). I open SD and things are still fine, but if I try to open any preset then it crashes. Complete freeze, have to force quite and try again...
    This also stops me from opening any of my old Logic 7 songs as I use SD on most tracks, so I guess that is what is causing it to hang...
    Any suggestions?
    I have tried trashing the prefs, but no joy still.
    Any help greatly appreciated.
    Cheers
    Justin

    Now tried the same thing on iPad and iPad Mini. Didn't work and not even my documents show on iPad. Very frustrating as can't use Pages at all. Apple need to sort this.

  • Table Designer third rule thick is not working for me.  Any suggestions?

    I am trying to turn the third rule in a four row table thick. I go into Table Designer and select Every 3rd Thick.  The others are all none.  The table is not responding to the command to make the third rule thick as I need it to be.  Does anyone have any suggestions?  Thank you.

    To remove table format overrides, you need to go to Table > Format > Custom Ruling and Shading, and set as follows:
    For more info, see page 171 of my book.
    -Matt
    Matt R. Sullivan
    co-author Publishing Fundamentals: Unstructured FrameMaker 11

  • There was an error opening the database for the library "/Users/stacia134/Pictures/Aperture Library.aplibrary".  Why am I getting this message and how do I correct it so that I can open Aperture????  any suggestions would be most appreciated

    There was an error opening the database for the library “/Users/stacia134/Pictures/Aperture Library.aplibrary”.  Why am I getting this message and how do I correct it so that I can open Aperture????  any suggestions would be most appreciated

    Then I'd check the system drive, if it has problems.
    To check your System drive boot into the Recovery Partition, see: OS X Lion: About Lion Recovery
    Restart your Mac and hold down the Command key and the R key (Command-R), and keep holding them until the Apple icon appears, indicating that your Mac is starting up.
    You will see a panel, where you can use Disk Utility to check your System Drive.

  • I'd like to remove a thin line that is part of the page design in one of Aperture's photo books.  I can't seem to make it happen.  Any suggestions?

    I'd like to remove a thin line that is part of the page design in one of Aperture's photo books.  I can't seem to make it happen.  Any suggestions?

    The mouse that came with my Mac does not have a right click feature. When I try to highlight and click, it just opens the link I don't want anymore. What I want to do is remove unwanted links from the top bar. For example, I no longer use GoodSearch or myEarthLink, but I can't delete them. There are also some links that never should have found their way up there, and I don't know how they ended up there, and I can't remove them either. I've read through a ton of questions and answers, and I can't find one that addresses the problem. With my Safari browser, all I have to do to remove an unwanted link is to click and drag it to the trash. It doesn't appear to work that way with Firefox, to my chagrin. I hope this better explains my question. Maybe that will give you a better insight into a solution.

  • Extend the EPM install to a new EOI and remove the old EOI's (server decommissioning). EPM version 11.1.2.1 and having essbase and planning; I understand removing EOI's is not as simple as 11.1.2.3 but any suggestion/steps would be of great help.

    Extend the EPM install to a new EOI and remove the old EOI's (server decommissioning). EPM version 11.1.2.1 and having essbase and planning; I understand removing EOI's is not as simple as 11.1.2.3 but any suggestion/steps would be of great help....

    Next time try to create a topic that is not the question.
    There was no option to remove epm instances in 11.1.2.1, basically the cloest you get is uninstalling the products on the server and hope that some of the info is removed from the epm registry
    Cheers
    John

  • Database connector error - any suggestion ?

    Hi friends,
    when i m trying to run my reports in UAT environment it gives me error -  'database connector error'
    same reports runnning excellent in dev. server.
    i already checked traces on server - when trying to run from UAT server reports hitting to database and returning database raws - but finally reports not running and getting error
    and one more thing user have all access on SP , databases uses in reports.
    any suggestion ?
    any help is appreciate.
    Thanks.

    Hello,
    I recommend to post this query to the [BusinessObjects Enterprise Administration|BI Platform; forum.
    This forum is dedicated to topics related to administration and configuration of BusinessObjects Enterprise, BusinessObjects Edge, and Crystal Reports Server.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all BOE Administration queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • I have Lion, and I can't see my unread messages count in the dock, even after the preferences set up. I find the Lion Mail too complicated. Leopard was much easier and more simple to use. I only have one account& don't need all the rest. any suggestions

    I have Lion, and I can't see my unread messages count in the dock, even after the preferences set up.
    I find the Lion Mail too complicated. Leopard was much easier and more simple to use. I only have one account& don't need all the rest.
    any suggestions?

    weird.
    It's so frustrating, I got my Mac Book 5 days ago and I'm already having a discussion in the forum.
    Thank you so much for your prompt replies.
    It's past midnight here so I'd better get some rest...
    Good night captfred!

  • One of my kids has an iphone 4, the other has an ipod.  Bluetooth is ON for both, but they are not discovering each other.  Are there any suggestions?  (They bought a simple texting app so the ipod could text the iphone.)

    One of my kids has an iphone 4, the other has an ipod.  Bluetooth is ON for both, but they are not discovering each other.  Are there any suggestions?  (They bought a simple texting app so the ipod could text the iphone.)  Thank you.

    The built in BT profiles that iOS has do not include any kind of file sharing. Does the app say that it will text over BT? If so, then the connection would most likely be handled through the app itself. What is the name of this app?

Maybe you are looking for