Hide non primary/foreign key columns in EA data model - data-modeling

Hei,
I want to display in EA a data model for an existing database containing about 150 tables, the primary objective being to show the relations between the tables and the logic of the database.
I imported first the tables definition using the EA ODBC import function, so far so good. But now, to display a simpler diagram, I would like to hide all non primary/foreign key columns. How can I do that?
Tried the following:
Right click in the diagram and go to "Properties/Elements/Show Compartments" I can deselect "Attributes" - but ALL columns will be hidden
Same as above and select "Operations", this display the operation associated with the primary/foreign, NOT the columns themselves
I dont want to manually remove the columns because first it is a lot of work and 2nd I still want to be able to access the columns properties when selecting a table. Any idea how to do that?

You can manually hide the attributes (columns) on a diagram.
Right click on an element and select Features & Properties|Feature and Compartment visibility
Then click on the custom button in the Attributes section and select only those that you want to show/hide

Related

Microsoft Access database's design: "row source" (in a combo box) and "relationship"

I have a small problem during the creation of a database using MS Access. I know that setting right "row source" field (setting "Display control: Combo Box" in "Lookup" label), it is possible to have a Combo Box with the possibilty to choose field from another table (in a many-to-one relationship). For example I have these two tables:
"bank_account":
"client":
Having idclient as foreign key of client table. Setting "row source" to this field in this way:
SELECT client.IDclient, [client].[c_name] FROM client;
I should have a combobox with the list of "client.c_name" field of "client" table, connected by "IDclient". But I have just a list with "IDclient":
I would something like that:
How should I do?
And in "relationship" view, I had to create all the relationships by hand, I thought that in this way were created automatically. However, in "relationship" view I don't have the directions (many, or 1):
But it is a many-to-one relationship. I would something like that:
How should I do?
The reason you're only seeing the IDClient rather than the name is because even though you're using a lookup, you need to be sure you're setting your column count=2 and set the column widths so that the first column is 0cm, second column a suitable amount to display the client name. There are a host of issues with using lookups, but I won't cover that here.
As far as relationships go, go to your relationships window, right click on the connection between the tables you have an interest in editing to relationship of, and appropriately select the one-to-many relationship you're expecting.

Inserting a column at the end in a database diagram and repositioning existing columns

I like working on my schema directly within a database diagram. From there, you can set table properties, column properties, add columns, remove, etc. (in addition to, of course, being able to easily define relationships).
However, it doesn't seem to be possible to insert a column at the end of a table's columns or to reposition existing columns. I can insert a column by selecting an existing column and right-clicking > "Insert Column", but that column always appears above the selected column. When I do this and create the column, I cannot drag it to reposition the column despite the drag cursor appearing.
Is there a workaround?
I like to use database diagrams too. If you right click on the header of the table and select Table View -> Standard you will be presented with an editable grid which allows you to add a column to the end of the table.
I should also say that you can also use Table View -> Modify Custom to allow you to modify all attributes of a column such identity etc. Once you have done this you can use Table View -> Custom to be able to update these.
Step 1: User right click on table
Step 2: User left click on "Standard (menu item)"
Step 3: User left click
Step 4: User keyboard input to enter new column
Thank You

MS Access Table Relationship Dropdown Behavior in Queries/Forms/Reports

I have a small question regarding access. When you create two tables and specify a particular relationship (e.g. one to many) and enforce referential integrity, when you access the table that corresponds to the "one" you get a small "+" icon on the side that will show you all the entries in the "many" table that correspond to the "one".
Is there any way to emulate this in designing a query? such that for each entry, you can expand them to show the results of a subquery involving each individual result of the main query?
You can do something similar already, but it would look like this
Assuming Table1Entry1 corresponds to Table2Entry1 and Table2Entry2 while Table1Entry2 corresponds to Table2Entry3 and Table2Entry4
this is what it would look like once you view the query results
Table1Entry1 Table2Entry1
Table1Entry1 Table2Entry2
Table1Entry2 Table2Entry3
Table1Entry2 Table2Entry4
when what I want is something like
Table1Entry1
-> Table2Entry1
-> Table2Entry2
Table1Entry2
-> Table2Entry3
-> Table2Entry4
If it's not possible when designing a Query, that's fine. But is it possible to generate something like this for reports or forms?
I know this is mainly a cosmetic thing, but it would be much nicer and intuitive compared to the alternatives
It's termed Subdatasheet
In Datasheet view, open the table or query where you want to add the
subdatasheet.
On the Home tab, in the Records group, click More, point to
Subdatasheet, and then click Subdatasheet.
In the Insert Subdatasheet dialog box, select the tab (Tables,
Queries, or Both) that corresponds to the type of object that you
want to insert as a subdatasheet.
In the Link Child Fields box, click the field that you want to use
as the foreign key or matching field that will provide data for the
subdatasheet.
In the Link Master Fields box, click the field that you want to use
as the primary key or matching field for the main table or query,
and then click OK.
NOTE The values in the Link Child Fields and Link Master Fields boxes create a one-to-many join on the specified fields.
To display the subdatasheet that you added to your table, query, or
form, click the + sign.
NOTE The child (foreign key) field does not appear as a column of the subdatasheet. When you add a new record in the subdatasheet, Access automatically inserts the primary key value of the selected base-table.

Adding an order for a customer selected from a list view in Access

I followed this great guide to help me add a search feature to my Access database:
http://www.techrepublic.com/blog/howdoi/how-do-i-populate-an-access-list-control-with-the-results-of-a-dynamic-search/108
At the end it says:
"If you’re building a quote or order, use the list control’s Click or Double Click event to copy record(s) to a temporary table. It’s easy to implement using a fixed query for each search task."
I have managed to display all search results in a list box and I would like to be able to click on a customer to highlight them, and then press a button to add an order to the selected customer. I've been thinking how I could do it and I really can't get my head around it.
Any help would be appreciated.
It depends on how you build your database. My guess is that one easy way would be:
Create a table with customers;
Create an "Order" table with orders where you link the customers through a foreign key
You load the customers in a listbox. While making the name visible, it is actually the ID that you retrieve when clicking the listbox. You can configure this via the wizard in the design view of a table. You can make other forms appear by events on the listbox (eg. on click).
If you managed to retrieve the ID of the customer, and you have the data related to the order (data that can easily be extracted from form objects and loaded into variables ) what you need is an insert statement and insert the values in the "Order" tabel (including the customer ID, which is linked through the foreign key).
This way all order records are linked to the customer and can be queried later.
Due to my limited knowledge on your other requests, I cannot help you any further on the rest of your database design.
I hope that my reply could help you and that I understood your question correctly.
You can access info from a listbox via:
List.Value
Or if it is not the first column then:
List.Column(0,0)
0 being the column and row references.
You may also consider using a listview over a listbox and then you can access the relevant parts of a listview control with the following code:
ListView.SelectedItem
Or if it is not the first column then:
ListView.SelectedItem.SubItems(3)
3 being the column reference

make field a dropdown in access 2007

I'm creating a HR database in access 2007
I have a main table of employee info and several tables that relate to that table ( education for example) that list the acceptable elements that can populate that cell in that row
When i create a form it was created as just a plain text field which is constrained but I wanted to create a dropdown that had just the data that they are allowed to enter to avoid confusion.
You should be able to right-click the text box and select Change To -> Combo Box.
If you are not familiar with creating controls, it is best to use the wizards. Select a combobox from the toolbox and add it to your form, you will be guided through creating the type of combo that you want.
You should also examine the relationships you have created.

Resources